pub struct AppState {Show 147 fields
pub text_area: TextArea,
pub text_area_state: TextAreaState,
pub cursor_visible: bool,
pub helpers: Vec<HelperCommand>,
pub show_helper_dropdown: bool,
pub helper_selected: usize,
pub helper_scroll: usize,
pub filtered_helpers: Vec<HelperCommand>,
pub filtered_files: Vec<String>,
pub file_search: FileSearch,
pub file_search_tx: Option<Sender<(String, usize)>>,
pub file_search_rx: Option<Receiver<FileSearchResult>>,
pub is_pasting: bool,
pub pasted_long_text: Option<String>,
pub pasted_placeholder: Option<String>,
pub pending_pastes: Vec<(String, String)>,
pub attached_images: Vec<AttachedImage>,
pub pending_path_start: Option<usize>,
pub interactive_commands: Vec<String>,
pub messages: Vec<Message>,
pub scroll: usize,
pub scroll_to_bottom: bool,
pub stay_at_bottom: bool,
pub content_changed_while_scrolled_up: bool,
pub message_lines_cache: Option<(Vec<Message>, usize, Vec<Line<'static>>)>,
pub collapsed_message_lines_cache: Option<(Vec<Message>, usize, Vec<Line<'static>>)>,
pub processed_lines_cache: Option<(Vec<Message>, usize, Vec<Line<'static>>)>,
pub show_collapsed_messages: bool,
pub collapsed_messages_scroll: usize,
pub collapsed_messages_selected: usize,
pub has_user_messages: bool,
pub per_message_cache: HashMap<Uuid, RenderedMessageCache>,
pub assembled_lines_cache: Option<(usize, Vec<Line<'static>>, u64)>,
pub visible_lines_cache: Option<VisibleLinesCache>,
pub cache_generation: u64,
pub render_metrics: RenderMetrics,
pub last_render_width: usize,
pub loading: bool,
pub loading_type: LoadingType,
pub spinner_frame: usize,
pub loading_manager: LoadingStateManager,
pub shell_popup_visible: bool,
pub shell_popup_expanded: bool,
pub shell_popup_scroll: usize,
pub shell_cursor_visible: bool,
pub shell_cursor_blink_timer: u8,
pub active_shell_command: Option<ShellCommand>,
pub active_shell_command_output: Option<String>,
pub waiting_for_shell_input: bool,
pub shell_tool_calls: Option<Vec<ToolCallResult>>,
pub shell_loading: bool,
pub shell_pending_command_value: Option<String>,
pub shell_pending_command_executed: bool,
pub shell_pending_command_output: Option<String>,
pub show_shell_mode: bool,
pub shell_mode_input: String,
pub is_tool_call_shell_command: bool,
pub ondemand_shell_mode: bool,
pub shell_pending_command: Option<String>,
pub shell_pending_command_output_count: usize,
pub shell_initial_prompt_shown: bool,
pub shell_command_typed: bool,
pub pending_bash_message_id: Option<Uuid>,
pub streaming_tool_results: HashMap<Uuid, String>,
pub streaming_tool_result_id: Option<Uuid>,
pub completed_tool_calls: HashSet<Uuid>,
pub is_streaming: bool,
pub latest_tool_call: Option<ToolCall>,
pub retry_attempts: usize,
pub max_retry_attempts: usize,
pub last_user_message_for_retry: Option<String>,
pub is_retrying: bool,
pub is_dialog_open: bool,
pub dialog_command: Option<ToolCall>,
pub dialog_selected: usize,
pub dialog_message_id: Option<Uuid>,
pub dialog_focused: bool,
pub approval_bar: ApprovalBar,
pub message_tool_calls: Option<Vec<ToolCall>>,
pub message_approved_tools: Vec<ToolCall>,
pub message_rejected_tools: Vec<ToolCall>,
pub toggle_approved_message: bool,
pub show_shortcuts: bool,
pub sessions: Vec<SessionInfo>,
pub session_selected: usize,
pub account_info: String,
pub session_tool_calls_queue: HashMap<String, ToolCallStatus>,
pub tool_call_execution_order: Vec<String>,
pub last_message_tool_calls: Vec<ToolCall>,
pub show_profile_switcher: bool,
pub available_profiles: Vec<String>,
pub profile_switcher_selected: usize,
pub current_profile_name: String,
pub profile_switching_in_progress: bool,
pub profile_switch_status_message: Option<String>,
pub show_rulebook_switcher: bool,
pub available_rulebooks: Vec<ListRuleBook>,
pub selected_rulebooks: HashSet<String>,
pub rulebook_switcher_selected: usize,
pub rulebook_search_input: String,
pub filtered_rulebooks: Vec<ListRuleBook>,
pub rulebook_config: Option<RulebookConfig>,
pub show_command_palette: bool,
pub command_palette_selected: usize,
pub command_palette_scroll: usize,
pub command_palette_search: String,
pub show_shortcuts_popup: bool,
pub shortcuts_scroll: usize,
pub shortcuts_popup_mode: ShortcutsPopupMode,
pub show_file_changes_popup: bool,
pub file_changes_selected: usize,
pub file_changes_scroll: usize,
pub file_changes_search: String,
pub current_message_usage: LLMTokenUsage,
pub total_session_usage: LLMTokenUsage,
pub context_usage_percent: u64,
pub secret_manager: SecretManager,
pub latest_version: Option<String>,
pub is_git_repo: bool,
pub auto_approve_manager: AutoApproveManager,
pub allowed_tools: Option<Vec<String>>,
pub agent_model: AgentModel,
pub llm_model: Option<LLMModel>,
pub auth_display_info: (Option<String>, Option<String>, Option<String>),
pub ctrl_c_pressed_once: bool,
pub ctrl_c_timer: Option<Instant>,
pub mouse_capture_enabled: bool,
pub terminal_size: Size,
pub shell_screen: Parser,
pub shell_scroll: u16,
pub shell_history_lines: Vec<Line<'static>>,
pub interactive_shell_message_id: Option<Uuid>,
pub shell_interaction_occurred: bool,
pub show_side_panel: bool,
pub side_panel_focus: SidePanelSection,
pub side_panel_section_collapsed: HashMap<SidePanelSection, bool>,
pub side_panel_areas: HashMap<SidePanelSection, Rect>,
pub session_id: String,
pub changeset: Changeset,
pub todos: Vec<TodoItem>,
pub task_progress: Option<TaskProgress>,
pub session_start_time: Instant,
pub side_panel_auto_shown: bool,
pub board_agent_id: Option<String>,
pub editor_command: String,
pub pending_editor_open: Option<String>,
pub billing_info: Option<BillingResponse>,
}Fields§
§text_area: TextArea§text_area_state: TextAreaState§cursor_visible: bool§helpers: Vec<HelperCommand>§show_helper_dropdown: bool§helper_selected: usize§helper_scroll: usize§filtered_helpers: Vec<HelperCommand>§filtered_files: Vec<String>§file_search: FileSearch§file_search_tx: Option<Sender<(String, usize)>>§file_search_rx: Option<Receiver<FileSearchResult>>§is_pasting: bool§pasted_long_text: Option<String>§pasted_placeholder: Option<String>§pending_pastes: Vec<(String, String)>§attached_images: Vec<AttachedImage>Images attached via pasted file paths (and future clipboard image support).
pending_path_start: Option<usize>§interactive_commands: Vec<String>§messages: Vec<Message>§scroll: usize§scroll_to_bottom: bool§stay_at_bottom: bool§content_changed_while_scrolled_up: bool§message_lines_cache: Option<(Vec<Message>, usize, Vec<Line<'static>>)>§collapsed_message_lines_cache: Option<(Vec<Message>, usize, Vec<Line<'static>>)>§processed_lines_cache: Option<(Vec<Message>, usize, Vec<Line<'static>>)>§show_collapsed_messages: bool§collapsed_messages_scroll: usize§collapsed_messages_selected: usize§has_user_messages: bool§per_message_cache: HashMap<Uuid, RenderedMessageCache>Per-message rendered line cache for efficient incremental rendering
assembled_lines_cache: Option<(usize, Vec<Line<'static>>, u64)>Assembled lines cache (the final combined output of all message lines) Format: (cache_key, lines, generation_counter)
visible_lines_cache: Option<VisibleLinesCache>Cache for visible lines on screen (avoids cloning on every frame)
cache_generation: u64Generation counter for assembled cache (increments on each rebuild)
render_metrics: RenderMetricsPerformance metrics for render operations
last_render_width: usizeLast width used for rendering (to detect width changes)
loading: bool§loading_type: LoadingType§spinner_frame: usize§loading_manager: LoadingStateManager§shell_popup_visible: bool§shell_popup_expanded: bool§shell_popup_scroll: usize§shell_cursor_visible: bool§shell_cursor_blink_timer: u8§active_shell_command: Option<ShellCommand>§active_shell_command_output: Option<String>§waiting_for_shell_input: bool§shell_tool_calls: Option<Vec<ToolCallResult>>§shell_loading: bool§shell_pending_command_value: Option<String>§shell_pending_command_executed: bool§shell_pending_command_output: Option<String>§show_shell_mode: bool§shell_mode_input: String§is_tool_call_shell_command: bool§ondemand_shell_mode: bool§shell_pending_command: Option<String>§shell_pending_command_output_count: usize§shell_initial_prompt_shown: boolTracks if the initial shell prompt has been shown (before command is typed)
shell_command_typed: boolTracks if the command has been typed into the shell (after initial prompt)
pending_bash_message_id: Option<Uuid>§streaming_tool_results: HashMap<Uuid, String>§streaming_tool_result_id: Option<Uuid>§completed_tool_calls: HashSet<Uuid>§is_streaming: bool§latest_tool_call: Option<ToolCall>§retry_attempts: usize§max_retry_attempts: usize§last_user_message_for_retry: Option<String>§is_retrying: bool§is_dialog_open: bool§dialog_command: Option<ToolCall>§dialog_selected: usize§dialog_message_id: Option<Uuid>§dialog_focused: bool§approval_bar: ApprovalBar§message_tool_calls: Option<Vec<ToolCall>>§message_approved_tools: Vec<ToolCall>§message_rejected_tools: Vec<ToolCall>§toggle_approved_message: bool§show_shortcuts: bool§sessions: Vec<SessionInfo>§session_selected: usize§account_info: String§session_tool_calls_queue: HashMap<String, ToolCallStatus>§tool_call_execution_order: Vec<String>§last_message_tool_calls: Vec<ToolCall>§show_profile_switcher: bool§available_profiles: Vec<String>§profile_switcher_selected: usize§current_profile_name: String§profile_switching_in_progress: bool§profile_switch_status_message: Option<String>§show_rulebook_switcher: bool§available_rulebooks: Vec<ListRuleBook>§selected_rulebooks: HashSet<String>§rulebook_switcher_selected: usize§rulebook_search_input: String§filtered_rulebooks: Vec<ListRuleBook>§rulebook_config: Option<RulebookConfig>§show_command_palette: bool§command_palette_selected: usize§command_palette_scroll: usize§command_palette_search: String§show_shortcuts_popup: bool§shortcuts_scroll: usize§shortcuts_popup_mode: ShortcutsPopupMode§show_file_changes_popup: bool§file_changes_selected: usize§file_changes_scroll: usize§file_changes_search: String§current_message_usage: LLMTokenUsage§total_session_usage: LLMTokenUsage§context_usage_percent: u64§secret_manager: SecretManager§latest_version: Option<String>§is_git_repo: bool§auto_approve_manager: AutoApproveManager§allowed_tools: Option<Vec<String>>§agent_model: AgentModel§llm_model: Option<LLMModel>§auth_display_info: (Option<String>, Option<String>, Option<String>)Auth display info: (config_provider, auth_provider, subscription_name) for local providers
ctrl_c_pressed_once: bool§ctrl_c_timer: Option<Instant>§mouse_capture_enabled: bool§terminal_size: Size§shell_screen: Parser§shell_scroll: u16§shell_history_lines: Vec<Line<'static>>§interactive_shell_message_id: Option<Uuid>§shell_interaction_occurred: bool§show_side_panel: bool§side_panel_focus: SidePanelSection§side_panel_section_collapsed: HashMap<SidePanelSection, bool>§side_panel_areas: HashMap<SidePanelSection, Rect>Stores the screen area for each side panel section to handle mouse clicks
session_id: StringCurrent session ID for backup paths
changeset: Changeset§todos: Vec<TodoItem>§task_progress: Option<TaskProgress>Task progress (completed/total checklist items)
session_start_time: Instant§side_panel_auto_shown: bool§board_agent_id: Option<String>Agent board ID for task tracking (from AGENT_BOARD_AGENT_ID or created)
editor_command: StringExternal editor command (vim, nvim, or nano)
pending_editor_open: Option<String>Pending file to open in editor (set by handler, consumed by event loop)
billing_info: Option<BillingResponse>Billing info for the side panel
Implementations§
Source§impl AppState
impl AppState
pub fn get_helper_commands() -> Vec<HelperCommand>
pub fn new(options: AppStateOptions<'_>) -> Self
pub fn update_session_empty_status(&mut self)
pub fn input(&self) -> &str
pub fn cursor_position(&self) -> usize
pub fn set_input(&mut self, input: &str)
pub fn set_cursor_position(&mut self, pos: usize)
pub fn insert_char(&mut self, c: char)
pub fn insert_str(&mut self, s: &str)
pub fn clear_input(&mut self)
Sourcepub fn is_input_blocked(&self) -> bool
pub fn is_input_blocked(&self) -> bool
Check if user input should be blocked (during profile switch)
pub fn run_shell_command( &mut self, command: String, input_tx: &Sender<InputEvent>, )
pub fn poll_file_search_results(&mut self)
pub fn auto_show_side_panel(&mut self)
Auto Trait Implementations§
impl !Freeze for AppState
impl !RefUnwindSafe for AppState
impl Send for AppState
impl !Sync for AppState
impl Unpin for AppState
impl UnwindSafe for AppState
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request