1export function resolveProjectThreadCreationBranch(input: {
2 readonly workspaceMode: "local" | "worktree";
3 readonly selectedBranch: string | null;
4 readonly currentCheckoutBranch: string | null;
5}): string | null {
6 if (input.selectedBranch !== null) {
7 return input.selectedBranch;
8 }
9 return input.workspaceMode === "local" ? input.currentCheckoutBranch : null;
10}