pub struct AppState {Show 92 fields
pub view_mode: ViewMode,
pub input_mode: InputMode,
pub messages: Vec<ChatMessage>,
pub input: String,
pub input_cursor: usize,
pub input_scroll: usize,
pub chat_scroll: usize,
pub chat_last_max_scroll: usize,
pub tool_preview_scroll: usize,
pub tool_preview_last_max_scroll: usize,
pub status: String,
pub processing: bool,
pub session_id: Option<String>,
pub sessions: Vec<SessionSummary>,
pub selected_session: usize,
pub session_filter: String,
pub cwd_display: String,
pub bus_log: BusLogState,
pub swarm: SwarmViewState,
pub ralph: RalphViewState,
pub symbol_search: SymbolSearchState,
pub slash_suggestions: Vec<String>,
pub selected_slash_suggestion: usize,
pub command_history: Vec<String>,
pub history_index: Option<usize>,
pub worker_id: Option<String>,
pub worker_name: Option<String>,
pub a2a_connected: bool,
pub recent_tasks: Vec<String>,
pub worker_bridge_registered_agents: HashSet<String>,
pub worker_bridge_processing_state: Option<bool>,
pub worker_task_queue: VecDeque<IncomingTask>,
pub help_scroll: HelpScrollState,
pub show_help: bool,
pub available_models: Vec<String>,
pub selected_model_index: usize,
pub model_picker_active: bool,
pub model_filter: String,
pub streaming_text: String,
pub processing_started_at: Option<Instant>,
pub current_request_first_token_ms: Option<u64>,
pub current_request_last_token_ms: Option<u64>,
pub last_request_first_token_ms: Option<u64>,
pub last_request_last_token_ms: Option<u64>,
pub last_completion_model: Option<String>,
pub last_completion_latency_ms: Option<u64>,
pub last_completion_prompt_tokens: Option<usize>,
pub last_completion_output_tokens: Option<usize>,
pub last_tool_name: Option<String>,
pub last_tool_latency_ms: Option<u64>,
pub last_tool_success: Option<bool>,
pub pending_images: Vec<ImageAttachment>,
pub queued_steering: Vec<String>,
pub auto_apply_edits: bool,
pub allow_network: bool,
pub slash_autocomplete: bool,
pub use_worktree: bool,
pub selected_settings_index: usize,
pub mcp_registry: Arc<TuiMcpRegistry>,
pub spawned_agents: HashMap<String, SpawnedAgent>,
pub active_spawned_agent: Option<String>,
pub streaming_agent_texts: HashMap<String, String>,
pub cached_message_lines: Vec<Line<'static>>,
pub cached_messages_len: usize,
pub cached_max_width: usize,
pub cached_streaming_snapshot: Option<String>,
pub cached_processing: bool,
pub cached_frozen_len: usize,
pub watchdog_notification: Option<WatchdogNotification>,
pub main_watchdog_root_prompt: Option<String>,
pub main_last_event_at: Option<Instant>,
pub main_watchdog_restart_count: u32,
pub main_inflight_prompt: Option<String>,
pub okr_repository: Option<Arc<OkrRepository>>,
pub pending_okr_approval: Option<PendingOkrApproval>,
pub pending_smart_switch_retry: Option<PendingSmartSwitchRetry>,
pub smart_switch_retry_count: u32,
pub smart_switch_attempted_models: Vec<String>,
pub chat_sync_rx: Option<UnboundedReceiver<ChatSyncUiEvent>>,
pub chat_sync_status: Option<String>,
pub chat_sync_last_success: Option<String>,
pub chat_sync_last_error: Option<String>,
pub chat_sync_uploaded_bytes: u64,
pub chat_sync_uploaded_batches: u64,
pub autochat: AutochatState,
pub file_picker_dir: PathBuf,
pub file_picker_entries: Vec<FilePickerEntry>,
pub file_picker_selected: usize,
pub file_picker_filter: String,
pub file_picker_active: bool,
pub workspace: WorkspaceSnapshot,
pub chat_layout_mode: ChatLayoutMode,
}Fields§
§view_mode: ViewMode§input_mode: InputMode§messages: Vec<ChatMessage>§input: String§input_cursor: usize§input_scroll: usize§chat_scroll: usize§chat_last_max_scroll: usize§tool_preview_scroll: usize§tool_preview_last_max_scroll: usize§status: String§processing: bool§session_id: Option<String>§sessions: Vec<SessionSummary>§selected_session: usize§session_filter: String§cwd_display: String§bus_log: BusLogState§swarm: SwarmViewState§ralph: RalphViewState§symbol_search: SymbolSearchState§slash_suggestions: Vec<String>§selected_slash_suggestion: usize§command_history: Vec<String>§history_index: Option<usize>§worker_id: Option<String>§worker_name: Option<String>§a2a_connected: bool§recent_tasks: Vec<String>§worker_bridge_registered_agents: HashSet<String>§worker_bridge_processing_state: Option<bool>§worker_task_queue: VecDeque<IncomingTask>§help_scroll: HelpScrollState§show_help: bool§available_models: Vec<String>§selected_model_index: usize§model_picker_active: bool§model_filter: String§streaming_text: String§processing_started_at: Option<Instant>§current_request_first_token_ms: Option<u64>§current_request_last_token_ms: Option<u64>§last_request_first_token_ms: Option<u64>§last_request_last_token_ms: Option<u64>§last_completion_model: Option<String>§last_completion_latency_ms: Option<u64>§last_completion_prompt_tokens: Option<usize>§last_completion_output_tokens: Option<usize>§last_tool_name: Option<String>§last_tool_latency_ms: Option<u64>§last_tool_success: Option<bool>§pending_images: Vec<ImageAttachment>§queued_steering: Vec<String>§auto_apply_edits: bool§allow_network: bool§slash_autocomplete: bool§use_worktree: bool§selected_settings_index: usize§mcp_registry: Arc<TuiMcpRegistry>§spawned_agents: HashMap<String, SpawnedAgent>§active_spawned_agent: Option<String>§streaming_agent_texts: HashMap<String, String>§cached_message_lines: Vec<Line<'static>>§cached_messages_len: usize§cached_max_width: usize§cached_streaming_snapshot: Option<String>§cached_processing: bool§cached_frozen_len: usize§watchdog_notification: Option<WatchdogNotification>§main_watchdog_root_prompt: Option<String>§main_last_event_at: Option<Instant>§main_watchdog_restart_count: u32§main_inflight_prompt: Option<String>§okr_repository: Option<Arc<OkrRepository>>§pending_okr_approval: Option<PendingOkrApproval>§pending_smart_switch_retry: Option<PendingSmartSwitchRetry>§smart_switch_retry_count: u32§smart_switch_attempted_models: Vec<String>§chat_sync_rx: Option<UnboundedReceiver<ChatSyncUiEvent>>§chat_sync_status: Option<String>§chat_sync_last_success: Option<String>§chat_sync_last_error: Option<String>§chat_sync_uploaded_bytes: u64§chat_sync_uploaded_batches: u64§autochat: AutochatState§file_picker_dir: PathBuf§file_picker_entries: Vec<FilePickerEntry>§file_picker_selected: usize§file_picker_filter: String§file_picker_active: bool§workspace: WorkspaceSnapshot§chat_layout_mode: ChatLayoutModeImplementations§
Source§impl AppState
impl AppState
pub fn push_history(&mut self, entry: String)
pub fn history_prev(&mut self) -> bool
pub fn history_next(&mut self) -> bool
Source§impl AppState
impl AppState
pub fn clamp_input_cursor(&mut self)
pub fn ensure_input_cursor_visible(&mut self, visible_width: usize)
pub fn move_cursor_left(&mut self)
pub fn move_cursor_right(&mut self)
pub fn move_cursor_word_left(&mut self)
pub fn move_cursor_word_right(&mut self)
pub fn move_cursor_home(&mut self)
pub fn move_cursor_end(&mut self)
Source§impl AppState
impl AppState
pub fn insert_char(&mut self, c: char)
pub fn insert_text(&mut self, text: &str)
pub fn delete_backspace(&mut self)
pub fn delete_forward(&mut self)
pub fn clear_input(&mut self)
Source§impl AppState
impl AppState
Sourcepub async fn refresh_available_models(
&mut self,
registry: Option<&Arc<ProviderRegistry>>,
) -> Result<()>
pub async fn refresh_available_models( &mut self, registry: Option<&Arc<ProviderRegistry>>, ) -> Result<()>
Refresh the available models list from the provider registry.
§Errors
Returns an error if any provider call fails critically.
Source§impl AppState
impl AppState
pub fn filtered_models(&self) -> Vec<&str>
pub fn set_available_models(&mut self, models: Vec<String>)
pub fn open_model_picker(&mut self)
pub fn close_model_picker(&mut self)
pub fn model_select_prev(&mut self)
pub fn model_select_next(&mut self)
pub fn model_filter_push(&mut self, c: char)
pub fn model_filter_backspace(&mut self)
pub fn selected_model(&self) -> Option<&str>
Source§impl AppState
impl AppState
pub fn scroll_up(&mut self, amount: usize)
pub fn scroll_down(&mut self, amount: usize)
Sourcepub fn scroll_to_bottom(&mut self)
pub fn scroll_to_bottom(&mut self)
Set sentinel value — clamped to actual content height at render time.
pub fn scroll_to_top(&mut self)
pub fn set_chat_max_scroll(&mut self, max_scroll: usize)
pub fn scroll_tool_preview_up(&mut self, amount: usize)
pub fn scroll_tool_preview_down(&mut self, amount: usize)
pub fn reset_tool_preview_scroll(&mut self)
pub fn set_tool_preview_max_scroll(&mut self, max_scroll: usize)
Source§impl AppState
impl AppState
pub fn sessions_select_prev(&mut self)
pub fn sessions_select_next(&mut self)
pub fn filtered_sessions(&self) -> Vec<(usize, &SessionSummary)>
pub fn clear_session_filter(&mut self)
pub fn session_filter_backspace(&mut self)
pub fn session_filter_push(&mut self, c: char)
Source§impl AppState
impl AppState
pub fn settings_select_prev(&mut self)
pub fn settings_select_next(&mut self)
pub fn set_view_mode(&mut self, view_mode: ViewMode)
Source§impl AppState
impl AppState
pub fn refresh_slash_suggestions(&mut self)
pub fn slash_suggestions_visible(&self) -> bool
pub fn select_prev_slash_suggestion(&mut self)
pub fn select_next_slash_suggestion(&mut self)
pub fn selected_slash_suggestion(&self) -> Option<&str>
pub fn apply_selected_slash_suggestion(&mut self) -> bool
Source§impl AppState
impl AppState
pub fn queue_steering(&mut self, value: impl Into<String>)
pub fn clear_steering(&mut self)
pub fn steering_count(&self) -> usize
pub fn steering_prompt_prefix(&self) -> Option<String>
Source§impl AppState
impl AppState
pub fn begin_request_timing(&mut self)
pub fn current_request_elapsed_ms(&self) -> Option<u64>
pub fn note_text_token(&mut self)
pub fn complete_request_timing(&mut self)
pub fn clear_request_timing(&mut self)
Source§impl AppState
impl AppState
pub fn set_worker_bridge(&mut self, worker_id: String, worker_name: String)
pub fn sync_worker_bridge_processing(&mut self, processing: bool)
pub fn register_worker_agent(&mut self, name: String)
pub fn push_recent_task(&mut self, task: String)
pub fn enqueue_worker_task(&mut self, task: IncomingTask)
pub fn dequeue_worker_task(&mut self) -> Option<IncomingTask>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AppState
impl !RefUnwindSafe for AppState
impl Send for AppState
impl Sync for AppState
impl Unpin for AppState
impl UnsafeUnpin 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
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 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>
Wrap the input message
T in a tonic::RequestSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ServiceExt for T
impl<T> ServiceExt for T
Source§fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
Apply a transformation to the response body. Read more
Source§fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
High level tracing that classifies responses using HTTP status codes. Read more
Source§fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
High level tracing that classifies responses using gRPC headers. Read more