点击插件按钮,或执行 waxy-rice ai git commit: Generate Commit Message。
检查生成结果,直接提交。
适合这些场景
想让提交历史更统一、更像一个专业项目。
不想每次都手写 feat、fix、refactor 这些提交类型。
团队要求 Conventional Commits,但成员习惯不完全一致。
经常需要根据较长 diff 总结提交意图。
使用 DeepSeek、OpenAI 兼容网关、自建模型服务或公司内部代理。
默认生成风格
插件默认会要求模型:
使用你配置的输出语言。
首行简洁明确,建议不超过 72 个字符。
复杂变更可以追加简短正文。
只输出 commit message 本身,不输出解释、Markdown 或代码块。
使用 Conventional Commits 规范。
示例:
feat(settings): mask configured API key in settings view
Show a placeholder when an API key is already stored and avoid
overwriting the saved secret when the placeholder is submitted.
主要配置
配置项
默认值
说明
aiGitCommit.apiBaseUrl
https://api.deepseek.com/v1
OpenAI 兼容 API 地址
aiGitCommit.endpointPath
/chat/completions
Chat Completions 接口路径
aiGitCommit.model
deepseek-v4-flash
请求使用的模型
aiGitCommit.outputLanguage
zh-CN
生成提交信息的语言提示
aiGitCommit.prompt
内置中文模板
自定义提交信息提示词
aiGitCommit.includeUntracked
true
是否读取未跟踪文件预览
aiGitCommit.updateScmInput
true
是否写入 Source Control 输入框
aiGitCommit.customHeaders
{}
附加请求头
aiGitCommit.customBody
{}
附加请求体,可覆盖默认参数
API Key 与安全
推荐通过 waxy-rice ai git commit: Open Settings 填写 API Key。插件会使用 VS Code SecretStorage 保存密钥。
如果已经配置过 API Key,设置页会显示 ************************,不会把真实密钥回显到界面中。需要替换密钥时,点击输入框并输入新值即可。
命令
命令
作用
waxy-rice ai git commit: Open Settings
打开插件设置页
waxy-rice ai git commit: Generate Commit Message
根据当前 Git 变更生成提交信息
更多
npm install
npm run compile
npx @vscode/vsce package
Press F5 in VS Code to launch an Extension Development Host, then run: