import type { AssistantMessage } from "@kolisachint/hoocode-ai"; import { Container, type MarkdownTheme } from "@kolisachint/hoocode-tui"; /** * How a thinking block renders. * * `omit` exists for radar. Folding a trace to its one-line label is right when * the label sits between things you can see; under a chain summary it is not, * because a message whose only content is thinking plus tool calls has nothing * left on screen once its calls collapse into the chain's row. A stack of * `Thinking...` lines under a one-line summary is precisely the noise radar * exists to remove. */ export type ThinkingDisplay = "full" | "label" | "omit"; /** * Split markdown into chunks at blank-line boundaries where each chunk lexes * independently to the same blocks the whole text would. Prefix-stable: * appending text never changes earlier boundaries (decisions depend only on * preceding fence parity and the lines adjacent to each gap), so during * streaming every chunk except the last is byte-identical across updates and * its Markdown render cache keeps hitting. Exported for tests. */ export declare function segmentStreamingMarkdown(text: string): string[]; /** * Component that renders a complete assistant message */ export declare class AssistantMessageComponent extends Container { private contentContainer; private thinkingDisplay; private markdownTheme; private hiddenThinkingLabel; private lastMessage?; private hasToolCalls; private markdownCache; constructor(message?: AssistantMessage, thinkingDisplay?: ThinkingDisplay, markdownTheme?: MarkdownTheme, hiddenThinkingLabel?: string); invalidate(): void; private reuseMarkdown; /** Set when the current children include streaming segments; the next * non-streaming (final/rebuild) render purges their cache entries. */ private hasSegmentedBlocks; /** * Add one markdown content block. Large blocks still being streamed are * segmented at stable boundaries so only the tail chunk re-parses per * update; every earlier chunk is byte-stable and stays cached. The final * (non-streaming) render collapses back to one canonical Markdown, so any * segmentation artifact is transient by construction. */ private addMarkdownBlock; setThinkingDisplay(display: ThinkingDisplay): void; /** Whether a content block puts anything on screen under the current settings. */ private isVisibleBlock; setHiddenThinkingLabel(label: string): void; /** OSC-zone wrap memo: Container.render returns the same array across * frames when nothing changed, so it must not be mutated — the wrapped * copy is cached keyed on the source array's identity. */ private zoneMemo?; render(width: number): string[]; updateContent(message: AssistantMessage, streaming?: boolean): void; } //# sourceMappingURL=assistant-message.d.ts.map