[工具]vscode 使用AI 优化代码
选择的工具
这里面有copilot,但是我们本次是针对于dpsk的,如何优化我的一个函数.
功能/工具 | GitHub Copilot | Cody (Sourcegraph) | Codeium | Tabnine Pro | Continue |
---|---|---|---|---|---|
代码补全质量 | ⭐⭐⭐⭐⭐ | ⭐⭐⭐⭐ | ⭐⭐⭐⭐ | ⭐⭐⭐⭐ | ⭐⭐⭐⭐ |
代码优化能力 | ⭐⭐⭐⭐ | ⭐⭐⭐⭐⭐ | ⭐⭐⭐ | ⭐⭐⭐⭐ | ⭐⭐⭐⭐⭐ |
跨文件编码 | ⭐⭐⭐⭐ | ⭐⭐⭐⭐⭐ | ⭐⭐ | ⭐⭐⭐ | ⭐⭐⭐⭐⭐ |
上下文理解深度 | ⭐⭐⭐⭐ | ⭐⭐⭐⭐⭐ | ⭐⭐⭐ | ⭐⭐⭐ | ⭐⭐⭐⭐⭐ |
自定义模型支持 | ❌ | ✅ (DeepSeek等) | ✅ | ✅ | ✅ |
开源/可扩展性 | ❌ | ✅ | ❌ | ❌ | ✅ |
多语言支持 | 50+ | 30+ | 70+ | 40+ | 50+ |
响应速度 | 极快 | 快 | 快 | 极快 | 中等 |
价格 | $10/月 | 免费 | 免费 | $12/月 | 免费 |
最佳适用场景 | 通用开发 | 大型项目重构 | 快速编码 | 企业级开发 | 深度编码 |
总结推荐
对于您的需求(跨文件编码、深度优化、上下文理解),我强烈推荐:
首选方案:Continue + DeepSeek Coder
开源免费,支持128K上下文
深度跨文件协作能力
完美支持自定义提示和规则
备选方案:Cody (Sourcegraph)
强大的代码图谱分析
企业级重构能力
完全免费
vscode插件安装
添加模型
索引
设置说明
User settings
Show Session Tabs
Wrap Codeblocks
Show Chat Scrollbar
Text-to-Speech Output
Enable Session Titles
Format Markdown
Allow Anonymous Telemetry
Enable Indexing
Font Size
Multiline Autocompletions
Autocomplete Timeout (ms)
Autocomplete Debounce (ms)
Disable autocomplete in files
Experimental Settings
Auto-Accept Agent Edits
Add Current File by Default
Enable experimental tools
Only use system message tools
@Codebase: use tool calling only
用户设置 (User settings)
-
显示会话标签页 (Show Session Tabs)
- 控制是否在侧边栏显示历史会话标签
-
自动换行代码块 (Wrap Codeblocks)
- 长代码块自动换行显示,避免横向滚动
-
显示聊天滚动条 (Show Chat Scrollbar)
- 在聊天窗口显示滚动条
-
文本转语音输出 (Text-to-Speech Output)
- 将AI回复内容转为语音播报
-
启用会话标题 (Enable Session Titles)
- 为每个对话生成自动标题
-
格式化Markdown (Format Markdown)
- 自动美化Markdown格式的回复
-
允许匿名遥测 (Allow Anonymous Telemetry)
- 允许发送匿名使用数据帮助改进产品
-
启用索引 (Enable Indexing)
- 为代码库创建索引以增强理解能力
-
字体大小 (Font Size)
- 调整聊天窗口字体大小
-
多行自动补全 (Multiline Autocompletions)
- 启用多行代码建议而不仅是单行
-
自动补全超时(毫秒) (Autocomplete Timeout (ms))
- 设置等待AI响应的最长时间
-
自动补全防抖(毫秒) (Autocomplete Debounce (ms))
- 设置输入停止后触发补全的延迟时间
-
在特定文件中禁用自动补全 (Disable autocomplete in files)
- 为指定文件类型关闭AI补全功能
实验性设置 (Experimental Settings)
-
自动接受代理编辑 (Auto-Accept Agent Edits)
- 自动应用AI对代码的修改建议
-
默认添加当前文件 (Add Current File by Default)
- 对话时自动包含当前打开的文件作为上下文
-
启用实验性工具 (Enable experimental tools)
- 激活测试阶段的新功能模块
-
仅使用系统消息工具 (Only use system message tools)
- 限制只使用核心系统级功能
-
@代码库:仅使用工具调用 (@Codebase: use tool calling only)
- 当使用
@codebase
指令时,仅通过专用工具处理
- 当使用