Skip to main content

Module live_terminal

Module live_terminal 

Source
Expand description

Live terminal emulator for piloting interactive TUIs, backed by the vt100 crate.

Unlike the hand-rolled [crate::state::terminal::Screen] (a buffer that grows on every linefeed), this models a fixed viewport of rows lines with proper scrolling — the model a real terminal uses. Inline TUIs that redraw by moving the cursor up and rewriting with erase-line (the agy / Antigravity CLI, which renders in the main screen rather than the alternate one) consolidate cleanly here instead of stacking ghost frames. See the inline_redraw_* test for the exact regression this fixes.

Only the live PTY tap uses this. One-shot rendering of finished command output (render_terminal_output) stays on the growing-buffer Screen, which is the right model there: it must keep every line of output, not clip to a viewport.

Structs§

LiveTerminal
A continuously-fed terminal emulator with a fixed viewport. Wraps a vt100::Parser and exposes just what the PTY live tap needs.

Enums§

ScreenUpdate
What changed on the live screen since the client last looked. Lets status_check ship only the delta when piloting a TUI over many polls — far fewer tokens than re-sending the whole frame each time.