Expand description
Input mode and prompt-input state for the Recursive TUI.
Contains the multi-mode input machinery: InputMode, the mutable
PromptInputState buffer, double-press tracking for Esc/Ctrl+C, and
history-ring management.
Structs§
- Double
Press Tracker - Tracks when the user last pressed Esc / Ctrl+C. Goal 147 maps a “double press within window” to a stronger action (real exit on the second Ctrl+C) while a single press triggers the context-dependent path (interrupt / clear buffer / pop modal).
- Prompt
Input State - Mutable state of the multi-mode prompt input.
Enums§
- Input
Mode - Which input mode the PromptInput is currently in.
Constants§
- DOUBLE_
PRESS_ WINDOW - Default window for double-press detection (Esc / Ctrl+C). The
runtime can override this via the
RECURSIVE_TUI_DOUBLE_MSenv var — seedouble_press_window. - HISTORY_
CAPACITY - Maximum number of history entries to retain in the ringbuffer.
Functions§
- double_
press_ window - Resolve the active double-press window. Reads
RECURSIVE_TUI_DOUBLE_MSonce per call (cheap; this is hit only on keypress) and falls back toDOUBLE_PRESS_WINDOWon parse failure. - strip_
history_ prefix