Skip to content

使用教程

Continue 的核心工作流是 Chat、Edit、Agent 和 Autocomplete。第一次使用时,建议先验证 Chat 和 Edit,再开启 Agent 和自动补全。

代码问答

打开 Continue 面板,输入:

text
Read the current file and explain this function's inputs, outputs, and error cases.
Do not modify code.

如果需要项目上下文,可以明确Requirements:

text
Explain this login flow using the current file and related references.
Do not modify code.

选区改写

选中一段代码后输入:

text
Split this logic into clearer functions while preserving behavior.

适合做:

  • 提取函数
  • 改命名
  • 补错误处理
  • 增加类型
  • 简化条件判断

Agent 任务

Agent 任务可以跨文件执行。建议先让它分析:

text
Analyze this build error first and list the files you need to inspect.
Do not modify code before I confirm.

确认后再让它修改:

text
Apply the plan above. Only modify files directly related to this build error.

团队规则

可以在 config.yaml 中写入简短规则:

yaml
rules:
  - Answer in English.
  - Explain the files involved before editing.
  - Only change code directly related to the current task.

规则要短。长篇规范会占用上下文,也可能让模型忽略真正的问题。

推荐工作流

  1. 先配置一个稳定的 chat/edit 模型。
  2. 确认基础问答正常后,再开启 Agent。
  3. 自动补全使用单独模型,不要默认用最贵模型。
  4. 团队规则写短,不要把长篇规范全部塞进每次请求。
  5. 每次任务只让 Continue 处理一个明确问题。
  6. 修改后用项目自己的测试和构建命令验证。

下一步

遇到模型不显示、404、工具调用异常时查看 常见命令与报错处理