前言
之前介绍了VS Code中的AI插件Cline与Roo Code,这两个都是根据给定一个任务,开始自动写代码的。除了这两个AI代码工具之外,在平常我还很喜欢的就是Continue 。
Continue 是领先的开源 AI 代码助手。你可以连接任何模型和任何上下文,在 VS Code 和 JetBrains 中构建自定义的自动完成功能和聊天体验。
GitHub地址:https://github.com/continuedev/continue

实践
在vs code安装continue插件:

配置模型,由于我硅基流动还有很多额度,没用完这里还是以硅基流动为例,目前硅基流动注册送14元不过期额度,够用一段时间的了,邀请链接:https://cloud.siliconflow.cn/i/Ia3zOSCU。如果你有其它的模型额度,就可以使用其它模型。

选择模型即可:

如果想添加列表没有的模型,可以直接在配置文件中写:

还可以配置tabAutocompleteModel,耗费token比较多,我一般都是关闭,之前使用的是DeepSeek的API,配置如下所示:

很久没用这个功能了,可能现在这样配置也不行了。
比较喜欢的两个功能是添加代码到聊天框与编辑模式。
将代码添加到聊天框
选中代码,使用ctrl+l:

比较适合于阅读源代码,有什么不理解的地方,直接问。
自动编辑模式
选中需要自动编辑的地方,使用ctrl+i:

比较适合于使用AI修复错误与使用AI在特定位置帮忙写代码。