项目简介
Continue 是一个开源编码代理,提供 AI 驱动的代码生成、对话和自动化功能。它作为命令行、VS Code 扩展和 JetBrains 插件运行,帮助开发者更快地编写和理解代码。该项目在最终 2.0.0 版本后已归档。
README 预览
Continue\n\nPioneering open-source coding agent\n\n\n\n\n\n\n\n\n\n\n \n\n\n## What is Continue?\n\n> _Note: The `continuedev/continue` repository is no longer actively maintained and is read-only for all users._\n\nContinue is a coding agent available as a [CLI](#cli), [VS Code extension](#vs-code), and [JetBrains plugin](#jetbrains).\n\n## Documentation\n\nTo learn how to configure Continue, how it works, and how to customize it, check out the [Continue Docs](https://docs.continue.dev).\n\n## Final 2.0.0 Release\n\nWe polished Continue and did a final 2.0.0 release of the VS Code extension, CLI, and JetBrains plugin.\n\nThis included removing anonymous telemetry, pulling out authentication, squashing bugs, and more.\n\n### VS Code\n\n[](https://marketplace.visualstudio.com/items?itemName=Continue.continue) [](https://open-vsx.org/extension/Continue/continue) [](extensions/vscode)\n\n### CLI\n\n[](https://www.npmjs.com/package/@continuedev/cli) [](extensions/cli)\n\n### JetBrains\n\n> _Note: We recommend using the Continue CLI instead of the JetBrains plugin._\n\n[](https://github.com/continuedev/continue/releases) [](extensions/intellij)\n\n## Contributors\n\nThank you to the entire Continue community for helping us create a pioneering coding agent.\n\nWhat we built together pushed the boundaries of what AI developer tooling could be.\n\nWe hope this codebase continues to serve as a foundation for others.\n\n## Code friends\n\n\n \n\n\n## License\n\nApache 2.0 © 2023-2026 Continue Dev, Inc.\n
常见问题 (4)
故障排除为什么 Continue 在调用模型时显示 "Invalid URL" 错误?
通常的原因是 apiBase 值缺少 URL 协议。请使用完整的绝对 URL:
# 错误
apiBase: localhost:11434
# 正确
apiBase: http://localhost:11434
对于 HTTPS 或 OpenAI 兼容的提供商,请使用完整的基础路径,例如:
provider: openai
apiBase: https://aimoway.com/v1
apiKey: YOUR_API_KEY
model: your-model-name
对于本地 Ollama,通常可以省略 apiBase,让 Continue 使用其默认值。如果显式设置,请包含 http:// 或 https://。
如果模型来自 Continue hub,请检查诸如 ${{ secrets.MY_KEY }} 之类的密钥是否正确解析。配置中残留字面模板字符串意味着密钥缺失或命名错误。
代码修复还会通过前置 http:// 来规范化裸 apiBase 值,验证最终的 URL,报告提供商和无效值,并在 getMaxStopWords() 中防范 undefined 的 apiBase。如果仅更改配置无法解决问题,请将 Continue 更新到包含该修复的版本。
故障排除在通过 VS Code Remote-SSH 使用 ${env:OPENROUTER_API_KEY} 连接 OpenRouter 时,如何修复 Continue 的 401 "Missing Authentication header" 错误?
将运行在 Remote-SSH 主机上的 Continue 扩展升级到包含 YAML 环境占位符解析修复的版本,然后运行 "Developer: Reload Window" 或重启远程 VS Code 服务器。配置保持为 apiKey: ${env:OPENROUTER_API_KEY}。如果该变量仅在交互式 ~/.bashrc 中定义,即使集成终端和 curl 可以读取它,扩展宿主也可能无法继承它;在导出该变量后重启 VS Code 服务器,或从可获取该变量的登录会话重新连接。作为临时解决方法,可以直接在 config.yaml 中硬编码密钥,即 apiKey: sk-or-v1-...,升级后再将其移除。
故障排除如何修复 .continue/rules 中的 userRules 在 Continue CLI 系统提示词中出现两次的问题?
这是 Continue CLI 1.5.47 中的一个 bug:从 .continue/rules/*.md 加载的规则可能会同时从 config 和 markdown 规则来源被合并,导致整个 userRules 块被重复。请将 @continuedev/cli 升级到包含修复 fix(cli): dedupe userRules from config and markdown rule sources 的最新版本:
npm install -g @continuedev/cli@latest
continue --version
作为临时解决方案,请确保不要在 .continue/rules/*.md 和 config 的 userRules 中同时定义相同的规则;在安装升级后的 CLI 之前,只保留其中一个来源。
故障排除如何修复在 Continue 编辑模式中使用 Ollama 时出现的 "Token limit reached. File/range likely too large for this edit" 错误?
编辑模式(Ctrl+I)发送的是整个文件内容加上编辑提示模板,而不仅仅是您选中的部分,因此它比聊天模式消耗的 token 多得多。当 contextLength: 8192 时,即使是小文件也会达到上限。修复方法:
1. 在 config.yaml 中增大 contextLength(deepseek-r1 最高支持 128k):
defaultCompletionOptions:
contextLength: 327682. 关键:Ollama 会忽略此设置,
num_ctx 默认为 4096。需要按模型覆盖它:requestOptions:
extraBodyProperties:
options:
num_ctx: 32768或者在启动 Ollama 之前通过环境变量
OLLAMA_CONTEXT_LENGTH=32768 进行全局设置。3. 如果仍然失败,请在按 Ctrl+I 之前选择较小的代码范围,或将
edit 角色切换为具有更大原生上下文窗口的模型。
注意:增大上下文长度会增加 VRAM/RAM 使用量,因此如果 8b 模型变慢或出现 OOM,请将其调低。