|
1 | | -<p align="center"><a href="README_en.md">English</a> | 中文<p> |
| 1 | +<p align="center">English | <a href="README_zh.md">中文</a><p> |
2 | 2 |
|
3 | | -## 📝 简介 |
| 3 | +## 📝 Introduction |
4 | 4 |
|
5 | | -AI Code Context Helper 是一款轻量级桌面应用,为所有需要理解、学习和开发代码的人设计。无论您是编程初学者、职业开发者还是教育工作者,它都能帮助您轻松提取代码上下文,与 AI 助手高效交流。通过可视化的项目结构展示和一键代码导出功能,它让理解复杂代码、获取 AI 编程建议和进行代码审查变得前所未有的简单。无论您是在学习理解代码、开发新功能,还是寻求代码改进建议。这个简单而强大的工具帮助初学者加速学习曲线,同时为专业开发者提高工作效率。 |
| 5 | +AI Code Context Helper is a lightweight desktop application designed for anyone who needs to understand, learn, or develop code. Whether you're a programming beginner, professional developer, or educator, it helps you easily extract code context and communicate efficiently with AI assistants. Through visual project structure displays and one-click code export, it makes understanding complex code, getting AI programming suggestions, and conducting code reviews unprecedentedly simple. This powerful yet simple tool accelerates the learning curve for beginners while improving productivity for professional developers, regardless of whether you're learning code, developing new features, or seeking improvement suggestions. |
6 | 6 |
|
7 | 7 | <p align="center"> |
8 | | - <img src="./_images/app.gif" width="50%" alt="动图"> |
| 8 | + <img src="./_images/app_overview.png" width="50%" alt="Application overview screenshot"> |
9 | 9 | </p> |
10 | 10 |
|
11 | | -## 👥 适用人群 |
| 11 | +<p align="center"> |
| 12 | + <img src="./_images/app.gif" width="50%" alt="Animation"> |
| 13 | +</p> |
12 | 14 |
|
13 | | -- **编程初学者**: 通过 AI 理解开源项目结构和代码逻辑,加速学习曲线 |
14 | | -- **软件开发人员**: 在现有工作流中无缝集成 AI 编程助手,提高开发效率 |
15 | | -- **代码审查者**: 快速提取项目模块代码,利用 AI 进行质量审查和优化建议 |
16 | | -- **技术教育者**: 更有效地解释代码结构和实现细节,辅助教学过程 |
17 | | -- **开源贡献者**: 快速熟悉新项目代码库,降低贡献门槛 |
| 15 | +## 👥 Target Users |
18 | 16 |
|
19 | | -## 🎯 主要应用场景 |
| 17 | +- **Programming Beginners**: Understand open-source project structures and code logic through AI, accelerating your learning curve |
| 18 | +- **Software Developers**: Seamlessly integrate AI programming assistants into existing workflows to improve development efficiency |
| 19 | +- **Code Reviewers**: Quickly extract project module code and leverage AI for quality reviews and optimization suggestions |
| 20 | +- **Technical Educators**: Explain code structures and implementation details more effectively as teaching aids |
| 21 | +- **Open Source Contributors**: Rapidly familiarize yourself with new project codebases, lowering barriers to contribution |
20 | 22 |
|
21 | | -本工具让您可以轻松将代码内容传递给 AI 助手,实现以下场景: |
| 23 | +## 🎯 Key Application Scenarios |
22 | 24 |
|
23 | | -- **代码学习**: 理解复杂项目结构和工作原理,提高学习效率 |
24 | | -- **开发辅助**: 获取更准确的代码修改和功能实现建议 |
25 | | -- **代码审查**: 进行自动化质量检查和性能优化分析 |
26 | | -- **重构指导**: 基于完整上下文的代码改进建议 |
27 | | -- **问题诊断**: 通过提供完整环境帮助 AI 更准确地定位问题 |
| 25 | +This tool allows you to easily pass code context to AI assistants for: |
28 | 26 |
|
29 | | -所有功能都在本地运行,不需要联网,确保您的代码隐私安全。 |
| 27 | +- **Code Learning**: Understanding complex project structures and mechanisms, improving learning efficiency |
| 28 | +- **Development Assistance**: Getting more accurate code modification and feature implementation suggestions |
| 29 | +- **Code Reviews**: Conducting automated quality checks and performance optimization analysis |
| 30 | +- **Refactoring Guidance**: Receiving code improvement suggestions based on complete context |
| 31 | +- **Problem Diagnosis**: Helping AI precisely locate issues by providing the complete environment |
30 | 32 |
|
31 | | -## 💡 核心使用场景 |
| 33 | +All features run locally without internet connection, ensuring the privacy and security of your code. |
32 | 34 |
|
33 | | -### 1. 代码学习与分析 |
| 35 | +## 💡 Core Use Cases |
34 | 36 |
|
35 | | -轻松让 AI 帮你理解复杂代码库的工作原理: |
| 37 | +### 1. Code Learning & Analysis |
36 | 38 |
|
37 | | -1. **选择目标项目目录**:打开你想分析的项目 |
38 | | -2. **复制完整项目结构**:使用"复制目录树"功能,让 AI 先了解整体架构 |
39 | | -3. **提供核心代码文件**:选择关键文件,使用"复制路径与代码"一次性提供所有代码 |
40 | | -4. **询问 AI 分析**:请求 AI 分析代码结构、解释工作原理或提供学习路径 |
| 39 | +Easily let AI help you understand how complex codebases work: |
41 | 40 |
|
42 | | -> 以往理解一个复杂开源项目可能需要数天,现在可以先让 AI 提供整体概览和关键部分解析,大幅提升学习效率! |
| 41 | +1. **Select Target Project Directory**: Open the project you want to analyze |
| 42 | +2. **Copy Complete Project Structure**: Use the "Copy Directory Tree" function to help AI understand the overall architecture |
| 43 | +3. **Provide Core Code Files**: Select key files and use "Copy Path and Code" to provide all code at once |
| 44 | +4. **Ask AI for Analysis**: Request AI to analyze code structure, explain how it works, or suggest a learning path |
43 | 45 |
|
44 | | -### 2. 代码修改与开发 |
| 46 | +> Understanding a complex open-source project used to take days. Now you can get an overview and analysis of key parts from AI, greatly improving learning efficiency! |
45 | 47 |
|
46 | | -快速获取 AI 编程辅助而不破坏现有工作流: |
| 48 | +### 2. Code Modification & Development |
47 | 49 |
|
48 | | -1. **定位需要修改的模块**:通过可视化树形结构找到相关文件 |
49 | | -2. **导出相关代码上下文**:同时选择相关的多个文件(如模型、控制器和视图) |
50 | | -3. **描述修改需求**:向 AI 清晰描述你想实现的功能或修复的问题 |
51 | | -4. **获取完整实现方案**:AI 会基于完整上下文提供准确的代码修改建议 |
| 50 | +Get AI programming assistance without disrupting your existing workflow: |
52 | 51 |
|
53 | | -> 相比单文件编辑器集成,这种方式能提供更完整的项目上下文,产生更准确、更具可操作性的代码建议 |
| 52 | +1. **Locate Modules Needing Changes**: Find relevant files through the visual tree structure |
| 53 | +2. **Export Related Code Context**: Select multiple related files simultaneously (e.g., models, controllers, and views) |
| 54 | +3. **Describe Modification Requirements**: Clearly explain to AI what functionality you want to implement or what problem needs fixing |
| 55 | +4. **Get Complete Implementation Plan**: AI will provide accurate code modification suggestions based on the complete context |
54 | 56 |
|
55 | | -### 3. 代码审查与重构 |
| 57 | +> Compared to single-file editor integrations, this approach provides more complete project context, resulting in more accurate and actionable code suggestions |
56 | 58 |
|
57 | | -让 AI 成为你的代码审查助手: |
| 59 | +### 3. Code Review & Refactoring |
58 | 60 |
|
59 | | -1. **选择待审查模块**:框选整个功能模块的所有文件 |
60 | | -2. **一键复制所有相关代码**:包含完整的实现细节和文件路径 |
61 | | -3. **请求 AI 审查**:获取关于代码质量、潜在问题和改进建议的反馈 |
62 | | -4. **实施重构建议**:应用 AI 提供的优化方案 |
| 61 | +Let AI become your code review assistant: |
63 | 62 |
|
64 | | -> 如果代码总量在 5000 行以内,可以一次性复制给主流 AI 助手进行全面分析,比传统代码审查更快、更全面 |
| 63 | +1. **Select Module for Review**: Box-select all files in a functional module |
| 64 | +2. **Copy All Related Code with One Click**: Include complete implementation details and file paths |
| 65 | +3. **Request AI Review**: Get feedback on code quality, potential issues, and improvement suggestions |
| 66 | +4. **Implement Refactoring Suggestions**: Apply optimization solutions provided by AI |
65 | 67 |
|
66 | | -### 本地运行,保障隐私 |
| 68 | +> If the total code is under 5,000 lines, you can copy it all to mainstream AI assistants for comprehensive analysis, faster and more thorough than traditional code reviews |
67 | 69 |
|
68 | | -- **完全离线工作**:软件在本地运行,不需要联网,不会上传任何代码 |
69 | | -- **隐私保护**:您的代码仅在您主动复制时才会离开您的电脑 |
70 | | -- **与任何 AI 助手兼容**:您可以自由选择使用哪种 AI 服务,完全由您控制代码分享范围 |
| 70 | +### Local Execution, Privacy Protection |
71 | 71 |
|
72 | | -<p align="center"> |
73 | | - <img src="./_images/app_overview.png" width="50%" alt="应用概览截图"> |
74 | | -</p> |
| 72 | +- **Completely Offline Operation**: The software runs locally, requires no internet connection, and never uploads any code |
| 73 | +- **Privacy Protection**: Your code only leaves your computer when you actively copy it |
| 74 | +- **Compatible with Any AI Assistant**: You're free to choose which AI service to use, with complete control over code sharing |
75 | 75 |
|
76 | | -## ✨ 主要特性 |
| 76 | +## ✨ Key Features |
77 | 77 |
|
78 | | -### 智能文件管理 |
| 78 | +### Intelligent File Management |
79 | 79 |
|
80 | | -- **目录树可视化**:树形视图显示项目文件结构 |
81 | | -- **文件类型识别**:自动检测文本文件编码,区分文本与二进制文件 |
82 | | -- **高级筛选**:支持正则表达式过滤、.gitignore 规则应用和目录深度限制,便于处理大型项目 |
| 80 | +- **Directory Tree Visualization**: Tree view displays project file structure |
| 81 | +- **File Type Recognition**: Automatically detects text file encoding, distinguishes between text and binary files |
| 82 | +- **Advanced Filtering**: Supports regular expression filtering, .gitignore rule application, and directory depth limits for handling large projects |
83 | 83 |
|
84 | | -### 灵活选择与导出 |
| 84 | +### Flexible Selection & Export |
85 | 85 |
|
86 | | -- **多选支持**:可选择单个文件、多个文件或整个目录及其子目录 |
87 | | -- **鼠标框选模式**:通过拖动鼠标一次性选择/取消选择多个文件 |
88 | | -- **批量导出**:支持导出选中内容的路径、代码或两者兼有 |
89 | | -- **上下文菜单**:提供多种复制选项,适用于不同开发场景 |
| 86 | +- **Multi-selection Support**: Select single files, multiple files, or entire directories and their subdirectories |
| 87 | +- **Mouse Box Selection Mode**: Select/deselect multiple files at once by dragging the mouse |
| 88 | +- **Batch Export**: Export paths, code, or both for selected content |
| 89 | +- **Context Menu**: Provides multiple copy options for different development scenarios |
90 | 90 |
|
91 | | -### 集成与便捷性 |
| 91 | +### Integration & Convenience |
92 | 92 |
|
93 | | -- **系统托盘集成**:最小化到系统托盘,随时可用但不占用桌面空间 |
94 | | -- **全局热键**:在任何应用中按下 Ctrl+2 快捷键即可显示/隐藏应用窗口 |
95 | | -- **窗口置顶选项**:使窗口保持在其他应用之上,便于操作 |
96 | | -- **文件系统集成**:直接从上下文菜单在资源管理器中打开文件夹或启动命令行终端 |
| 93 | +- **System Tray Integration**: Minimize to system tray, available anytime without occupying desktop space |
| 94 | +- **Global Hotkey**: Press Ctrl+2 from any application to show/hide the application window |
| 95 | +- **Window Always-on-Top Option**: Keep the window above other applications for convenience |
| 96 | +- **File System Integration**: Open folders in file explorer or launch command-line terminals directly from the context menu |
97 | 97 |
|
98 | | -### 定制化与易用性 |
| 98 | +### Customization & Ease of Use |
99 | 99 |
|
100 | | -- **多语言支持**:支持中英文切换 |
101 | | -- **输出格式定制**:可配置代码和路径的前缀后缀格式 |
102 | | -- **高级选项切换**:可隐藏/显示高级设置,最大化目录树显示空间 |
103 | | -- **轻量实现**:低资源占用,启动迅速,无缝融入现有开发工作流 |
| 100 | +- **Multi-language Support**: Switch between English and Chinese |
| 101 | +- **Output Format Customization**: Configure prefixes and suffixes for code and paths |
| 102 | +- **Advanced Options Toggle**: Hide/show advanced settings to maximize directory tree display space |
| 103 | +- **Lightweight Implementation**: Low resource usage, quick startup, seamlessly integrates into existing development workflows |
104 | 104 |
|
105 | | -## 🔑 快捷键与特殊功能 |
| 105 | +## 🔑 Shortcuts & Special Functions |
106 | 106 |
|
107 | | -- **Ctrl+C**:复制选中文件的路径和代码 |
108 | | -- **Ctrl+B**:复制选中文件的文件名 |
109 | | -- **Ctrl+F**:在资源管理器中打开选中文件夹 |
110 | | -- **Ctrl+T**:在选中文件夹中打开命令行终端 |
111 | | -- **Ctrl+2**:全局热键,从任何地方显示/隐藏应用程序 |
112 | | -- **树状态保持**:应用程序会在会话之间记住每个项目目录的展开状态 |
| 107 | +- **Ctrl+C**: Copy paths and code of selected files |
| 108 | +- **Ctrl+B**: Copy filenames of selected files |
| 109 | +- **Ctrl+F**: Open selected folder in file explorer |
| 110 | +- **Ctrl+T**: Open command-line terminal in selected folder |
| 111 | +- **Ctrl+2**: Global hotkey to show/hide the application from anywhere |
| 112 | +- **Tree State Preservation**: The application remembers expansion state of each project directory between sessions |
113 | 113 |
|
114 | | -## 📸 应用截图 |
| 114 | +## 📸 Application Screenshots |
115 | 115 |
|
116 | | -### 目录树菜单 |
| 116 | +### Directory Tree Menu |
117 | 117 |
|
118 | 118 | <p align="center"> |
119 | | - <img src="./_images/context_menu.png" width="60%" alt="右键菜单"> |
| 119 | + <img src="./_images/context_menu.png" width="60%" alt="Right-click menu"> |
120 | 120 | </p> |
121 | 121 |
|
122 | | -## 🔧 安装与使用 |
| 122 | +## 🔧 Installation & Usage |
123 | 123 |
|
124 | | -### 下载安装 |
| 124 | +### Download & Install |
125 | 125 |
|
126 | | -1. 从[Releases 页面](https://github.com/sansan0/ai-code-context-helper/releases)下载最新版本 |
127 | | -2. 解压缩下载的文件到任意位置 |
128 | | -3. 运行`AI Code Context Helper.exe`启动应用 |
| 126 | +1. Download the latest version from the [Releases page](https://github.com/sansan0/ai-code-context-helper/releases) |
| 127 | +2. Extract the downloaded file to any location |
| 128 | +3. Run `AI Code Context Helper.exe` to launch the application |
129 | 129 |
|
130 | | -### 使用方法 |
| 130 | +### How to Use |
131 | 131 |
|
132 | | -1. 点击"浏览..."按钮选择项目根目录 |
133 | | -2. 在目录树中勾选需要分享的文件或文件夹 |
134 | | -3. 右键点击选择"复制路径与代码"(或使用其他复制选项) |
135 | | -4. 将复制的内容粘贴到 AI 助手(如 ChatGPT、Claude 等)对话中 |
136 | | -5. 根据复制的代码上下文,向 AI 提问或请求代码修改建议 |
| 132 | +1. Click "Browse..." to select your project root directory |
| 133 | +2. Check the files or folders you want to share in the directory tree |
| 134 | +3. Right-click and select "Copy Path and Code" (or other copy options) |
| 135 | +4. Paste the copied content into an AI assistant (like ChatGPT, Claude, etc.) |
| 136 | +5. Ask questions or request code modification suggestions based on the provided code context |
137 | 137 |
|
138 | | -## ⚙️ 配置选项 |
| 138 | +## ⚙️ Configuration Options |
139 | 139 |
|
140 | | -### 界面选项 |
| 140 | +### Interface Options |
141 | 141 |
|
142 | | -- **显示隐藏文件**:是否显示隐藏文件和文件夹 |
143 | | -- **显示文件/显示文件夹**:控制树视图中的显示内容 |
144 | | -- **使用相对路径**:复制时使用相对路径而非绝对路径 |
145 | | -- **根据.gitignore 过滤**:应用项目.gitignore 文件中的规则 |
146 | | -- **鼠标框选模式**:启用拖动选择功能,方便批量操作 |
147 | | -- **最大深度**:限制目录树的显示深度 |
148 | | -- **文件过滤**:使用正则表达式过滤显示的文件 |
149 | | -- **窗口置顶**:使窗口保持在所有其他应用之上 |
150 | | -- **高级选项切换**:隐藏/显示高级设置,最大化树显示空间 |
| 142 | +- **Show Hidden Files**: Whether to display hidden files and folders |
| 143 | +- **Show Files/Show Folders**: Control what appears in the tree view |
| 144 | +- **Use Relative Path**: Use paths relative to the root directory instead of absolute paths |
| 145 | +- **Filter by .gitignore**: Apply rules from the project's .gitignore file |
| 146 | +- **Mouse Box Selection Mode**: Enable drag selection for batch operations |
| 147 | +- **Maximum Depth**: Limit the display depth of the directory tree |
| 148 | +- **File Filter**: Filter displayed files using regular expressions |
| 149 | +- **Keep on Top**: Keep the window above all other applications |
| 150 | +- **Advanced Options Toggle**: Hide/show advanced settings to maximize tree display space |
151 | 151 |
|
152 | | -## 🛠️ 从源码构建 |
| 152 | +## 🛠️ Building from Source |
153 | 153 |
|
154 | | -### 环境要求 |
| 154 | +### Requirements |
155 | 155 |
|
156 | 156 | - Python 3.9+ |
157 | | -- Poetry 包管理工具 |
| 157 | +- Poetry package manager |
158 | 158 |
|
159 | | -### 安装依赖 |
| 159 | +### Installing Dependencies |
160 | 160 |
|
161 | 161 | ```bash |
162 | 162 | git clone https://github.com/sansan0/ai-code-context-helper.git |
163 | 163 | cd ai-code-context-helper |
164 | 164 | poetry install |
165 | 165 | ``` |
166 | 166 |
|
167 | | -### 构建可执行文件 |
| 167 | +### Building the Executable |
168 | 168 |
|
169 | 169 | ```bash |
170 | 170 | poetry run python -m cx_Freeze build |
171 | 171 | ``` |
172 | 172 |
|
173 | | -## 📄 许可证 |
| 173 | +## 📄 License |
174 | 174 |
|
175 | | -本项目采用 GPL-3.0 许可证 - 详见 [LICENSE](LICENSE) 文件 |
| 175 | +This project is licensed under the GPL-3.0 License - see the [LICENSE](LICENSE) file for details |
0 commit comments