/** * Message queueing for the interactive mode. * * Owns the compaction queue (messages typed while a compaction is running) and * the pending-messages display above the editor. The session owns the live * steering / follow-up queues; this controller merges them with the compaction * queue for display, restores everything back into the editor on demand, and * flushes the compaction queue once compaction finishes. Extracted from * interactive-mode.ts behind a narrow MessageQueueControllerDeps interface. */ import { type Container, type EditorComponent } from "@kolisachint/hoocode-tui"; import type { AgentSession } from "../../core/agent-session.js"; /** The slice of the interactive mode the message queue needs. */ export interface MessageQueueControllerDeps { /** The active session (read at call time; the session can be swapped). */ get session(): AgentSession; /** The prompt editor (read at call time; the editor can be swapped). */ getEditor(): EditorComponent; /** Container that renders the queued-message list above the editor. */ pendingMessagesContainer: Container; showStatus(message: string): void; showError(errorMessage: string): void; } export declare class MessageQueueController { private readonly deps; private compactionQueuedMessages; constructor(deps: MessageQueueControllerDeps); private get session(); private get editor(); /** Drop the compaction queue without restoring it (session switch/reset). */ resetCompactionQueue(): void; private getAllQueuedMessages; /** * Clear all queued messages and return their contents. * Clears both session queue and compaction queue. */ private clearAllQueues; updatePendingMessagesDisplay(): void; restoreQueuedMessagesToEditor(options?: { abort?: boolean; currentText?: string; }): number; queueCompactionMessage(text: string, mode: "steer" | "followUp"): void; isExtensionCommand(text: string): boolean; flushCompactionQueue(options?: { willRetry?: boolean; }): Promise; } //# sourceMappingURL=message-queue-controller.d.ts.map