Skip to main content

Module tui_handlers

Module tui_handlers 

Source
Expand description

CLI handlers for TUI display server commands.

Supports: attach, new, list, detach, play.

The attach command connects to the TUI service, enters raw terminal mode, and forwards ANSI frames to stdout / stdin to the session. Other commands send single RPC requests and print the result.

Uses the generated TuiClient from services/generated.rs for typed RPC where codegen covers the method, and raw Cap’n Proto for UInt32 variants (list_windows, disconnect, etc.) that codegen doesn’t generate client methods for.

Functions§

create_tui_client
Create a TuiClient for RPC calls.
enter_raw_mode
Enter raw terminal mode. Returns the original termios for restoration.
forward_process_output
Forward process output to the TUI service via sendInput RPC calls.
handle_tui_attach
Attach to an existing TUI session.
handle_tui_detach
Detach from current TUI session.
handle_tui_list
List active TUI sessions.
handle_tui_new
Create a new TUI session.
handle_tui_play
Play an asciicast v2 recording in a TUI pane.
restore_terminal
Restore terminal to original mode.
terminal_size
Get the terminal size, defaulting to 80x24.