Continue VS Code 插件配置
免费开源 AI 编程插件,支持所有主流模型
步骤 1:输入 API Key
在 OpenCodex 平台获取你的 API Key
格式:sk-live-xxxxxxxxxxxx
步骤 2:选择模型
选择最适合你需求的 AI 模型
步骤 3:获取配置文件
{
"models": [
{
"title": "OpenCodex API",
"provider": "openai",
"model": "deepseek-chat",
"apiKey": "sk-live-your-api-key-here",
"apiBase": "https://opencodex.hk/api/v1"
}
],
"slashCommands": [
{
"name": "edit",
"description": "Edit selected code"
},
{
"name": "comment",
"description": "Add comments to selected code"
}
]
}
提示
在 VS Code 中按 Cmd/Ctrl + Shift + P,输入 "Continue: Open config.json"
安装步骤
# 1. 安装 Continue 插件
# VS Code: 扩展商店搜索 "Continue"
# 或使用命令行: code --install-extension continue.continue
# 2. 打开 Continue 配置
# Cmd/Ctrl + Shift + P → "Continue: Open config.json"
# 3. 粘贴上方配置
# 保存文件
# 4. 测试连接
# 按 Cmd/Ctrl + L 打开 Continue
# 输入 "测试连接"
功能特点
代码补全
智能代码补全和自动完成
代码解释
选中代码,AI 自动解释逻辑
代码生成
根据注释生成完整代码
代码重构
AI 帮你优化和重构代码
