pub struct App {Show 24 fields
pub diff_data: DiffData,
pub ui_state: UiState,
pub highlight_cache: HighlightCache,
pub should_quit: bool,
pub event_tx: Option<Sender<Message>>,
pub debounce_handle: Option<JoinHandle<()>>,
pub input_mode: InputMode,
pub search_query: String,
pub active_filter: Option<String>,
pub semantic_groups: Option<Vec<SemanticGroup>>,
pub grouping_status: GroupingStatus,
pub grouping_handle: Option<JoinHandle<()>>,
pub llm_backend: Option<LlmBackend>,
pub llm_model: String,
pub focused_panel: FocusedPanel,
pub tree_state: RefCell<TreeState<TreeNodeId>>,
pub tree_filter: Option<HunkFilter>,
pub theme: Theme,
pub previous_head: Option<String>,
pub previous_file_hashes: HashMap<String, u64>,
pub git_diff_args: Vec<String>,
pub preview_mode: bool,
pub image_support: ImageSupport,
pub mermaid_cache: Option<MermaidCache>,
}Expand description
The main application state (TEA Model).
Fields§
§diff_data: DiffData§ui_state: UiState§highlight_cache: HighlightCache§should_quit: bool§event_tx: Option<Sender<Message>>Channel sender for spawning debounce timers that send DebouncedRefresh.
debounce_handle: Option<JoinHandle<()>>Handle to the current debounce timer task, if any.
input_mode: InputModeCurrent input mode (Normal or Search).
search_query: StringCurrent search query being typed.
active_filter: Option<String>The confirmed filter pattern (set on Enter in search mode).
semantic_groups: Option<Vec<SemanticGroup>>Semantic groups from LLM, if available. None = ungrouped.
grouping_status: GroupingStatusLifecycle state of the current grouping request.
grouping_handle: Option<JoinHandle<()>>Handle to the in-flight grouping task, for cancellation (ROB-05).
llm_backend: Option<LlmBackend>Which LLM backend is available (Claude preferred, Copilot fallback), if any.
llm_model: StringModel string resolved for the active backend.
focused_panel: FocusedPanelWhich panel currently has keyboard focus.
tree_state: RefCell<TreeState<TreeNodeId>>Persistent tree state for tui-tree-widget (RefCell for interior mutability in render).
tree_filter: Option<HunkFilter>When a group is selected in the sidebar, filter the diff view to those (file, hunk) pairs. Key = file path (stripped), Value = set of hunk indices (empty = all hunks).
theme: ThemeActive theme (colors + syntect theme name), derived from config at startup.
previous_head: Option<String>HEAD commit hash when current groups were computed. Used for incremental grouping.
previous_file_hashes: HashMap<String, u64>Per-file content hashes from the last grouping. Used to detect what changed.
git_diff_args: Vec<String>Git diff arguments from the CLI, used for refreshes.
preview_mode: boolWhether markdown preview mode is active (toggled with “p”).
image_support: ImageSupportWhether the terminal supports inline image rendering.
mermaid_cache: Option<MermaidCache>Mermaid diagram cache (only used when image_support == Supported).
Implementations§
Source§impl App
impl App
Sourcepub fn new(
diff_data: DiffData,
config: &Config,
git_diff_args: Vec<String>,
) -> Self
pub fn new( diff_data: DiffData, config: &Config, git_diff_args: Vec<String>, ) -> Self
Create a new App with parsed diff data, user config, and git diff arguments.
Sourcepub fn update(&mut self, msg: Message) -> Option<Command>
pub fn update(&mut self, msg: Message) -> Option<Command>
TEA update: dispatch message to handler, return optional command.
Sourcepub fn item_visual_rows(&self, item: &VisibleItem, width: u16) -> usize
pub fn item_visual_rows(&self, item: &VisibleItem, width: u16) -> usize
Calculate the visual row count for an item given the available width.
Sourcepub fn visible_items(&self) -> Vec<VisibleItem>
pub fn visible_items(&self) -> Vec<VisibleItem>
Compute the list of visible items respecting collapsed state, active filter, and hunk-level tree filter.
Sourcepub fn view(&self, frame: &mut Frame<'_>) -> Vec<PendingImage>
pub fn view(&self, frame: &mut Frame<'_>) -> Vec<PendingImage>
TEA view: delegate rendering to the UI module. Returns pending images that must be flushed after terminal.draw().
Auto Trait Implementations§
impl !Freeze for App
impl !RefUnwindSafe for App
impl Send for App
impl !Sync for App
impl Unpin for App
impl UnsafeUnpin for App
impl UnwindSafe for App
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more