(localIds: string[], options?: { clearQueuedThinkingGrace?: boolean })
| 586 | } |
| 587 | |
| 588 | emitMessagesConsumed(localIds: string[], options?: { clearQueuedThinkingGrace?: boolean }): void { |
| 589 | if (localIds.length === 0) return |
| 590 | // `clearQueuedThinkingGrace` is an opt-in signal for the hub to drop |
| 591 | // the 15s queued-thinking grace immediately. Only synchronous handlers |
| 592 | // that will never call `onThinkingChange(true)` (slash commands handled |
| 593 | // inside `onUserMessage`) should set it — normal queue drains still |
| 594 | // need the grace so the spinner doesn't flicker between drain and |
| 595 | // backend.prompt start. |
| 596 | const payload: { sid: string; localIds: string[]; clearQueuedThinkingGrace?: boolean } = { |
| 597 | sid: this.sessionId, |
| 598 | localIds |
| 599 | } |
| 600 | if (options?.clearQueuedThinkingGrace) { |
| 601 | payload.clearQueuedThinkingGrace = true |
| 602 | } |
| 603 | this.socket.emit('messages-consumed', payload) |
| 604 | } |
| 605 | |
| 606 | sendSessionDeath(reason?: SessionEndReason): void { |
| 607 | void cleanupUploadDir(this.sessionId) |
no test coverage detected