pub struct App {Show 81 fields
pub messages: Vec<ChatMessage>,
pub input: String,
pub cursor_pos: usize,
pub input_selection: Option<(usize, usize)>,
pub scroll_offset: u32,
pub max_scroll: u32,
pub is_streaming: bool,
pub current_response: String,
pub current_thinking: String,
pub should_quit: bool,
pub mode: AppMode,
pub usage: TokenUsage,
pub model_name: String,
pub provider_name: String,
pub agent_name: String,
pub theme: Theme,
pub tick_count: u64,
pub layout: LayoutRects,
pub pending_tool_name: Option<String>,
pub pending_tool_input: String,
pub current_tool_calls: Vec<ToolCallDisplay>,
pub streaming_segments: Vec<StreamSegment>,
pub status_message: Option<StatusMessage>,
pub model_selector: ModelSelector,
pub agent_selector: AgentSelector,
pub command_palette: CommandPalette,
pub thinking_selector: ThinkingSelector,
pub session_selector: SessionSelector,
pub help_popup: HelpPopup,
pub streaming_started: Option<Instant>,
pub thinking_expanded: bool,
pub thinking_budget: u32,
pub auto_opened_thinking: bool,
pub thinking_collapse_at: Option<Instant>,
pub last_escape_time: Option<Instant>,
pub follow_bottom: bool,
pub paste_blocks: Vec<PasteBlock>,
pub attachments: Vec<ImageAttachment>,
pub conversation_title: Option<String>,
pub vim_mode: bool,
pub selection: TextSelection,
pub content_width: u16,
pub context_window: u32,
pub last_input_tokens: u32,
pub esc_hint_until: Option<Instant>,
pub todos: Vec<TodoItem>,
pub message_line_map: Vec<usize>,
pub tool_line_map: Vec<Option<(usize, usize)>>,
pub expanded_tool_calls: HashSet<(usize, usize)>,
pub context_menu: MessageContextMenu,
pub pending_question: Option<PendingQuestion>,
pub pending_permission: Option<PendingPermission>,
pub message_queue: VecDeque<QueuedMessage>,
pub history: Vec<String>,
pub history_index: Option<usize>,
pub history_draft: String,
pub skill_entries: Vec<(String, String)>,
pub custom_command_names: Vec<String>,
pub rename_input: String,
pub rename_visible: bool,
pub favorite_models: Vec<String>,
pub file_picker: FilePicker,
pub login_popup: LoginPopup,
pub welcome_screen: WelcomeScreen,
pub aside_popup: AsidePopup,
pub chips: Vec<InputChip>,
pub active_subagent: Option<SubagentState>,
pub background_subagents: Vec<BackgroundSubagentInfo>,
pub subagent_panel_expanded: bool,
pub render_dirty: bool,
pub render_cache: Option<RenderCache>,
pub message_cache: Option<MessageCache>,
pub segment_cache: Option<SegmentCache>,
pub tool_call_complete_ticks: HashMap<(usize, usize), u64>,
pub input_at_top: bool,
pub cached_model_groups: Option<Vec<(String, Vec<String>)>>,
pub model_fetch_rx: Option<Receiver<(Vec<(String, Vec<String>)>, String, String)>>,
pub cursor_shape: CursorShape,
pub cursor_blink: bool,
pub cursor_shape_normal: Option<CursorShape>,
pub cursor_blink_normal: Option<bool>,
}Fields§
§messages: Vec<ChatMessage>§input: String§cursor_pos: usize§input_selection: Option<(usize, usize)>§scroll_offset: u32§max_scroll: u32§is_streaming: bool§current_response: String§current_thinking: String§should_quit: bool§mode: AppMode§usage: TokenUsage§model_name: String§provider_name: String§agent_name: String§theme: Theme§tick_count: u64§layout: LayoutRects§pending_tool_name: Option<String>§pending_tool_input: String§current_tool_calls: Vec<ToolCallDisplay>§streaming_segments: Vec<StreamSegment>§status_message: Option<StatusMessage>§model_selector: ModelSelector§agent_selector: AgentSelector§command_palette: CommandPalette§thinking_selector: ThinkingSelector§session_selector: SessionSelector§help_popup: HelpPopup§streaming_started: Option<Instant>§thinking_expanded: bool§thinking_budget: u32§auto_opened_thinking: bool§thinking_collapse_at: Option<Instant>§last_escape_time: Option<Instant>§follow_bottom: bool§paste_blocks: Vec<PasteBlock>§attachments: Vec<ImageAttachment>§conversation_title: Option<String>§vim_mode: bool§selection: TextSelection§content_width: u16§context_window: u32§last_input_tokens: u32§esc_hint_until: Option<Instant>§todos: Vec<TodoItem>§message_line_map: Vec<usize>§tool_line_map: Vec<Option<(usize, usize)>>§expanded_tool_calls: HashSet<(usize, usize)>§pending_question: Option<PendingQuestion>§pending_permission: Option<PendingPermission>§message_queue: VecDeque<QueuedMessage>§history: Vec<String>§history_index: Option<usize>§history_draft: String§skill_entries: Vec<(String, String)>§custom_command_names: Vec<String>§rename_input: String§rename_visible: bool§favorite_models: Vec<String>§file_picker: FilePicker§login_popup: LoginPopup§welcome_screen: WelcomeScreen§aside_popup: AsidePopup§chips: Vec<InputChip>§active_subagent: Option<SubagentState>§background_subagents: Vec<BackgroundSubagentInfo>§subagent_panel_expanded: bool§render_dirty: bool§render_cache: Option<RenderCache>§message_cache: Option<MessageCache>§segment_cache: Option<SegmentCache>§tool_call_complete_ticks: HashMap<(usize, usize), u64>§input_at_top: bool§cached_model_groups: Option<Vec<(String, Vec<String>)>>§model_fetch_rx: Option<Receiver<(Vec<(String, Vec<String>)>, String, String)>>§cursor_shape: CursorShape§cursor_blink: bool§cursor_shape_normal: Option<CursorShape>§cursor_blink_normal: Option<bool>Implementations§
Source§impl App
impl App
pub fn new( model_name: String, provider_name: String, agent_name: String, theme_name: &str, vim_mode: bool, cursor_shape: CursorShape, cursor_blink: bool, cursor_shape_normal: Option<CursorShape>, cursor_blink_normal: Option<bool>, ) -> Self
pub fn mark_dirty(&mut self)
pub fn streaming_elapsed_secs(&self) -> Option<f64>
pub fn thinking_level(&self) -> ThinkingLevel
pub fn handle_agent_event(&mut self, event: AgentEvent)
pub fn take_input(&mut self) -> Option<String>
pub fn take_attachments(&mut self) -> Vec<ImageAttachment>
pub fn queue_input(&mut self) -> bool
pub fn input_height(&self, width: u16) -> u16
pub fn handle_paste(&mut self, text: String)
pub fn paste_block_at_cursor(&self) -> Option<usize>
pub fn delete_paste_block(&mut self, idx: usize)
pub fn chip_at_cursor(&self) -> Option<usize>
pub fn delete_chip(&mut self, idx: usize)
pub fn adjust_chips( &mut self, edit_start: usize, old_len: usize, new_len: usize, )
pub fn add_image_attachment(&mut self, path: &str) -> Result<(), String>
pub fn insert_file_reference(&mut self, path: &str)
pub fn display_cursor_pos(&self) -> usize
pub fn display_input(&self) -> String
pub fn scroll_up(&mut self, n: u32)
pub fn scroll_down(&mut self, n: u32)
pub fn scroll_to_top(&mut self)
pub fn scroll_to_bottom(&mut self)
pub fn clear_conversation(&mut self)
pub fn insert_char(&mut self, c: char)
pub fn delete_char_before(&mut self)
pub fn clear_input_selection(&mut self)
pub fn input_selection_range(&self) -> Option<(usize, usize)>
pub fn copy_input_selection(&self) -> Option<String>
pub fn delete_input_selection(&mut self) -> bool
pub fn select_left(&mut self)
pub fn select_right(&mut self)
pub fn select_home(&mut self)
pub fn select_end(&mut self)
pub fn select_all_input(&mut self)
pub fn move_cursor_left(&mut self)
pub fn move_cursor_right(&mut self)
pub fn move_cursor_home(&mut self)
pub fn move_cursor_end(&mut self)
pub fn delete_word_before(&mut self)
pub fn delete_to_end(&mut self)
pub fn delete_to_start(&mut self)
pub fn extract_selected_text(&self) -> Option<String>
pub fn move_cursor_up(&mut self) -> bool
pub fn move_cursor_down(&mut self) -> bool
pub fn history_prev(&mut self)
pub fn history_next(&mut self)
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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