Clean up auto branch rename settings (#3378)

Co-authored-by: Orca <help@stably.ai>
This commit is contained in:
Brennan Benson
2026-05-30 12:44:04 -07:00
committed by GitHub
co-authored by Orca
parent 4ea2eae432
commit e4ac0df51d
22 changed files with 816 additions and 327 deletions
+4 -9
View File
@@ -33,7 +33,7 @@ function limitSection(value: string, maxChars: number): string {
export function buildCommitMessagePrompt(
context: CommitMessageDraftContext,
customInstructions: string
customPrompt: string
): string {
const patch = truncateDiffForPrompt(context.stagedPatch)
const base = [
@@ -58,16 +58,11 @@ export function buildCommitMessagePrompt(
'```'
].join('\n')
const trimmedInstructions = customInstructions.trim()
if (!trimmedInstructions) {
const trimmedPrompt = customPrompt.trim()
if (!trimmedPrompt) {
return base
}
return [
base,
'',
'Additional instructions from user:',
limitSection(trimmedInstructions, 4_000)
].join('\n')
return [base, '', 'Additional user prompt:', limitSection(trimmedPrompt, 4_000)].join('\n')
}
export function splitGeneratedCommitMessage(message: string): GeneratedCommitMessage {