import type { Component, EditorComponent, MarkdownTheme, TUI } from "@earendil-works/pi-tui"; import type { AgentSession } from "../../../core/agent-session.js"; import type { ReadonlyFooterDataProvider } from "../../../core/footer-data-provider.ts"; import { LiveChatEntriesController } from "./chat-message-renderer.ts"; import type { ChatSessionHostCommands, ChatSessionHostEntry, ChatSessionHostOpts, ChatSessionHostStyle, ChatSessionSubmitMode } from "./chat-session-host-types.ts"; import { ChatTranscriptComponent, type ChatTranscriptEntryLike, ScrollableComponentViewport } from "./chat-transcript.js"; import type { FooterComponent } from "./footer.ts"; export interface ChatSessionHostStateCallbacks { renderEntry: (state: ChatSessionHostState, entry: ChatSessionHostEntry) => Component; transcriptCacheKey: (state: ChatSessionHostState, entry: ChatSessionHostEntry, index: number) => string; } export declare class ChatSessionHostState { readonly style: ChatSessionHostStyle; readonly commands: ChatSessionHostCommands; readonly requestRender: (() => void) | undefined; readonly getAgentSession: (() => AgentSession | undefined) | undefined; readonly isStreamingOverride: (() => boolean) | undefined; readonly isPaused: (() => boolean) | undefined; readonly isDisabled: (() => boolean) | undefined; readonly isBashRunningOverride: (() => boolean) | undefined; readonly showWarning: ((message: string) => void) | undefined; readonly showStatus: ((message: string) => void) | undefined; readonly actions: Record void | Promise> | undefined; readonly getActionKeyDisplay: ((action: string) => string) | undefined; readonly getMarkdownTheme: (() => MarkdownTheme) | undefined; readonly getChatRenderSettings: ChatSessionHostOpts["getChatRenderSettings"]; readonly getCwd: (() => string) | undefined; readonly footerData: ReadonlyFooterDataProvider | undefined; readonly renderExtraEntry: ((entry: TExtraEntry) => Component) | undefined; readonly tui: TUI | undefined; footer: FooterComponent | undefined; footerNavigationActive: boolean; inputBuffer: string; transcript: ChatSessionHostEntry[]; extraEntries: TExtraEntry[]; statusMessage: string; /** Explicit diagnostics survive busy-state cleanup, but are not restored after later input. */ lastWarningMessage: string | undefined; isBashMode: boolean; localBashRunning: boolean; sdkBusy: boolean; /** Escape interrupt plus asynchronous workflow pause acknowledgement. */ interruptSettlement: Promise | undefined; /** Recorded pause failure consumed by the first submit after settlement. */ interruptFailureMessage: string | undefined; workingMessage: string | undefined; workingFrame: number; workingLifecycleActive: boolean; workingLifecycleGeneration: number; immediateEventRenderPending: boolean; disposed: boolean; pendingSteeringMessages: readonly string[]; pendingFollowUpMessages: readonly string[]; compactionQueuedMessages: readonly { text: string; mode: ChatSessionSubmitMode; }[]; /** True while compaction-queued messages are being sent one at a time. */ compactionFlushPending: boolean; /** Resolves the pending compaction-queue prompt when its run starts. */ compactionPromptStarted: (() => void) | undefined; compacting: boolean; /** Keeps input queued while automatic compaction hands off to a manual request. */ manualCompactionTakeoverPending: boolean; animationTimer: ReturnType | undefined; renderThrottleTimer: ReturnType | undefined; bodyViewport: ScrollableComponentViewport; transcriptComponent: ChatTranscriptComponent>; transcriptRenderSettingsKey: string; renderIdentityIds: WeakMap; /** Bumped when a rendered entry redraws itself (a tool renderer's `invalidate`), so its cached rows are rebuilt. */ entryRevisions: WeakMap; nextRenderIdentityId: number; liveChat: LiveChatEntriesController; editor: EditorComponent | undefined; optimisticUserSignatureCounts: Map; /** * Whether an assistant entry still streaming into a sticky-bottom body is * rendered as its tail alone. * * On by default: while the reader is following a live stream, the rows far * above the cursor cost layout work nobody is reading. */ streamingTailWindowEnabled: boolean; constructor(opts: ChatSessionHostOpts, callbacks: ChatSessionHostStateCallbacks); } //# sourceMappingURL=chat-session-host-state.d.ts.map