跳转到内容

配置指南

飞码扣提供多种配置选项,让您自定义使用体验。

飞码扣设置通过 VS Code 标准设置系统管理。

  1. Ctrl+,(Mac 上按 Cmd+,
  2. 搜索 “飞码” 或 “Feima”
  3. 所有飞码扣设置都以 feima. 为前缀

或使用命令面板:

  1. Ctrl+Shift+P(Mac 上按 Cmd+Shift+P
  2. 输入 “Preferences: Open Settings (JSON)“

类型: string 默认值: "https://auth.feimacode.cn" 作用域: machine-overridable(机器可覆盖)

OAuth2 认证服务器基础 URL。覆盖区域默认值。

说明:

  • 用于 OAuth2 认证流程
  • 默认值适用于中国区
  • 仅在调试或使用自定义认证服务器时修改

示例:

{
"feima.auth.baseUrl": "https://auth.feimacode.cn"
}

类型: string 默认值: "https://api.feimacode.cn/v1" 作用域: machine-overridable(机器可覆盖)

模型推理 API 服务器基础 URL。覆盖区域默认值。

说明:

  • 用于所有 AI 模型请求
  • 默认值适用于中国区
  • 仅在调试或使用自定义 API 服务器时修改

示例:

{
"feima.api.baseUrl": "https://api.feimacode.cn/v1"
}

类型: string 默认值: "vscode-feima-client" 作用域: machine-overridable(机器可覆盖)

用于认证的 OAuth2 客户端 ID。覆盖区域默认值。

说明:

  • OAuth2 客户端标识符
  • 默认值适用于标准飞码扣客户端
  • 仅在调试或使用自定义客户端时修改

示例:

{
"feima.auth.clientId": "vscode-feima-client"
}

类型: string 默认值: "https://auth.feimacode.cn" 作用域: machine-overridable(机器可覆盖)

OAuth2 发行者 URL。覆盖区域默认值。

说明:

  • JWT token 发行者验证
  • 默认值适用于中国区
  • 仅在调试或使用自定义认证服务器时修改

示例:

{
"feima.auth.issuer": "https://auth.feimacode.cn"
}

类型: string 默认值: "https://feimacode.cn/promotion" 作用域: machine-overridable(机器可覆盖)

额度促销页面 URL。余额不足时显示。

说明:

  • 当额度不足时,用户可访问此页面获取更多额度
  • 默认值适用于中国区
  • 仅在调试或使用自定义促销页面时修改

示例:

{
"feima.promotionUrl": "https://feimacode.cn/promotion"
}

类型: boolean 默认值: true 作用域: window(窗口)

在状态栏显示剩余请求配额。

说明:

  • 启用时,状态栏显示剩余请求次数
  • 禁用时,状态栏仅显示登录状态
  • 建议保持启用以监控额度使用

示例:

{
"feima.showQuotaInStatusBar": true
}

类型: number 默认值: 50 作用域: window(窗口)

当剩余请求少于此数量时显示警告。

说明:

  • 当剩余请求次数低于此阈值时,显示警告通知
  • 默认值为 50 次
  • 可根据使用频率调整

示例:

{
"feima.warnWhenQuotaLow": 100
}

应用于所有 VS Code 工作区。存储在全局设置文件中。

位置:

  • Windows: %APPDATA%\Code\User\settings.json
  • macOS: ~/Library/Application Support/Code/User/settings.json
  • Linux: ~/.config/Code/User/settings.json

仅应用于当前工作区。存储在项目根目录的 .vscode/settings.json 中。

示例:

{
"feima.showQuotaInStatusBar": true,
"feima.warnWhenQuotaLow": 30
}

{
"feima.auth.baseUrl": "http://localhost:8000",
"feima.api.baseUrl": "http://localhost:8001/v1",
"feima.showQuotaInStatusBar": true
}
{
"feima.auth.baseUrl": "https://auth.feimacode.cn",
"feima.api.baseUrl": "https://api.feimacode.cn/v1",
"feima.showQuotaInStatusBar": true,
"feima.warnWhenQuotaLow": 50
}
{
"feima.showQuotaInStatusBar": false
}
{
"feima.warnWhenQuotaLow": 200
}

为不同工作流创建多个配置文件:

{
"feima.showQuotaInStatusBar": true,
"feima.warnWhenQuotaLow": 50
}
{
"feima.auth.baseUrl": "http://localhost:8000",
"feima.api.baseUrl": "http://localhost:8001/v1",
"feima.showQuotaInStatusBar": true
}

注意: 以 .local.json 结尾的设置文件默认被 gitignore。


您也可以通过命令面板配置飞码扣:

  1. Ctrl+Shift+P
  2. 输入 “飞码: 登录”
  3. 浏览器将打开认证页面
  1. Ctrl+Shift+P
  2. 输入 “飞码: 注销”
  3. 当前会话将被注销
  1. Ctrl+Shift+P
  2. 输入 “飞码: 查看账号”
  3. 显示当前账号信息和剩余额度

  1. 检查 settings.json 是否有语法错误
  2. 验证设置名称是否正确(区分大小写)
  3. 检查 VS Code 输出面板是否有错误消息
  4. 尝试重新加载 VS Code 窗口

如果工作区设置和用户设置冲突:

  • 工作区设置优先
  • 检查两个位置的设置

要重置所有飞码设置:

  1. 打开设置(JSON)
  2. 删除所有 feima.* 条目
  3. 重新加载 VS Code 窗口(Ctrl+Shift+P → “Developer: Reload Window”)

仅在开发或调试时使用:

{
"feima.auth.baseUrl": "http://localhost:8000",
"feima.auth.issuer": "http://localhost:8000",
"feima.auth.clientId": "dev-client"
}

仅在开发或调试时使用:

{
"feima.api.baseUrl": "http://localhost:8001/v1"
}

与团队共享飞码配置:

  1. .vscode/settings.json 提交到仓库
  2. 在 README 中记录重要设置
  3. 使用工作区设置进行项目特定配置

注意: 不要提交 .vscode/settings.local.json 或包含敏感信息的文件。


Whether to show the Feima status bar item displaying your account and remaining requests.

Example:

{
"feima.showStatusBar": false
}

Type: boolean Default: true

Whether to automatically refresh your access token when it expires.

Example:

{
"feima.autoRefreshToken": false
}

Type: boolean Default: false

Enable detailed debug logging in the Output panel.

Example:

{
"feima.enableDebugLogging": true
}

Type: number Default: 30000

Request timeout in milliseconds. Increase if you’re experiencing timeouts.

Example:

{
"feima.requestTimeout": 60000
}

Type: number Default: 3

Maximum number of retry attempts for failed requests.

Example:

{
"feima.maxRetries": 5
}

Apply to all VS Code workspaces. Stored in your global settings file.

Location:

  • Windows: %APPDATA%\Code\User\settings.json
  • macOS: ~/Library/Application Support/Code/User/settings.json
  • Linux: ~/.config/Code/User/settings.json

Apply only to the current workspace. Stored in .vscode/settings.json in your project root.

Example:

{
"feima.defaultModel": "deepseek-coder-v2",
"feima.enableDebugLogging": true
}
{
"feima.defaultModel": "claude-3.5-sonnet",
"feima.enableDebugLogging": true,
"feima.showStatusBar": true
}
{
"feima.defaultModel": "tongyi-qianwen-3-coder"
}
{
"feima.defaultModel": "gpt-4o",
"feima.maxRetries": 2
}
{
"feima.defaultModel": "gemini-1.5-pro",
"feima.requestTimeout": 60000
}

Create multiple configuration files for different workflows:

{
"feima.defaultModel": "deepseek-coder-v2",
"feima.showStatusBar": true
}
{
"feima.defaultModel": "gpt-4o",
"feima.enableDebugLogging": true
}

Note: Settings files ending in .local.json are gitignored by default.

You can also configure Feima Copilot via command palette commands:

  1. Press Ctrl+Shift+P
  2. Type “Feima: Select Default Model”
  3. Choose from the available models
  1. Press Ctrl+Shift+P
  2. Type “Feima: Toggle Status Bar”
  3. Status bar visibility will be toggled
  1. Press Ctrl+Shift+P
  2. Type “Feima: Toggle Debug Logging”
  3. Debug logging will be toggled
  1. Check for syntax errors in settings.json
  2. Verify setting names are correct (case-sensitive)
  3. Check VS Code Output for errors
  4. Try restarting VS Code

If workspace and user settings conflict:

  • Workspace settings take precedence
  • Check both locations for the setting

To reset all Feima settings:

  1. Open Settings (JSON)
  2. Remove all feima.* entries
  3. Reload VS Code window (Ctrl+Shift+P → “Developer: Reload Window”)

Define custom aliases for frequently used models (planned feature):

{
"feima.modelAliases": {
"code": "deepseek-coder-v2",
"review": "claude-3.5-sonnet",
"chinese": "tongyi-qianwen-3-coder"
}
}

Configure different models for different file types (planned feature):

{
"feima.modelsByFiletype": {
"typescript": "claude-3.5-sonnet",
"python": "gpt-4o",
"markdown": "tongyi-qianwen-3-coder"
}
}

To share your Feima configuration with your team:

  1. Commit .vscode/settings.json to your repository
  2. Document any important settings in your README
  3. Use workspace settings for project-specific configuration

Note: Never commit .vscode/settings.local.json or files containing sensitive information.