概述
Continue 是一款完全开源的 AI 编码插件,同时支持 VS Code 和整个 JetBrains 系列(IntelliJ、PyCharm、WebStorm 等)。其核心理念是"模型自由"——你可以接入 OpenAI、Anthropic、本地 Ollama 模型,甚至自托管的开源模型,构建完全私有可控的 AI 编码助手。它支持代码补全、聊天、代码编辑、@ 上下文引用等完整能力,是企业内网和数据敏感场景的首选。
核心特性:完全开源、模型自由、VS Code + JetBrains 双支持、可本地部署。
安装
Continue 从 IDE 扩展市场安装。VS Code 和 JetBrains 的安装步骤略有不同;安装后需要在配置文件中设置模型。
# === VS Code install ===
1. Open VS Code → Extensions panel (Cmd/Ctrl+Shift+X)
2. Search for "Continue" → install
# Or via command line:
code --install-extension Continue.continue
# === JetBrains install ===
1. Open the IDE → Settings → Plugins → Marketplace
2. Search for "Continue" → Install → restart
# === Configure models ===
# Config file location: ~/.continue/config.json (the .continue folder in your home directory)安装后侧边栏会出现 Continue 图标;首次打开会引导你配置第一个模型。
基 本用法
Continue 通过 config.json 配置。下面是一个接入 Claude 和本地 Ollama 模型的示例。配置完成后,用 Cmd/Ctrl+L 打开 Chat,Cmd/Ctrl+I 进行内联编辑,Tab 接受补全。
# ~/.continue/config.json example
{
"models": [
{
"title": "Claude Sonnet",
"provider": "anthropic",
"model": "claude-sonnet-4-5",
"apiKey": "your ANTHROPIC_API_KEY"
},
{
"title": "Local Llama",
"provider": "ollama",
"model": "llama3"
}
],
"tabAutocompleteModel": {
"title": "Local Llama",
"provider": "ollama",
"model": "deepseek-coder"
}
}
# Common shortcuts
Cmd/Ctrl + L # Open Chat
Cmd/Ctrl + I # Inline-edit the selected code
Tab # Accept completion本地模型需要先安装 Ollama(ollama.com)并拉取模型:ollama pull deepseek-coder
技巧
Continue 的最大价值在于数据隐私和成本控制:用本地 Ollama 模型做补全(免费、离线、代码不外泄),用云端 LLM 做复杂对话。@codebase 让 AI 搜索整个代码库;@docs 引用官方文档;自定义斜杠命令可将常用工作流固化。企业可自托管模型代理统一管理。
# Context references
"@codebase Where is the entry point of this project?"
"@docs Latest usage of React useState"
"@terminal How do I fix the error just now?"
# Custom slash commands (~/.continue/config.json)
"customCommands": [{
"name": "test",
"description": "Write tests for the selected code",
"prompt": "Write unit tests for the following code: {{{input}}}"
}]
# Use a local model for completion + a cloud model for chat
# tabAutocompleteModel uses ollama, models uses claude提示:本地补全模型推荐 deepseek-coder 或 starcoder2——体积小、速度快、质量好。
Configuration
Continue is configured through ~/.continue/config.json. The models array defines chat models (provider, model, apiKey), and tabAutocompleteModel sets the completion model. Supported providers include OpenAI, Anthropic, Ollama, and self-hosted endpoints. Custom slash commands codify reusable workflows. Local Ollama models give free, offline completion while a cloud LLM handles complex chat.
# ~/.continue/config.json
{
"models": [
{
"title": "Claude Sonnet",
"provider": "anthropic",
"model": "claude-sonnet-4-5",
"apiKey": "your ANTHROPIC_API_KEY"
},
{
"title": "Local Llama",
"provider": "ollama",
"model": "llama3"
}
],
"tabAutocompleteModel": {
"title": "Local Coder",
"provider": "ollama",
"model": "deepseek-coder"
},
"customCommands": [{
"name": "test",
"description": "Write tests for the selected code",
"prompt": "Write unit tests for: {{{input}}}"
}]
}
# Local model (free, offline completion)
ollama pull deepseek-coderUse a local Ollama model for completion (free, offline, no code leakage) and a cloud LLM for complex chat.
FAQ
Common questions cover data privacy, local models, provider support, cost, and @ context references. With a local Ollama model no code leaves your machine. Continue supports OpenAI, Anthropic, Google, Ollama, and self-hosted endpoints. @codebase searches the whole project and @docs references official docs.
Q: Is my code sent anywhere?
A: Only if you configure a cloud provider. With a local Ollama model,
completion runs entirely on your machine—no code leaves.
Q: Which providers are supported?
A: OpenAI, Anthropic, Google, Ollama, LM Studio, and any OpenAI-compatible
endpoint. Configure them in ~/.continue/config.json.
Q: How do I cut costs?
A: Use a local Ollama model for completion (free) and a cloud model only
for complex chat tasks.
Q: What do @ references do?
A: @codebase searches the whole project, @docs references official docs,
@file adds a specific file, @terminal references terminal output.
Q: Does it work in JetBrains IDEs?
A: Yes—Continue supports VS Code and the entire JetBrains suite
(IntelliJ, PyCharm, WebStorm, etc.).For local completion models, deepseek-coder or starcoder2 are recommended—small, fast, and good quality.
Ready to try Continue?
Visit the official site for the latest version and full documentation.
Visit Continue