/** * session-stream-pane.ts — Streaming token renderer component. * * Renders a live-updating conversation stream from session events, * with word wrapping, scrollback, and auto-scroll behaviour. * Follows the same patterns as ConversationViewer. */ import { type Component, type TUI } from "@mariozechner/pi-tui"; import type { SessionEventStream } from "../session-events.js"; import type { Theme } from "./agent-widget.js"; /** * Streaming conversation pane with scrollback. */ export declare class SessionStreamPane implements Component { private tui; private theme; private entries; private scrollOffset; private autoScroll; private unsubscribe; private lastInnerW; private closed; constructor(tui: TUI, events: SessionEventStream, theme: Theme, agentInfo: { type: string; description: string; }); /** * Handle an incoming session event and update display entries. */ private handleEvent; /** * Append text to the last assistant entry, or create a new one. */ private appendToLastAssistant; render(width: number): string[]; handleInput(data: string): void; invalidate(): void; dispose(): void; private viewportHeight; /** * Build rendered content lines from accumulated entries. */ private buildContentLines; }