首先是針對我個人的需求:
可直接在VS Code中使用,不需要打開外部頁面。
對話方面,只需要基本的AI聊天,不需要直接生成項目文件或修改代碼。
支持代碼補全,類似VSCode中的GitHub Copilot插件。
------------------
文章中涉及到的工具網址/詳細說明文檔,會放在文章末尾
首先插件選擇上,肯定是需要能自定義模型的插件;中間踩過的插件就不多說了,這類插件也算比較多,但往往都要麼只能用預設的模型,要麼需要購買插件開發方的tokens,要麼不支持代碼補全;從個人使用上來說,肯定用一個平臺的API同時實現2個需求是最好的。
歐克,說回正題
我使用的是SiliconFlow接口;在VSCode上插件中搜索“Continue”,安裝;安裝完成後,Continue插件圖標會出現在左側側邊欄;第一次點擊圖標會出現個選擇的彈窗,不用管,關閉就好:

Continue插件
建議拖動圖標到右側側邊欄:

暫時先不管左下角馬賽克處
然後點擊右上角的小齒輪進入json配置,主要看“models”和“tabAutocompleteModel”這兩項即可:

點擊打開config.json配置文件

models & tabAutocompleteModel
首先是“models”選項:

models配置(8000改成5000)
其次是“tabAutocompleteModel”選項:

tabAutocompleteModel配置
插件默認的代碼補全響應延時是350毫秒,所以需要接口回覆速度快;因為目前DeepSeek不穩定,所以我這裡用的Qwen。
配置完成後回到插件聊天窗口,會出現配置的模型列表;選擇,並進行測試:

選擇模型

聊天-成功
然後再來測測代碼補全,在文件中輸入註釋,然後回車,可以看到補全的內容,Tab應用:

補全-成功
還有其它功能以及官方提供的完整的config.json可在文末點擊鏈接前往
最後,感謝大佬們能看到最後,孩子想嫖點tokens,
咱能各嫖14r(2000萬)的tokens
------------------
如果可以的話,註冊SilicoFlow時候可以填寫註冊碼:kmd0XeKX
或者使用鏈接註冊:https://cloud.siliconflow.cn/i/kmd0XeKX
------------------
Continue官方文檔:https://www.continue.dev/
Continue完整config.json配置:https://docs.continue.dev/reference
SilicoFlow官網:https://siliconflow.cn/zh-cn/