/** * Wrapper around terminal-model's StreamingTerminal that provides a virtual terminal buffer. * Interprets ANSI escape sequences (cursor movement, line clearing, etc.) to produce * the actual rendered output rather than raw intermediate states. * * This implementation preserves whitespace and blank lines by NOT calling trimStart(), * which was the bug in the previous xterm-based implementation. */ export declare class TerminalBuffer { private terminal; private allLines; constructor(_cols: number, _scrollback?: number); /** * Write raw data to the terminal buffer. * The terminal interprets all ANSI sequences automatically. */ write(data: string | Buffer): void; /** * Resize the terminal width. * terminal-model doesn't use column constraints, so this is a no-op for compatibility. */ resize(_cols: number): void; /** * Extract the rendered lines from the terminal buffer. * This returns the actual visible content after all ANSI sequences * have been processed, with color codes preserved. * * CRITICAL: Unlike the xterm implementation, we do NOT call trimStart(), * which preserves legitimate indentation and blank lines. */ getLines(): string[]; /** * Get the number of rendered lines. */ get lineCount(): number; /** * Clean up terminal resources. */ dispose(): void; }