feat(maestro): worktree on by default with new-or-existing branch picker (#61)
- toggle defaults on for any target the project scan reports (repo or worktree); only the free-text escape hatch pays for /api/gitroot - branch mode control switches between creating a new branch (named after the session name, as before) and picking an existing one from GET /api/branches; branches held by another worktree stay visible but disabled, labelled with that worktree's path - emits create_branch: false on the wire for existing-mode picks - branch-list load follows the form's ready/destroyed discipline so a late response cannot corrupt a rebuilt draft
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import * as routes from "./routes.js";
|
||||
import type {
|
||||
ApiError,
|
||||
Branches,
|
||||
CreateSessionRequest,
|
||||
DaemonInfo,
|
||||
DirListing,
|
||||
@@ -89,4 +90,11 @@ export async function fetchNames(count: number): Promise<NameBatch> {
|
||||
return jsonOrError(await fetch(url, { credentials: "same-origin" }));
|
||||
}
|
||||
|
||||
/** One repository's local branches, with worktree occupancy (#55). Empty for
|
||||
* a path outside any repo. Drives the spawn form's existing-branch picker. */
|
||||
export async function fetchBranches(path: string): Promise<Branches> {
|
||||
const url = routes.withPathQuery(routes.BRANCHES, path);
|
||||
return jsonOrError(await fetch(url, { credentials: "same-origin" }));
|
||||
}
|
||||
|
||||
export { eventsWsUrl } from "./routes.js";
|
||||
|
||||
Reference in New Issue
Block a user