pub struct App {Show 18 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,
}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.
Implementations§
Source§impl App
impl App
Sourcepub fn new(diff_data: DiffData, config: &Config) -> Self
pub fn new(diff_data: DiffData, config: &Config) -> Self
Create a new App with parsed diff data and user config.
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.
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