diff --git a/apps/web/src/config.ts b/apps/web/src/config.ts index d9a2d8ae..b22dafba 100644 --- a/apps/web/src/config.ts +++ b/apps/web/src/config.ts @@ -510,6 +510,21 @@ export const wording = { review_artifact: (document?: string) => document ? `Asked for a review · ${document}` : "Asked for a review", } as Record string>, + /** A hand-off the hub refused, by tool name: who it did not start. */ + handoffRefused: { + deploy_writer: (document?: string) => + document + ? `Could not start the writer · ${document}` + : "Could not start the writer", + design_app: () => "Could not start the designer", + deploy_coder: () => "Could not start the app builder", + deploy_presenter: () => "Could not start the presenter", + instruct_coder: () => "Could not send the app builder a change", + review_artifact: (document?: string) => + document + ? `Could not ask for a review · ${document}` + : "Could not ask for a review", + } as Record string>, /** What a tool call is doing, by tool name, given its one identifying argument. */ tool: { read_file: (subject?: string) => @@ -708,6 +723,8 @@ export const wording = { timeout: "Not started — the go-ahead ran out of time", expired: "Not started — the go-ahead expired", }, + /** The hub refused the hand-off, so nothing started. */ + refused: "Not started", starting: "Starting…", /** At work before its run reports a step of its own. */ working: (subject: string) => `Working on ${subject}`, diff --git a/apps/web/src/pages/workspace/work-unit-view.tsx b/apps/web/src/pages/workspace/work-unit-view.tsx index 19e92a16..c3b6a746 100644 --- a/apps/web/src/pages/workspace/work-unit-view.tsx +++ b/apps/web/src/pages/workspace/work-unit-view.tsx @@ -109,6 +109,7 @@ function WorkLine({ return text.steps(text.done[dispatch.role](subject), steps); case "finished": case "failed": + if (dispatch.refused !== undefined) return text.refused; return text.steps(text.ended(subject), steps); } } diff --git a/apps/web/src/pages/workspace/work-unit.ts b/apps/web/src/pages/workspace/work-unit.ts index d82195ea..e131973b 100644 --- a/apps/web/src/pages/workspace/work-unit.ts +++ b/apps/web/src/pages/workspace/work-unit.ts @@ -200,7 +200,11 @@ export function workUnitMessage( !dispatch.pending && status.state !== "waiting" && status.state !== "declined"; - const handoff = wording.activity.handoff[dispatch.tool]; + const handoff = ( + dispatch.refused === undefined + ? wording.activity.handoff + : wording.activity.handoffRefused + )[dispatch.tool]; const parts: ConversationPart[] = [ { kind: "tool-trace",