diff options
| author | Adam Malczewski <[email protected]> | 2026-06-21 02:19:54 +0900 |
|---|---|---|
| committer | Adam Malczewski <[email protected]> | 2026-06-21 02:19:54 +0900 |
| commit | 232fa82154b4e1a0d870a1c297cf4f7eb2ea796d (patch) | |
| tree | 8fac351c1f5fa6e8a233bd732d543b2c99f44252 /src/features/chat/ports.ts | |
| parent | 83dd6624ba4e163ee0f72d25d97a48ad4f245791 (diff) | |
| download | dispatch-web-232fa82154b4e1a0d870a1c297cf4f7eb2ea796d.tar.gz dispatch-web-232fa82154b4e1a0d870a1c297cf4f7eb2ea796d.zip | |
feat(chat): message queue + steering — mid-turn injection at tool-result boundaries
Consume the message-queue + steering handoff ([email protected], [email protected]).
Re-pinned file: deps + re-mirrored .dispatch/*.reference.md.
- fold steering AgentEvent into the transcript as a provisional user bubble
(after the tool-result it followed; no de-dup — the queue surface carried it)
- add rendererId: "message-queue" custom renderer (pure parser + MessageQueueList)
rendered as a compact panel above the Composer (hidden when queue is empty)
- add ChatStore.queueMessage / AppStore.queueMessage — sends chat.queue WS op
(trim/validate non-empty; auto-starts a turn if idle)
- Composer switches to chat.queue while generating (button → Queue, placeholder
→ Steer the conversation...)
- exhaustiveness guards updated for steering + chat.queue
- carry-to-new-turn needs no special handling (normal new turn)
664 tests green.
Diffstat (limited to 'src/features/chat/ports.ts')
| -rw-r--r-- | src/features/chat/ports.ts | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/features/chat/ports.ts b/src/features/chat/ports.ts index f8c665f..ffe2c94 100644 --- a/src/features/chat/ports.ts +++ b/src/features/chat/ports.ts @@ -1,12 +1,17 @@ import type { + ChatQueueMessage, ChatSendMessage, ConversationHistoryResponse, ConversationMetricsResponse, } from "@dispatch/transport-contract"; -/** Injected transport port — sends chat messages to the server. */ +/** + * Injected transport port — sends chat messages to the server. Accepts both + * `chat.send` (start a turn) and `chat.queue` (enqueue a steering message; + * auto-starts a turn if idle). + */ export interface ChatTransport { - send(msg: ChatSendMessage): void; + send(msg: ChatSendMessage | ChatQueueMessage): void; } /** |
