diff --git a/src/workspaces/officerdev/src/apps/Chat/EmbeddableChat/useEmbeddableChat.ts b/src/workspaces/officerdev/src/apps/Chat/EmbeddableChat/useEmbeddableChat.ts index 7dfe209c..012feec5 100644 --- a/src/workspaces/officerdev/src/apps/Chat/EmbeddableChat/useEmbeddableChat.ts +++ b/src/workspaces/officerdev/src/apps/Chat/EmbeddableChat/useEmbeddableChat.ts @@ -575,6 +575,10 @@ export function useEmbeddableChat(params: UseEmbeddableChatParams, onMessageComp }, [autoSend, isConnected, messages.length, input]); return { + // Surfaced so the composer can offer what only makes sense here. The Command HQ context is the one + // place a `handoff` watcher can be promised — see BackgroundJobDialog — and it was invisible to the + // composer, so the option was never rendered anywhere at all. + context: params.context, messages, historicalCount, streamingText, diff --git a/src/workspaces/officerdev/src/apps/Chat/components/InputArea.tsx b/src/workspaces/officerdev/src/apps/Chat/components/InputArea.tsx index 5eb20159..9e3b5e8c 100644 --- a/src/workspaces/officerdev/src/apps/Chat/components/InputArea.tsx +++ b/src/workspaces/officerdev/src/apps/Chat/components/InputArea.tsx @@ -173,6 +173,16 @@ export const InputArea = ({ manager }: InputAreaProps) => { open={jobDialogOpen} onOpenChange={setJobDialogOpen} cwd={cwd} + /* + `handoff` — exit, act, re-arm — is only offered inside a Command HQ commander, because it is a + promise the platform has to keep rather than only a sentence in the prompt. + + This prop was never passed by anybody, so `isCommander` defaulted to false everywhere and the + option was rendered NOWHERE — including in a commander, where the dialog's own code makes it the + default. The whole mechanism existed: the fire behaviour, the contract, `armWatcher` reaching the + server. Only the radio button was missing, so the feature looked unbuilt. + */ + isCommander={manager.context === 'command-hq'} onSubmit={(intent, preamble, armWatcher) => { // Claimed by the next job to start, which is how the preview tells this one apart from the // background jobs an agent starts on its own.