diff --git a/src/cli.ts b/src/cli.ts index e7dde32..eb4b5d6 100755 --- a/src/cli.ts +++ b/src/cli.ts @@ -76,7 +76,7 @@ function fallbackBranchName(text: string): string { .replace(/[^a-z0-9\s-]/g, "") .trim() .split(/\s+/) - .slice(0, 5) + .slice(0, 2) .join("-") } @@ -99,8 +99,9 @@ async function branchFromPrompt(text: string): Promise { }, body: JSON.stringify({ model: "claude-haiku-4-5-20251001", - max_tokens: 30, - messages: [{ role: "user", content: `Generate a short git branch name (2-4 lowercase words, hyphen-separated, no slashes) for this task:\n\n${text}\n\nOutput ONLY the branch name, nothing else.` }], + max_tokens: 15, + temperature: 0, + messages: [{ role: "user", content: `Generate a 2-word git branch name (lowercase, hyphen-separated) for this task:\n\n${text}\n\nOutput ONLY the branch name, nothing else.` }], }), })