feat: 拆分评审与提交消息提示词并增加 hook 备份与 JSON 输出
- 新增 custom_reviewer_prompt 和 custom_commit_msg_prompt,兼容旧 custom_prompt - pre-commit hook 安装时备份已有 hook,卸载时恢复 - 支持 --format json 输出评审结果 - diff 发送前自动脱敏敏感信息
This commit is contained in:
1 parent
39c58316a5
commit
b04d70b99a
18 files changed
+637
-45
No files matched your search
+1
-1
@@ -87,7 +87,7 @@ var msgCmd = &cobra.Command{
|
||||
fmt.Printf("\033[1;36m[git-air]\033[0m 正在生成 Conventional Commit Message... \033[0;90m(Language: %s / Engine: %s)\033[0m\n", langDesc, cfg.Model)
|
||||
fmt.Println("\033[0;90m" + strings.Repeat("─", 65) + "\033[0m")
|
||||
|
||||
commitMsg, err := rev.GenerateCommitMsg(ctx, diff, lang)
|
||||
commitMsg, err := rev.GenerateCommitMsg(ctx, diff, lang, cfg.CustomCommitMsgPrompt)
|
||||
if err != nil {
|
||||
ui.PrintError("生成 Commit Message 失败: %v", err)
|
||||
return
|
||||
|
||||
Reference in new issue
Block a user