Stop background tasks separately from chat turns

Keep Esc and /stop scoped to the foreground turn while exposing an explicit stop-tasks operation for supported chat backends. Add the protocol, server routing, app command, and coverage for task stopping and unsupported harnesses.
This commit is contained in:
2026-11-13 16:47:41 +00:00
parent c3c2c1bbc9
commit 2a182d7f17
19 changed files with 331 additions and 2 deletions
+3 -2
View File
@@ -262,8 +262,9 @@ type Message struct {
// body names the session like ChatQuery. A chat_prompt response sets
// ChatQueued when the prompt had to wait for an in-flight turn and was
// accepted into the session's queue instead of being sent immediately.
ChatSubscribe *ChatQuery `json:"chat_subscribe,omitempty"`
ChatQueued bool `json:"chat_queued,omitempty"`
ChatSubscribe *ChatQuery `json:"chat_subscribe,omitempty"`
ChatQueued bool `json:"chat_queued,omitempty"`
ChatStopTasks *ChatStopTasksResult `json:"chat_stop_tasks,omitempty"`
// ChatSteered means the prompt was handed to the turn already running; its
// reply is that turn's continuing output.
ChatSteered bool `json:"chat_steered,omitempty"`