Skip to content

Feat/settings command#422

Open
lyw405 wants to merge 3 commits into
neovateai:masterfrom
lyw405:feat/settings-command
Open

Feat/settings command#422
lyw405 wants to merge 3 commits into
neovateai:masterfrom
lyw405:feat/settings-command

Conversation

@lyw405

@lyw405 lyw405 commented Nov 12, 2025

Copy link
Copy Markdown
Contributor

改动说明

新增 /setting 命令,提供GUI配置界面,方便通过交互式菜单修改配置。

主要变更

1. 新增 /setting 命令 (598行)

  • 分类菜单:Model & Reasoning、Preferences、Integrations
  • 支持ESC返回上级菜单
  • 保存后自动刷新配置

2. 新增配置项

config.ts 中添加8个配置项:

  • reasoningLevel: 推理级别 (disabled/low/medium/high)
  • completionSound: 完成提示音
  • playSounds: 播放时机 (always/when-focused/when-unfocused)
  • showTips: 是否显示提示
  • diffDisplayMode: Diff显示模式 (github/unified)
  • respectGitignore: 文件选择器是否尊重 .gitignore
  • theme: 主题 (dark/light)
  • autoConnectIDE: 是否自动连接IDE

3. 配置验证机制

新增 ENUM_CONFIG_KEYS 常量,为枚举配置提供运行时验证:

  • setConfig 时检查值是否有效
  • 包含 approvalModeoutputFormat 等已有枚举的验证
  • 提供清晰的错误提示

测试

  • TypeScript类型检查通过
  • 代码格式化通过
  • 与上游master分支同步

Closes #386

- Add /setting slash command with GUI interface
- Add new configuration options for reasoning, sound, theme, etc
- Add runtime validation for enum config values

Closes neovateai#386
@lyw405
lyw405 force-pushed the feat/settings-command branch 2 times, most recently from 784590c to 326a3a9 Compare November 12, 2025 09:01
- Replace 'any' types with specific types (Config, string | boolean)
- Fix import order according to project standards
- Fix unused parameter warning by prefixing with underscore
- Format code according to Biome standards
@sorrycc

sorrycc commented Nov 24, 2025

Copy link
Copy Markdown
Member

基本功能没问题,有些功能我们还没有做,我会找时间在这个 pr 的基础上继续调整。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request]: Add /setting

2 participants