Enqueue a message for the active session; flushed when activity returns to idle
(text: string, attachments?: PromptAttachment[])
| 1266 | |
| 1267 | /** Enqueue a message for the active session; flushed when activity returns to idle */ |
| 1268 | function enqueue(text: string, attachments?: PromptAttachment[]): void { |
| 1269 | const sid = rawState.activeSessionId; |
| 1270 | if (!sid) return; |
| 1271 | const current = rawState.queuedBySession[sid] ?? []; |
| 1272 | rawState.queuedBySession = { |
| 1273 | ...rawState.queuedBySession, |
| 1274 | [sid]: [...current, { text, attachments }], |
| 1275 | }; |
| 1276 | } |
| 1277 | |
| 1278 | async function abortCurrentPrompt(): Promise<void> { |
| 1279 | const sid = rawState.activeSessionId; |
no outgoing calls
no test coverage detected