Simplify commit message prompts to single-line format
Change the commit message generation prompts from requesting
50/72-rule multi-line messages to single-line subjects only.
This avoids unnecessary body text in automated commits and
ensures the first line is always used via `.split("\n")[0]`.
This commit is contained in:
parent
4c1530760c
commit
1d7f60b50c
|
|
@ -97,10 +97,10 @@ async function squashCommit(branch: string, cwd: string): Promise<void> {
|
|||
if (diff.trim()) {
|
||||
const gen = await vm.claudePipe(
|
||||
diff,
|
||||
"write a commit message for these changes following the 50/72 rule: subject line ≤50 chars, blank line, body wrapped at 72 chars. the body should briefly explain what changed and why. output only the message, no quotes or extra text.",
|
||||
"write a single-line commit message for these changes, max 50 characters. no body, no blank line, just the subject. output only the message, no quotes or extra text.",
|
||||
)
|
||||
if (gen.exitCode === 0 && gen.stdout.trim()) {
|
||||
await git.commit(gen.stdout.trim(), cwd)
|
||||
await git.commit(gen.stdout.trim().split("\n")[0], cwd)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
|
@ -133,7 +133,7 @@ export async function saveChanges(worktree: string, branch: string, message?: st
|
|||
|
||||
const gen = await vm.claudePipe(
|
||||
diff,
|
||||
"write a commit message for these changes following the 50/72 rule: subject line ≤50 chars, blank line, body wrapped at 72 chars. the body should briefly explain what changed and why. output only the message, no quotes or extra text.",
|
||||
"write a single-line commit message for these changes, max 50 characters. no body, no blank line, just the subject. output only the message, no quotes or extra text.",
|
||||
)
|
||||
|
||||
if (gen.exitCode !== 0) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user