pub struct App {Show 53 fields
pub messages: Vec<ChatMessage>,
pub input: String,
pub cursor_pos: usize,
pub scroll_offset: u16,
pub max_scroll: u16,
pub scroll_position: f64,
pub scroll_velocity: f64,
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 error_message: Option<String>,
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 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 visual_lines: Vec<String>,
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 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,
}Fields§
§messages: Vec<ChatMessage>§input: String§cursor_pos: usize§scroll_offset: u16§max_scroll: u16§scroll_position: f64§scroll_velocity: f64§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>§error_message: Option<String>§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§last_escape_time: Option<Instant>§follow_bottom: bool§paste_blocks: Vec<PasteBlock>§attachments: Vec<ImageAttachment>§conversation_title: Option<String>§vim_mode: bool§selection: TextSelection§visual_lines: Vec<String>§content_width: u16§context_window: u32§last_input_tokens: u32§esc_hint_until: Option<Instant>§todos: Vec<TodoItem>§message_line_map: Vec<usize>§pending_question: Option<PendingQuestion>§pending_permission: Option<PendingPermission>§message_queue: VecDeque<QueuedMessage>§history: Vec<String>§history_index: Option<usize>§history_draft: StringImplementations§
Source§impl App
impl App
pub fn new( model_name: String, provider_name: String, agent_name: String, theme_name: &str, vim_mode: bool, context_window: u32, ) -> 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) -> 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 add_image_attachment(&mut self, path: &str) -> Result<(), String>
pub fn display_input(&self) -> String
pub fn scroll_up(&mut self, n: u16)
pub fn scroll_down(&mut self, n: u16)
pub fn scroll_to_top(&mut self)
pub fn scroll_to_bottom(&mut self)
pub fn scroll_frac(&self) -> f64
pub fn animate_scroll(&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 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