Skip to main content

Module app

Module app 

Source
Expand description

Application state for the Recursive TUI.

App owns everything visible to the user: the transcript blocks, the input buffer, the current screen, scroll position, and bookkeeping for streaming, usage, and per-turn timing.

This module contains only the struct definition and re-exports. Implementation is split across:

  • state — constructors, basic accessors, transcript mutation helpers
  • event_loophandle_ui_event + streaming helpers
  • commands — keyboard dispatch, modals, atfile, history search, permissions
  • render — standalone helper functions (preview_args, verb_for_tool, parse_*)

Re-exports§

pub use crate::tui::completion::collect_files;
pub use crate::tui::completion::default_offline_tool_catalog;
pub use crate::tui::completion::glob_workspace_files;
pub use crate::tui::completion::search_history;
pub use crate::tui::completion::MAX_ATFILE_SUGGESTIONS;
pub use crate::tui::completion::MAX_HSEARCH_RESULTS;
pub use crate::tui::cost::detect_model_name;
pub use crate::tui::cost::estimate_cost;
pub use crate::tui::cost::TurnState;
pub use crate::tui::cost::UsageStats;
pub use crate::tui::input_state::double_press_window;
pub use crate::tui::input_state::strip_history_prefix;
pub use crate::tui::input_state::DoublePressTracker;
pub use crate::tui::input_state::InputMode;
pub use crate::tui::input_state::PromptInputState;
pub use crate::tui::input_state::DOUBLE_PRESS_WINDOW;
pub use crate::tui::input_state::HISTORY_CAPACITY;
pub use crate::tui::model::AppScreen;
pub use crate::tui::model::DiffHunk;
pub use crate::tui::model::DiffLine;
pub use crate::tui::model::DiffLineKind;
pub use crate::tui::model::ToolResultData;
pub use crate::tui::model::TranscriptBlock;
pub use render::parse_apply_patch_input;
pub use render::parse_v4a_patch;
pub use render::preview_args;
pub use render::verb_for_tool;

Modules§

commands
Keyboard dispatch, modal handlers, @file autocomplete, history search, and slash-command execution.
event_loop
Event-loop reducers: handle_ui_event and streaming helpers.
render
Standalone helper functions for rendering / display.
state
Constructors, basic accessors and transcript-mutation helpers for App.

Structs§

App
PendingPermission
Holds the state for the permission-request modal while it is open. The reply sender is consumed exactly once when the user presses Y or N.