fix(server): suffix-fallback auto-named branches and rotate opencode waterfall
Auto-namer now probes refs/heads/<name> and appends -2, -3, … (up to 50) when the desired slug is taken, instead of failing with "branch already exists" and leaving the worktree on its placeholder name. Structured-generation waterfall replaces opencode/gpt-5-nano with opencode/minimax-m2.5-free and opencode/nemotron-3-super-free so users without nano configured fall through to free models they actually have.
This commit is contained in:
@@ -870,6 +870,10 @@ async function getWorktreePathForBranch(cwd: string, branchName: string): Promis
|
||||
}
|
||||
}
|
||||
|
||||
export async function localBranchExists(cwd: string, branchName: string): Promise<boolean> {
|
||||
return doesGitRefExist(cwd, `refs/heads/${branchName}`);
|
||||
}
|
||||
|
||||
export async function renameCurrentBranch(
|
||||
cwd: string,
|
||||
newName: string,
|
||||
|
||||
Reference in New Issue
Block a user