Simplify branch name generation to use first two words instead of truncating at 20 chars

This commit is contained in:
Chris Wanstrath 2026-02-19 10:59:07 -08:00
parent d4a3053bd7
commit c5f376d797

View File

@ -75,9 +75,9 @@ function branchFromPrompt(text: string): string {
.toLowerCase()
.replace(/[^a-z0-9\s-]/g, "")
.trim()
.replace(/\s+/g, "-")
.slice(0, 20)
.replace(/-$/, "")
.split(/\s+/)
.slice(0, 2)
.join("-")
}
program