feat(maestro): rename a session from the web sidebar
Right-clicking a card opens a custom context menu (rename, spawn similar, kill). Rename swaps the name for an inline field; Enter commits, Escape and blur cancel. The tree stops rebuilding while the field is open, so a catalog delta cannot replace what is being typed into. Refs #125 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
bdeec6eff5
commit
43b90ccf0a
@@ -44,6 +44,20 @@ export async function createSession(req: CreateSessionRequest): Promise<Session>
|
||||
);
|
||||
}
|
||||
|
||||
/** Rename a session (#125). An empty name clears the custom one, so the card
|
||||
* falls back to the command. The daemon trims and caps what it stores and
|
||||
* broadcasts the update, so callers need not patch the store themselves. */
|
||||
export async function renameSession(id: Uuid, name: string): Promise<Session> {
|
||||
return jsonOrError(
|
||||
await fetch(routes.session(id), {
|
||||
method: "PATCH",
|
||||
credentials: "same-origin",
|
||||
headers: { "content-type": "application/json" },
|
||||
body: JSON.stringify({ name }),
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
export async function killSession(id: Uuid): Promise<void> {
|
||||
await jsonOrError(
|
||||
await fetch(routes.session(id), {
|
||||
|
||||
Reference in New Issue
Block a user