diff --git a/README.md b/README.md index 9f21f00e..3b47aecb 100644 --- a/README.md +++ b/README.md @@ -2,17 +2,17 @@ English | Español | Deutsch | 日本語 | 简体中文 | 繁體中文 | 한국어 -# Cline – \#1 on OpenRouter +# Cline – OpenRouter 排名第一的 AI 工具

- +

-Download on VS Marketplace +在 VS Marketplace 下载 Discord @@ -21,170 +21,146 @@ English | r/cline -Feature Requests +功能请求 -Getting Started +新手上路
-Meet Cline, an AI assistant that can use your **CLI** a**N**d **E**ditor. +认识 Cline,一个可以使用你的 **CLI** 和 **编辑器** 的 AI 助手。 -Thanks to [Claude 3.7 Sonnet's agentic coding capabilities](https://www.anthropic.com/claude/sonnet), Cline can handle complex software development tasks step-by-step. With tools that let him create & edit files, explore large projects, use the browser, and execute terminal commands (after you grant permission), he can assist you in ways that go beyond code completion or tech support. Cline can even use the Model Context Protocol (MCP) to create new tools and extend his own capabilities. While autonomous AI scripts traditionally run in sandboxed environments, this extension provides a human-in-the-loop GUI to approve every file change and terminal command, providing a safe and accessible way to explore the potential of agentic AI. +感谢 [Claude 3.7 Sonnet 的代理编码能力](https://www.anthropic.com/claude/sonnet),Cline 可以一步步处理复杂的软件开发任务。通过允许他创建和编辑文件、探索大型项目、使用浏览器和执行终端命令(在你授予权限后),他可以提供超越代码完成或技术支持的帮助。Cline 甚至可以使用 Model Context Protocol (MCP) 创建新工具并扩展自己的能力。虽然自主 AI 脚本传统上在沙盒环境中运行,但此扩展提供了一个人机交互的 GUI 来批准每个文件更改和终端命令,提供了一种安全且可访问的方式来探索代理 AI 的潜力。 -1. Enter your task and add images to convert mockups into functional apps or fix bugs with screenshots. -2. Cline starts by analyzing your file structure & source code ASTs, running regex searches, and reading relevant files to get up to speed in existing projects. By carefully managing what information is added to context, Cline can provide valuable assistance even for large, complex projects without overwhelming the context window. -3. Once Cline has the information he needs, he can: - - Create and edit files + monitor linter/compiler errors along the way, letting him proactively fix issues like missing imports and syntax errors on his own. - - Execute commands directly in your terminal and monitor their output as he works, letting him e.g., react to dev server issues after editing a file. - - For web development tasks, Cline can launch the site in a headless browser, click, type, scroll, and capture screenshots + console logs, allowing him to fix runtime errors and visual bugs. -4. When a task is completed, Cline will present the result to you with a terminal command like `open -a "Google Chrome" index.html`, which you run with a click of a button. +1. 输入你的任务并添加图像,将模型转换为功能应用程序或通过截图修复错误。 +2. Cline 首先分析你的文件结构和源代码 AST,运行正则表达式搜索,并阅读相关文件以了解现有项目。通过仔细管理添加到上下文中的信息,Cline 即使在大型复杂项目中也能提供有价值的帮助,而不会使上下文窗口过载。 +3. 一旦 Cline 获得所需信息,他可以: + - 创建和编辑文件 + 监控 linter/编译器错误,从而主动修复诸如缺少导入和语法错误等问题。 + - 直接在你的终端中执行命令并监控其输出,从而在编辑文件后对开发服务器问题做出反应。 + - 对于 Web 开发任务,Cline 可以在无头浏览器中启动网站,点击、输入、滚动并捕获截图和控制台日志,从而修复运行时错误和视觉错误。 +4. 当任务完成时,Cline 将通过终端命令如 `open -a "Google Chrome" index.html` 向你展示结果,你可以通过点击按钮运行该命令。 > [!TIP] -> Use the `CMD/CTRL + Shift + P` shortcut to open the command palette and type "Cline: Open In New Tab" to open the extension as a tab in your editor. This lets you use Cline side-by-side with your file explorer, and see how he changes your workspace more clearly. +> 使用 `CMD/CTRL + Shift + P` 快捷键打开命令面板并输入 "Cline: Open In New Tab" 将扩展作为标签在编辑器中打开。这让你可以与文件资源管理器并排使用 Cline,更清楚地看到他如何改变你的工作空间。 --- -### Use any API and Model +### 使用任何 API 和模型 -Cline supports API providers like OpenRouter, Anthropic, OpenAI, Google Gemini, AWS Bedrock, Azure, and GCP Vertex. You can also configure any OpenAI compatible API, or use a local model through LM Studio/Ollama. If you're using OpenRouter, the extension fetches their latest model list, allowing you to use the newest models as soon as they're available. +Cline 支持 OpenRouter、Anthropic、OpenAI、Google Gemini、AWS Bedrock、Azure 和 GCP Vertex 等 API 提供商。你还可以配置任何兼容 OpenAI 的 API,或通过 LM Studio/Ollama 使用本地模型。如果你使用 OpenRouter,扩展会获取他们的最新模型列表,让你在新模型可用时立即使用。 -The extension also keeps track of total tokens and API usage cost for the entire task loop and individual requests, keeping you informed of spend every step of the way. +扩展还会跟踪整个任务循环和单个请求的总令牌和 API 使用成本,让你在每一步都了解支出情况。 - +
-### Run Commands in Terminal +### 在终端中运行命令 -Thanks to the new [shell integration updates in VSCode v1.93](https://code.visualstudio.com/updates/v1_93#_terminal-shell-integration-api), Cline can execute commands directly in your terminal and receive the output. This allows him to perform a wide range of tasks, from installing packages and running build scripts to deploying applications, managing databases, and executing tests, all while adapting to your dev environment & toolchain to get the job done right. +感谢 VSCode v1.93 中的新 [终端 shell 集成更新](https://code.visualstudio.com/updates/v1_93#_terminal-shell-integration-api),Cline 可以直接在你的终端中执行命令并接收输出。这使他能够执行广泛的任务,从安装包和运行构建脚本到部署应用程序、管理数据库和执行测试,同时适应你的开发环境和工具链以正确完成工作。 -For long running processes like dev servers, use the "Proceed While Running" button to let Cline continue in the task while the command runs in the background. As Cline works he’ll be notified of any new terminal output along the way, letting him react to issues that may come up, such as compile-time errors when editing files. +对于长时间运行的进程如开发服务器,使用“在运行时继续”按钮让 Cline 在命令后台运行时继续任务。当 Cline 工作时,他会在过程中收到任何新的终端输出通知,让他对可能出现的问题做出反应,例如编辑文件时的编译时错误。 - +
-### Create and Edit Files +### 创建和编辑文件 -Cline can create and edit files directly in your editor, presenting you a diff view of the changes. You can edit or revert Cline's changes directly in the diff view editor, or provide feedback in chat until you're satisfied with the result. Cline also monitors linter/compiler errors (missing imports, syntax errors, etc.) so he can fix issues that come up along the way on his own. +Cline 可以直接在你的编辑器中创建和编辑文件,向你展示更改的差异视图。你可以直接在差异视图编辑器中编辑或恢复 Cline 的更改,或在聊天中提供反馈,直到你对结果满意。Cline 还会监控 linter/编译器错误(缺少导入、语法错误等),以便他在过程中自行修复出现的问题。 -All changes made by Cline are recorded in your file's Timeline, providing an easy way to track and revert modifications if needed. +Cline 所做的所有更改都会记录在你的文件时间轴中,提供了一种简单的方法来跟踪和恢复修改(如果需要)。 - +
-### Use the Browser +### 使用浏览器 -With Claude 3.5 Sonnet's new [Computer Use](https://www.anthropic.com/news/3-5-models-and-computer-use) capability, Cline can launch a browser, click elements, type text, and scroll, capturing screenshots and console logs at each step. This allows for interactive debugging, end-to-end testing, and even general web use! This gives him autonomy to fixing visual bugs and runtime issues without you needing to handhold and copy-pasting error logs yourself. +借助 Claude 3.5 Sonnet 的新 [计算机使用](https://www.anthropic.com/news/3-5-models-and-computer-use) 功能,Cline 可以启动浏览器,点击元素,输入文本和滚动,在每一步捕获截图和控制台日志。这允许进行交互式调试、端到端测试,甚至是一般的网页使用!这使他能够自主修复视觉错误和运行时问题,而无需你亲自操作和复制粘贴错误日志。 -Try asking Cline to "test the app", and watch as he runs a command like `npm run dev`, launches your locally running dev server in a browser, and performs a series of tests to confirm that everything works. [See a demo here.](https://x.com/sdrzn/status/1850880547825823989) +试试让 Cline “测试应用程序”,看看他如何运行 `npm run dev` 命令,在浏览器中启动你本地运行的开发服务器,并执行一系列测试以确认一切正常。[在这里查看演示。](https://x.com/sdrzn/status/1850880547825823989) - +
-### "add a tool that..." +### “添加一个工具……” -Thanks to the [Model Context Protocol](https://github.com/modelcontextprotocol), Cline can extend his capabilities through custom tools. While you can use [community-made servers](https://github.com/modelcontextprotocol/servers), Cline can instead create and install tools tailored to your specific workflow. Just ask Cline to "add a tool" and he will handle everything, from creating a new MCP server to installing it into the extension. These custom tools then become part of Cline's toolkit, ready to use in future tasks. +感谢 [Model Context Protocol](https://github.com/modelcontextprotocol),Cline 可以通过自定义工具扩展他的能力。虽然你可以使用 [社区制作的服务器](https://github.com/modelcontextprotocol/servers),但 Cline 可以创建和安装适合你特定工作流程的工具。只需让 Cline “添加一个工具”,他将处理所有事情,从创建新的 MCP 服务器到将其安装到扩展中。这些自定义工具将成为 Cline 工具包的一部分,准备在未来的任务中使用。 -- "add a tool that fetches Jira tickets": Retrieve ticket ACs and put Cline to work -- "add a tool that manages AWS EC2s": Check server metrics and scale instances up or down -- "add a tool that pulls the latest PagerDuty incidents": Fetch details and ask Cline to fix bugs +- “添加一个获取 Jira 工单的工具”:检索工单 AC 并让 Cline 开始工作 +- “添加一个管理 AWS EC2 的工具”:检查服务器指标并上下扩展实例 +- “添加一个获取最新 PagerDuty 事件的工具”:获取详细信息并让 Cline 修复错误 - +
-### Add Context +### 添加上下文 -**`@url`:** Paste in a URL for the extension to fetch and convert to markdown, useful when you want to give Cline the latest docs +**`@url`:** 粘贴一个 URL 以供扩展获取并转换为 markdown,当你想给 Cline 提供最新文档时非常有用 -**`@problems`:** Add workspace errors and warnings ('Problems' panel) for Cline to fix +**`@problems`:** 添加工作区错误和警告(“问题”面板)以供 Cline 修复 -**`@file`:** Adds a file's contents so you don't have to waste API requests approving read file (+ type to search files) +**`@file`:** 添加文件内容,这样你就不必浪费 API 请求批准读取文件(+ 输入以搜索文件) -**`@folder`:** Adds folder's files all at once to speed up your workflow even more +**`@folder`:** 一次添加文件夹的文件,以进一步加快你的工作流程 - +
-### Checkpoints: Compare and Restore +### 检查点:比较和恢复 -As Cline works through a task, the extension takes a snapshot of your workspace at each step. You can use the 'Compare' button to see a diff between the snapshot and your current workspace, and the 'Restore' button to roll back to that point. +当 Cline 完成任务时,扩展会在每一步拍摄你的工作区快照。你可以使用“比较”按钮查看快照和当前工作区之间的差异,并使用“恢复”按钮回滚到该点。 -For example, when working with a local web server, you can use 'Restore Workspace Only' to quickly test different versions of your app, then use 'Restore Task and Workspace' when you find the version you want to continue building from. This lets you safely explore different approaches without losing progress. +例如,当使用本地 Web 服务器时,你可以使用“仅恢复工作区”快速测试应用程序的不同版本,然后在找到要继续构建的版本时使用“恢复任务和工作区”。这让你可以安全地探索不同的方法而不会丢失进度。 - +
-## Contributing +## 贡献 -To contribute to the project, start with our [Contributing Guide](CONTRIBUTING.md) to learn the basics. You can also join our [Discord](https://discord.gg/cline) to chat with other contributors in the `#contributors` channel. If you're looking for full-time work, check out our open positions on our [careers page](https://cline.bot/join-us)! +要为项目做出贡献,请从我们的 [贡献指南](CONTRIBUTING.md) 开始,了解基础知识。你还可以加入我们的 [Discord](https://discord.gg/cline) 在 `#contributors` 频道与其他贡献者聊天。如果你正在寻找全职工作,请查看我们在 [招聘页面](https://cline.bot/join-us) 上的开放职位!
-Local Development Instructions +本地开发说明 -1. Clone the repository _(Requires [git-lfs](https://git-lfs.com/))_: - ```bash - git clone https://github.com/cline/cline.git - ``` -2. Open the project in VSCode: - ```bash - code cline - ``` -3. Install the necessary dependencies for the extension and webview-gui: - ```bash - npm run install:all - ``` -4. Launch by pressing `F5` (or `Run`->`Start Debugging`) to open a new VSCode window with the extension loaded. (You may need to install the [esbuild problem matchers extension](https://marketplace.visualstudio.com/items?itemName=connor4312.esbuild-problem-matchers) if you run into issues building the project.) +1. 克隆仓库 _(需要 [git-lfs](https://git-lfs.com/))_: + ```bash + git clone https://github.com/cline/cline.git + ``` +2. 在 VSCode 中打开项目: + ```bash + code cline + ``` +3. 安装扩展和 webview-gui 的必要依赖: + ```bash + npm run install:all + ``` +4. 按 `F5`(或 `运行`->`开始调试`)启动以打开一个加载了扩展的新 VSCode 窗口。(如果你在构建项目时遇到问题,可能需要安装 [esbuild problem matchers 扩展](https://marketplace.visualstudio.com/items?itemName=connor4312.esbuild-problem-matchers))
-
-Creating a Pull Request - -1. Before creating a PR, generate a changeset entry: - ```bash - npm run changeset - ``` - This will prompt you for: - - Type of change (major, minor, patch) - - `major` → breaking changes (1.0.0 → 2.0.0) - - `minor` → new features (1.0.0 → 1.1.0) - - `patch` → bug fixes (1.0.0 → 1.0.1) - - Description of your changes - -2. Commit your changes and the generated `.changeset` file - -3. Push your branch and create a PR on GitHub. Our CI will: - - Run tests and checks - - Changesetbot will create a comment showing the version impact - - When merged to main, changesetbot will create a Version Packages PR - - When the Version Packages PR is merged, a new release will be published - -
- - -## License +## 许可证 [Apache 2.0 © 2025 Cline Bot Inc.](./LICENSE) + diff --git a/assets/icons/icon.png b/assets/icons/icon.png index db6f1d8f..7fc24c60 100644 Binary files a/assets/icons/icon.png and b/assets/icons/icon.png differ diff --git a/assets/icons/icon.svg b/assets/icons/icon.svg index 2a3908aa..61ab2a8c 100644 --- a/assets/icons/icon.svg +++ b/assets/icons/icon.svg @@ -1,16 +1,13 @@ - - - Group Copy 2 - - - - - - - - - - - - - \ No newline at end of file + + + + + + + + + + + + + diff --git a/assets/icons/robot_panel_light.png b/assets/icons/robot_panel_light.png index 2f028e0a..39c0af82 100644 Binary files a/assets/icons/robot_panel_light.png and b/assets/icons/robot_panel_light.png differ