pub struct AppState {Show 21 fields
pub session_id: SessionId,
pub session_config: Option<SessionConfig>,
pub base_session_config: Option<SessionConfig>,
pub primary_agent_id: Option<String>,
pub message_graph: MessageGraph,
pub cached_system_context: Option<SystemContext>,
pub tools: Vec<ToolSchema>,
pub approved_tools: HashSet<String>,
pub approved_bash_patterns: HashSet<String>,
pub static_bash_patterns: Vec<String>,
pub pending_approval: Option<PendingApproval>,
pub approval_queue: VecDeque<QueuedApproval>,
pub queued_work: VecDeque<QueuedWorkItem>,
pub current_operation: Option<OperationState>,
pub active_streams: HashMap<OpId, StreamingMessage>,
pub workspace_files: Vec<String>,
pub mcp_servers: HashMap<String, McpServerState>,
pub cancelled_ops: HashSet<OpId>,
pub operation_models: HashMap<OpId, ModelId>,
pub operation_messages: HashMap<OpId, MessageId>,
pub event_sequence: u64,
}Fields§
§session_id: SessionId§session_config: Option<SessionConfig>§base_session_config: Option<SessionConfig>§primary_agent_id: Option<String>§message_graph: MessageGraph§cached_system_context: Option<SystemContext>§tools: Vec<ToolSchema>§approved_tools: HashSet<String>§approved_bash_patterns: HashSet<String>§static_bash_patterns: Vec<String>§pending_approval: Option<PendingApproval>§approval_queue: VecDeque<QueuedApproval>§queued_work: VecDeque<QueuedWorkItem>§current_operation: Option<OperationState>§active_streams: HashMap<OpId, StreamingMessage>§workspace_files: Vec<String>§mcp_servers: HashMap<String, McpServerState>§cancelled_ops: HashSet<OpId>§operation_models: HashMap<OpId, ModelId>§operation_messages: HashMap<OpId, MessageId>§event_sequence: u64Implementations§
Source§impl AppState
impl AppState
pub fn new(session_id: SessionId) -> Self
pub fn with_approved_patterns(self, patterns: Vec<String>) -> Self
pub fn with_approved_tools(self, tools: HashSet<String>) -> Self
pub fn is_tool_pre_approved(&self, tool_name: &str) -> bool
pub fn is_bash_pattern_approved(&self, command: &str) -> bool
pub fn approve_tool(&mut self, tool_name: String)
pub fn approve_bash_pattern(&mut self, pattern: String)
pub fn record_cancelled_op(&mut self, op_id: OpId)
pub fn is_op_cancelled(&self, op_id: &OpId) -> bool
pub fn has_pending_approval(&self) -> bool
pub fn has_active_operation(&self) -> bool
pub fn queue_user_message(&mut self, item: QueuedUserMessage)
pub fn queue_bash_command(&mut self, item: QueuedBashCommand)
pub fn pop_next_queued_work(&mut self) -> Option<QueuedWorkItem>
pub fn queued_summary(&self) -> (Option<QueuedWorkItem>, usize)
pub fn start_operation(&mut self, op_id: OpId, kind: OperationKind)
pub fn complete_operation(&mut self, op_id: OpId)
pub fn add_pending_tool_call(&mut self, tool_call_id: ToolCallId)
pub fn remove_pending_tool_call(&mut self, tool_call_id: &ToolCallId)
pub fn increment_sequence(&mut self) -> u64
pub fn apply_session_config( &mut self, config: &SessionConfig, primary_agent_id: Option<String>, update_base: bool, )
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 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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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::Request