pub struct AppState {
pub config: Config,
pub messages: Vec<Message>,
pub is_query_active: bool,
pub total_usage: Usage,
pub total_cost_usd: f64,
pub turn_count: usize,
pub cwd: String,
pub model_usage: HashMap<String, Usage>,
pub plan_mode: bool,
pub task_manager: Arc<TaskManager>,
pub session_id: String,
}Expand description
Global application state for the session.
Fields§
§config: ConfigConfiguration snapshot.
messages: Vec<Message>Full conversation history.
is_query_active: boolWhether a query is currently in progress.
total_usage: UsageAccumulated token usage across all turns.
total_cost_usd: f64Total estimated cost in USD.
turn_count: usizeNumber of agent turns completed.
cwd: StringCurrent working directory.
model_usage: HashMap<String, Usage>Per-model token usage.
plan_mode: boolWhether plan mode is active (read-only tools only).
task_manager: Arc<TaskManager>Shared background task manager.
session_id: StringSession ID for persistence.
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