feat(ai): 支持 AI 生成提交信息并重构设置中心 - #26
Merged
Merged
Conversation
新增服务商与模型管理、受保护的本机密钥存储、生成偏好及草稿撤销和过期结果保护。整合布局与版本更新设置,补充暂存差异、提交字面值和桌面回归验证。 Closes #21
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景与结果
原先提交信息需手工填写,“设置”仅打开版本更新弹窗。现在可在摘要输入框点击星光按钮,根据当前仓库的已暂存改动生成摘要和描述,支持编辑、撤销、取消与重试,再由用户主动提交。独立设置中心统一管理 AI 服务商、提交生成偏好、布局与版本更新。
变更类型
关联 Issue
Closes #21
变更内容
界面前后对比
原设置入口:版本更新弹窗(复用仓库内 Issue #13 的历史验收截图)。
当前设置中心:
提交生成与撤销:
提交生成偏好:
模型编辑与窄窗口:
验证
2026-09-16 在 macOS arm64、Node.js 25.5.0、Electron 44.2.0 上重新执行:
npm run desktop:buildnpm test -w webnpm test -w server -- --runInBand --testPathPatterns='ai|git.service|new-file-deletion|repository|app.controller|connection.service'npm test -w @remote-git/ssh-clientcd apps/desktop && node scripts/smoke.mjsgit diff --cached --check完整验证记录与桌面单元测试命令 包含既有浏览器验收、模型编辑/删除场景和截图;本次 PR 准备复用了这些浏览器记录。
已知验证限制:完整服务端 Jest 的 4 个未改动脚手架测试此前因缺少依赖注入 mock 失败;完整桌面单元测试中的既有 macOS 原生 DMG 安装集成测试此前超时。本次未重跑上述已知失败项,不将完整套件或真实 DMG 升级记为通过。未验证真实商业模型账号、Windows/Linux 原生密钥存储与安装包、Windows 远程实际提交;模型协议由隔离模拟服务覆盖。
兼容性与风险
ai-settings.json;独立服务另存ai-master-key。无数据库迁移,配置损坏不会阻止 Git 工作区启动。独立服务密钥保护依赖本机账户和文件权限;备份时需同时保管配置与密钥文件。basic_text回退;Windows/Linux 原生保护仍需对应平台验证。使用方式见 AI 设置文档。
提交前检查
设计文档(Wiki)
设计与方案 · 实现与验收
设计、历史验收记录及配套截图/附件已归档至 Wiki(迁移清单,Issue #25)。历史测试结果与未验证项保持原记录,后续文档在 Wiki 维护。