# Cline-胜算云增强版 工具指南

## **Cline**-胜算云增强版 **能做什么？**

**Cline**-胜算云增强版 是您的 AI 助手，它可以：

* 在项目中编辑和创建文件
* 运行终端命令
* 搜索和分析您的代码
* 帮助调试和解决问题
* 自动执行重复性任务
* 与外部工具集成

## **第一步**

1. **启动任务**
   * 在聊天中输入您的请求
   * 示例：“创建名为 Header 的新 React 组件”
2. **提供上下文**
   * 使用 @ 提及添加文件、文件夹或 URL
   * 示例：“@file：src/components/App.tsx”
3. &#x20;**查看更改**
   * **Cline**-胜算云增强版将在进行更改之前显示差异
   * 您可以编辑或拒绝更改

## **主要特点**

1. **文件编辑**
   * &#x20;创建新文件
   * &#x20;修改现有代码
   * 跨文件搜索和替换
2. **终端命令**
   * 运行 npm 命令
   * 启动开发服务器
   * &#x20;安装依赖项
3. **代码分析**
   * 查找和修复错误
   * 重构代码
   * 添加文档
4. **浏览器集成**
   * 测试网页
   * 捕获屏幕截图
   * 检查控制台日志

## **可用工具**

有关最新的实施详细信息，您可以在 [Cline 存储库](https://github.com/cline/cline/blob/main/src/core/Cline.ts)中查看完整的源代码。

**Cline**-胜算云增强版 可以访问以下工具来完成各种任务：

1. **文件操作**
   * `write_to_file`：创建或覆盖文件
   * `read_file`：读取文件内容
   * `replace_in_file`：对文件进行有针对性的编辑
   * `search_files`：使用正则表达式搜索文件
   * `list_files`：列出目录内容
2. **终端运营**
   * `execute_command`：运行 CLI 命令
   * `list_code_definition_names`：列出代码定义
3. **MCP 工具**
   * `use_mcp_tool`：使用 MCP 服务器中的工具
   * `access_mcp_resource`：访问 MCP 服务器资源
   * 用户可以创建自定义 MCP 工具，然后 Cline 可以访问这些工具
   * 示例：创建 Cline 可用于获取天气预报的天气 API 工具
4. **交互工具**
   * `ask_followup_question`：请用户澄清
   * `attempt_completion`：显示最终结果

每个工具都有特定的参数和使用模式。以下是一些示例：

* 创建新文件 （write\_to\_file）：

  ```
  <write_to_file>
  <path>src/components/Header.tsx</path>
  <content>
  // Header component code
  </content>
  </write_to_file>
  ```
* 搜索模式 （search\_files）：

  ```
  <search_files>
  <path>src</path>
  <regex>function\s+\w+\(</regex>
  <file_pattern>*.ts</file_pattern>
  </search_files>
  ```
* 运行命令 （execute\_command）：

  ```
  <execute_command>
  <command>npm install axios</command>
  <requires_approval>false</requires_approval>
  </execute_command>
  ```

## **常见任务**

1. **创建新组件**
   * “创建一个名为 Footer 的新 React 组件”
2. **修复 Bug**
   * “修复 src/utils/format.ts 中的错误”
3. **重构代码**
   * “重构 Button 组件以使用 TypeScript”
4. **运行命令**
   * “运行 npm install 以添加 axios”

## **获取帮助**

* 查看文档
* 提供反馈以改进 **Cline**-胜算云增强版


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://modelmesh.gitbook.io/cline-zhong-wen-ban-docs/tan-suo-cline-de-gong-ju/cline-sheng-suan-yun-zeng-qiang-ban-gong-ju-zhi-nan.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
