import type { SessionManager } from "../../core/session-manager.js"; import type { CompletedItem } from "../app-items.js"; import type { TerminalHistoryContext } from "../terminal-history.js"; interface TranscriptHistoryItem { id: string; kind: string; } interface SessionStoreLike { history?: TItem[]; liveItems?: TItem[]; } interface TranscriptHistoryPrinter { print(items: readonly TItem[], context: TerminalHistoryContext, options?: { force?: boolean; write?: (data: string) => void; reason?: string; }): void; clear(): void; } interface UseTranscriptHistoryOptions { terminalHistoryPrinter?: TranscriptHistoryPrinter; terminalHistoryContext: TerminalHistoryContext; writeStdout: (data: string) => void; /** * Atomic scrollback enqueue (patched Ink `insertBeforeFrame`). Bytes passed * here are NOT written immediately — they are folded into the next Ink frame * write, so the live-frame shrink and the scrollback insert reach the * terminal in ONE write and the footer never jumps. Falls back to * `writeStdout` (erase frame → write → restore frame) when absent. */ enqueueStdout?: (data: string) => void; /** @deprecated Display projections are reconstructed from canonical messages. */ sessionPathRef?: React.RefObject; /** @deprecated Display projections are reconstructed from canonical messages. */ sessionManagerRef?: React.RefObject; /** @deprecated Display projections are no longer persisted. */ persistDisplayItem?: (item: TItem) => unknown; sessionStore?: SessionStoreLike; history: readonly TItem[]; setHistory: React.Dispatch>; setLiveItems: React.Dispatch>; compactHistoryItems?: (items: TItem[]) => TItem[]; trimFlushItems?: (items: TItem[]) => TItem[]; } export interface UseTranscriptHistoryResult { pendingHistoryFlushRef: React.RefObject; streamedAssistantFlushRef: React.RefObject<{ flushedChars: number; text: string; }>; printHistoryItems: (items: readonly TItem[], options?: { force?: boolean; reason?: string; }) => void; queueFlush: (items: TItem[]) => void; finalizeSubmittedUserItem: (item: TItem, deferredLiveItems?: readonly TItem[]) => void; clearPendingHistory: () => void; } export declare function useTranscriptHistory({ terminalHistoryPrinter, terminalHistoryContext, writeStdout, enqueueStdout, sessionStore, history, setHistory, setLiveItems, compactHistoryItems, trimFlushItems, }: UseTranscriptHistoryOptions): UseTranscriptHistoryResult; export {}; //# sourceMappingURL=useTranscriptHistory.d.ts.map