pub enum Notification {
Exit,
Update,
UpdateAgent {
agent_id: AgentId,
},
PromptQueued(String),
PromptSubmitted,
AwaitingPrompt {
response: Option<String>,
},
RequestPermission {
prompt: String,
approval: Sender<Result<(), String>>,
},
SubagentCreated {
subagent_id: SubagentId,
prompt: String,
client_info: ClientInfo,
client_state: Arc<RwLock<ClientState>>,
chat_history: Arc<Mutex<ChatHistory>>,
},
SubagentDropped {
subagent_id: SubagentId,
},
}Expand description
Notifications to the UI
Variants§
Exit
Exit requested
Update
Update the interface
UpdateAgent
The given agent’s history has been updated
PromptQueued(String)
User message queued to be submitted to the LLM
PromptSubmitted
User message has been submitted to the LLM
AwaitingPrompt
The current prompt iteration is complete; the agent is now awaiting a new prompt
RequestPermission
A tool call is requesting permission from the user
Fields
SubagentCreated
A new subagent has been created
Fields
§
subagent_id: SubagentIdUnique ID by which the subagent can be identified
§
client_info: ClientInfoThe immutable information of the client to which the subagent is connected
§
client_state: Arc<RwLock<ClientState>>The state of the client to which the subagent is connected
§
chat_history: Arc<Mutex<ChatHistory>>Subagent’s chat history
SubagentDropped
A subagent is done and has been dropped
Fields
§
subagent_id: SubagentIdThe subagent’s ID
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Notification
impl !UnwindSafe for Notification
impl Freeze for Notification
impl Send for Notification
impl Sync for Notification
impl Unpin for Notification
impl UnsafeUnpin for Notification
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