DeepSeek FIM Completion
中文使用说明
DeepSeek FIM Completion 为 VS Code 提供 DeepSeek Fill-in-the-Middle 行内补全。
快速开始
- 运行
DeepSeek FIM: Set API Key,填入 DeepSeek API Key。
- 运行
DeepSeek FIM: Check API Connection 检查连接状态。
- 运行
DeepSeek FIM: Select Model,从 DeepSeek 返回的模型列表中选择模型。
- 在编辑器中使用
Ctrl+Alt+Space 手动触发补全。
API Key 使用 VS Code SecretStorage 保存,键名为 deepseekFim.apiKey。它不会写入 settings.json、工作区文件或插件包。
常用命令
DeepSeek FIM: Set API Key: 保存 API Key。
DeepSeek FIM: Clear API Key: 清除 API Key。
DeepSeek FIM: Check API Connection: 检查 API 是否可用。
DeepSeek FIM: Refresh Available Models: 刷新可用模型列表。
DeepSeek FIM: Select Model: 从返回的模型列表中选择补全模型。
DeepSeek FIM: Trigger Completion: 手动触发 FIM 补全。
DeepSeek FIM: Configure Completion Keybinding: 修改手动触发快捷键。
DeepSeek FIM: Enable Automatic Completion: 开启自动补全。
DeepSeek FIM: Disable Automatic Completion: 关闭自动补全。
DeepSeek FIM: Toggle Automatic Completion: 切换自动补全状态。
快捷键
默认手动触发快捷键:
- Windows/Linux:
Ctrl+Alt+Space
- macOS:
Cmd+Alt+Space
如需修改,运行 DeepSeek FIM: Configure Completion Keybinding。
状态栏
右下角状态栏会显示当前状态:
- key 图标:未设置 API Key。
- spinning sync 图标:正在检查连接、获取模型或发送补全请求。
- check 图标:API 连接正常。
- blocked 图标:本次请求没有返回补全内容。
- error 图标:连接或补全请求失败。
点击状态栏项可以重新检查 API 连接。
配置项
deepseekFim.apiBaseUrl: FIM 请求地址,默认 https://api.deepseek.com/beta。
deepseekFim.modelsBaseUrl: 模型列表请求地址,默认 https://api.deepseek.com。
deepseekFim.model: 当前使用的模型,默认 deepseek-v4-pro。
deepseekFim.automaticEnabled: 是否开启自动补全,默认 false。
deepseekFim.debounceMs: 自动补全防抖时间,默认 500。
deepseekFim.includeFileExtensions: 启用补全的文件后缀,默认 [ "*" ]。
deepseekFim.excludeFileExtensions: 排除补全的文件后缀,默认 []。
deepseekFim.maxPrefixChars: 发送给 FIM 的光标前上下文长度,默认 6000。
deepseekFim.maxSuffixChars: 发送给 FIM 的光标后上下文长度,默认 2000。
deepseekFim.maxTokens: 最大补全 token 数,默认 64。
deepseekFim.temperature: 采样温度,默认 0。
English Usage
DeepSeek FIM Completion provides DeepSeek Fill-in-the-Middle inline completions for VS Code.
Quick Start
- Run
DeepSeek FIM: Set API Key and enter your DeepSeek API key.
- Run
DeepSeek FIM: Check API Connection to verify the connection.
- Run
DeepSeek FIM: Select Model and choose a model from the list returned by DeepSeek.
- Use
Ctrl+Alt+Space in the editor to manually trigger completion.
The API key is stored in VS Code SecretStorage as deepseekFim.apiKey. It is not written to settings.json, workspace files, or the extension package.
Commands
DeepSeek FIM: Set API Key: Save the API key.
DeepSeek FIM: Clear API Key: Clear the API key.
DeepSeek FIM: Check API Connection: Check whether the API is reachable.
DeepSeek FIM: Refresh Available Models: Refresh the available model list.
DeepSeek FIM: Select Model: Select a completion model from the returned model list.
DeepSeek FIM: Trigger Completion: Manually trigger FIM completion.
DeepSeek FIM: Configure Completion Keybinding: Change the manual trigger keybinding.
DeepSeek FIM: Enable Automatic Completion: Enable automatic completion.
DeepSeek FIM: Disable Automatic Completion: Disable automatic completion.
DeepSeek FIM: Toggle Automatic Completion: Toggle automatic completion.
Keybinding
Default manual trigger:
- Windows/Linux:
Ctrl+Alt+Space
- macOS:
Cmd+Alt+Space
To change it, run DeepSeek FIM: Configure Completion Keybinding.
Status Bar
The status bar item on the lower right shows the current state:
- key icon: API key is missing.
- spinning sync icon: checking connection, fetching models, or sending a completion request.
- check icon: API connection is healthy.
- blocked icon: the latest request returned no completion.
- error icon: connection or completion request failed.
Click the status bar item to check the API connection again.
Settings
deepseekFim.apiBaseUrl: FIM request base URL. Default: https://api.deepseek.com/beta.
deepseekFim.modelsBaseUrl: model-list base URL. Default: https://api.deepseek.com.
deepseekFim.model: selected model. Default: deepseek-v4-pro.
deepseekFim.automaticEnabled: enable automatic completion. Default: false.
deepseekFim.debounceMs: debounce delay for automatic completion. Default: 500.
deepseekFim.includeFileExtensions: included file extensions. Default: [ "*" ].
deepseekFim.excludeFileExtensions: excluded file extensions. Default: [].
deepseekFim.maxPrefixChars: prefix context length sent to FIM. Default: 6000.
deepseekFim.maxSuffixChars: suffix context length sent to FIM. Default: 2000.
deepseekFim.maxTokens: maximum completion tokens. Default: 64.
deepseekFim.temperature: sampling temperature. Default: 0.
| |