pub struct UserInteraction {
pub kind: String,
pub payload: Value,
}Expand description
工具向 runtime 声明“需要用户交互“时携带的最小协议。
这类请求会作为合法 tool_result 写入 transcript,同时进入
Agent::WaitingForUser checkpoint,方便 UI 在用户下次回来时恢复展示。
Fields§
§kind: String§payload: ValueTrait Implementations§
Source§impl Clone for UserInteraction
impl Clone for UserInteraction
Source§fn clone(&self) -> UserInteraction
fn clone(&self) -> UserInteraction
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for UserInteraction
impl Debug for UserInteraction
Source§impl<'de> Deserialize<'de> for UserInteraction
impl<'de> Deserialize<'de> for UserInteraction
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
Source§impl PartialEq for UserInteraction
impl PartialEq for UserInteraction
Source§fn eq(&self, other: &UserInteraction) -> bool
fn eq(&self, other: &UserInteraction) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for UserInteraction
impl Serialize for UserInteraction
impl StructuralPartialEq for UserInteraction
Auto Trait Implementations§
impl Freeze for UserInteraction
impl RefUnwindSafe for UserInteraction
impl Send for UserInteraction
impl Sync for UserInteraction
impl Unpin for UserInteraction
impl UnsafeUnpin for UserInteraction
impl UnwindSafe for UserInteraction
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