/** * Live queue display — a bottom-anchored input box that stays visible * during streaming and tool execution, so the user can see what they're * typing into the queue (and erase it with backspace). * * The technique: ANSI DECSTBM (Set Top and Bottom Margins) reserves a * scrolling region above the last row. Streaming output scrolls in the * upper region; the bottom row is fixed and we redraw it on every * keystroke. * * Layout: * * ┌── upper scroll region (rows 1..N-1) ──┐ * │ │ * │ streamed model output writes here │ * │ scrolling naturally as text arrives │ * │ │ * ├── fixed bottom row (row N) ────────────┤ * │ ▶ queued: │ ← updated on each keystroke * └────────────────────────────────────────┘ * * Caveats: * - DECSTBM is widely supported (xterm, iTerm, Windows Terminal, * Alacritty, Kitty) but legacy ConHost has quirks. If activation * fails or the terminal isn't a TTY, we no-op. * - Terminal resize mid-stream isn't handled — the box stays at the * row we reserved. Acceptable trade-off; resize is rare mid-chain. * - Screen-reader mode skips this entirely — NVDA / JAWS read every * cursor move as fresh text, which makes a live-updating widget * much worse than a quiet one-line hint. */ /** * Begin reserving the bottom row + setting the scroll region. * Safe to call repeatedly; subsequent calls are no-ops. * Returns true if activation succeeded. */ export declare function activate(): boolean; /** * Update the input-box content. Call on every typed char (or * backspace) so the user sees their queue in real time. * * Truncates text to fit terminal width; if longer, shows the LAST * (cols-12) chars so the most-recent typing is always visible. */ export declare function update(text: string): void; /** * Tear down the box and restore the default scroll region. * Safe to call repeatedly; no-op when not active. * * Idempotency matters because we want this in `finally` blocks alongside * other cleanup that might also call it. */ export declare function deactivate(): void; /** Test helper / fallback: are we currently active? */ export declare function isActive(): boolean;