pub enum ToolState {
Streaming {
partial_input: Option<Value>,
},
WaitingConfirmation {
input: Value,
description: String,
approval_id: String,
},
Executing {
progress: Option<String>,
elapsed_ms: Option<u64>,
},
Completed {
success: bool,
output: Option<String>,
elapsed_ms: Option<u64>,
confirmed_by: Option<ConfirmedBy>,
},
Cancelled {
reason: CancelReason,
message: Option<String>,
},
}Expand description
Tool state — a full replacement on each transition, never a delta.
Matching toolStateUpdate from the TS protocol, serialized as
{"phase": "...", ...variant-specific-fields-in-camelCase}.
Variants§
Streaming
WaitingConfirmation
Executing
Completed
Fields
§
confirmed_by: Option<ConfirmedBy>Cancelled
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ToolState
impl<'de> Deserialize<'de> for ToolState
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ToolState
impl RefUnwindSafe for ToolState
impl Send for ToolState
impl Sync for ToolState
impl Unpin for ToolState
impl UnsafeUnpin for ToolState
impl UnwindSafe for ToolState
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