pub struct App {Show 40 fields
pub state: AppState,
pub textarea: TextArea<'static>,
pub input: String,
pub messages: Vec<String>,
pub logs: Vec<String>,
pub show_logs: bool,
pub selected_model: usize,
pub available_models: Vec<ModelConfig>,
pub error_message: Option<String>,
pub debug_messages: bool,
pub message_scroll: ScrollState,
pub log_scroll: ScrollState,
pub scroll_position: usize,
pub last_query_time: Instant,
pub last_message_time: Instant,
pub use_agent: bool,
pub agent: Option<Agent>,
pub tokio_runtime: Option<Runtime>,
pub agent_progress_rx: Option<Receiver<String>>,
pub api_key: Option<String>,
pub current_working_dir: Option<String>,
pub command_mode: bool,
pub available_commands: Vec<SpecialCommand>,
pub selected_command: usize,
pub show_command_menu: bool,
pub permission_required: bool,
pub pending_tool: Option<PendingToolExecution>,
pub tool_permission_status: ToolPermissionStatus,
pub tool_execution_in_progress: bool,
pub show_intermediate_steps: bool,
pub show_shortcuts_hint: bool,
pub show_detailed_shortcuts: bool,
pub cursor_position: usize,
pub tasks: Vec<Task>,
pub current_task_id: Option<String>,
pub task_scroll: ScrollState,
pub task_scroll_position: usize,
pub conversation_summaries: Vec<ConversationSummary>,
pub session_manager: Option<SessionManager>,
pub session_id: String,
}Fields§
§state: AppState§textarea: TextArea<'static>§input: String§messages: Vec<String>§logs: Vec<String>§show_logs: bool§selected_model: usize§available_models: Vec<ModelConfig>§error_message: Option<String>§debug_messages: bool§message_scroll: ScrollState§log_scroll: ScrollState§scroll_position: usize§last_query_time: Instant§last_message_time: Instant§use_agent: bool§agent: Option<Agent>§tokio_runtime: Option<Runtime>§agent_progress_rx: Option<Receiver<String>>§api_key: Option<String>§current_working_dir: Option<String>§command_mode: bool§available_commands: Vec<SpecialCommand>§selected_command: usize§permission_required: bool§pending_tool: Option<PendingToolExecution>§tool_permission_status: ToolPermissionStatus§tool_execution_in_progress: bool§show_intermediate_steps: bool§show_shortcuts_hint: bool§show_detailed_shortcuts: bool§cursor_position: usize§tasks: Vec<Task>§current_task_id: Option<String>§task_scroll: ScrollState§task_scroll_position: usize§conversation_summaries: Vec<ConversationSummary>§session_manager: Option<SessionManager>§session_id: StringImplementations§
Source§impl App
impl App
Sourcepub fn create_task(&mut self, description: &str) -> String
pub fn create_task(&mut self, description: &str) -> String
Create a new task and set it as current
Sourcepub fn current_task(&self) -> Option<&Task>
pub fn current_task(&self) -> Option<&Task>
Get the current task if any
Sourcepub fn current_task_mut(&mut self) -> Option<&mut Task>
pub fn current_task_mut(&mut self) -> Option<&mut Task>
Get the current task as mutable if any
Sourcepub fn add_tool_use(&mut self)
pub fn add_tool_use(&mut self)
Add a tool use to the current task
Sourcepub fn add_input_tokens(&mut self, tokens: u32)
pub fn add_input_tokens(&mut self, tokens: u32)
Add input tokens to the current task
Sourcepub fn complete_current_task(&mut self, tokens: u32)
pub fn complete_current_task(&mut self, tokens: u32)
Complete the current task
Sourcepub fn fail_current_task(&mut self, error: &str)
pub fn fail_current_task(&mut self, error: &str)
Mark the current task as failed
Trait Implementations§
Source§impl AgentManager for App
impl AgentManager for App
Source§impl CommandHandler for App
impl CommandHandler for App
fn check_command_mode(&mut self)
fn filtered_commands(&self) -> Vec<SpecialCommand>
fn select_next_command(&mut self)
fn select_prev_command(&mut self)
fn execute_command(&mut self) -> bool
Source§impl ContextCompressor for App
impl ContextCompressor for App
Source§fn compress_context(&mut self) -> Result<()>
fn compress_context(&mut self) -> Result<()>
Generate a summary of the conversation history
Source§fn should_compress(&self) -> bool
fn should_compress(&self) -> bool
Check if conversation should be summarized based on thresholds
Source§fn conversation_char_count(&self) -> usize
fn conversation_char_count(&self) -> usize
Get the total character count of conversation history
Source§fn summary_count(&self) -> usize
fn summary_count(&self) -> usize
Get summaries count
Source§fn clear_history(&mut self)
fn clear_history(&mut self)
Clear all summaries and history
Source§impl ErrorHandler for App
impl ErrorHandler for App
fn handle_error(&mut self, message: String)
Source§impl Logger for App
impl Logger for App
Source§fn log(&mut self, message: &str, args: &[&str])
fn log(&mut self, message: &str, args: &[&str])
Log a message with optional formatting arguments
Source§fn toggle_log_view(&mut self)
fn toggle_log_view(&mut self)
Toggle between showing logs and normal output
Source§fn get_log_directory(&self) -> PathBuf
fn get_log_directory(&self) -> PathBuf
Get the log directory path
Source§fn get_log_file_path(&self) -> PathBuf
fn get_log_file_path(&self) -> PathBuf
Get the log file path for the current session
Source§impl ModelManager for App
impl ModelManager for App
fn current_model(&self) -> &ModelConfig
fn select_next_model(&mut self)
fn select_prev_model(&mut self)
fn get_agent_model(&self) -> Option<String>
fn load_model(&mut self, _model_path: &Path) -> Result<()>
fn setup_models(&mut self, tx: Sender<String>) -> Result<()>
Source§impl PermissionHandler for App
impl PermissionHandler for App
fn requires_permission(&self, tool_name: &str) -> bool
fn request_tool_permission( &mut self, tool_name: &str, args: &str, ) -> ToolPermissionStatus
fn handle_permission_response(&mut self, granted: bool)
fn extract_argument(&self, args: &str, arg_name: &str) -> Option<String>
fn requires_permission_check(&self) -> bool
Source§impl Scrollable for App
impl Scrollable for App
Source§fn message_scroll_state(&mut self) -> &mut ScrollState
fn message_scroll_state(&mut self) -> &mut ScrollState
Get a mutable reference to the message scroll state
Source§fn task_scroll_state(&mut self) -> &mut ScrollState
fn task_scroll_state(&mut self) -> &mut ScrollState
Get a mutable reference to the task scroll state
Source§fn scroll_down(&mut self, amount: usize)
fn scroll_down(&mut self, amount: usize)
Scroll message view down by amount
Source§fn auto_scroll_to_bottom(&mut self)
fn auto_scroll_to_bottom(&mut self)
Auto scroll messages to bottom
Source§fn scroll_tasks_up(&mut self, amount: usize)
fn scroll_tasks_up(&mut self, amount: usize)
Scroll task list up by amount
Source§fn scroll_tasks_down(&mut self, amount: usize)
fn scroll_tasks_down(&mut self, amount: usize)
Scroll task list down by amount
Auto Trait Implementations§
impl !Freeze for App
impl !RefUnwindSafe for App
impl Send for App
impl !Sync for App
impl Unpin 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