pub struct FrontendToolInvocation {
pub call_id: String,
pub tool_name: String,
pub arguments: Value,
pub origin: InvocationOrigin,
pub routing: ResponseRouting,
}Expand description
A frontend tool invocation record persisted to thread state.
Replaces the Interaction struct for frontend tool call tracking. Each
invocation captures the frontend tool being called, its origin context
(which plugin/tool triggered it), and the routing strategy for handling
the frontend’s response.
Fields§
§call_id: StringUnique ID for this frontend tool call (sent to frontend as toolCallId).
tool_name: StringFrontend tool name (e.g. “copyToClipboard”, “PermissionConfirm”).
arguments: ValueFrontend tool arguments.
origin: InvocationOriginWhere this invocation originated from.
routing: ResponseRoutingHow to route the frontend’s response.
Implementations§
Source§impl FrontendToolInvocation
impl FrontendToolInvocation
Sourcepub fn new(
call_id: impl Into<String>,
tool_name: impl Into<String>,
arguments: Value,
origin: InvocationOrigin,
routing: ResponseRouting,
) -> Self
pub fn new( call_id: impl Into<String>, tool_name: impl Into<String>, arguments: Value, origin: InvocationOrigin, routing: ResponseRouting, ) -> Self
Create a new frontend tool invocation.
Sourcepub fn to_interaction(&self) -> Interaction
pub fn to_interaction(&self) -> Interaction
Convert to an Interaction for backward compatibility with the
existing event system during the transition period.
Trait Implementations§
Source§impl Clone for FrontendToolInvocation
impl Clone for FrontendToolInvocation
Source§fn clone(&self) -> FrontendToolInvocation
fn clone(&self) -> FrontendToolInvocation
Returns a duplicate of the value. Read more
1.0.0 · 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 FrontendToolInvocation
impl Debug for FrontendToolInvocation
Source§impl<'de> Deserialize<'de> for FrontendToolInvocation
impl<'de> Deserialize<'de> for FrontendToolInvocation
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 FrontendToolInvocation
impl PartialEq for FrontendToolInvocation
Source§impl Serialize for FrontendToolInvocation
impl Serialize for FrontendToolInvocation
impl StructuralPartialEq for FrontendToolInvocation
Auto Trait Implementations§
impl Freeze for FrontendToolInvocation
impl RefUnwindSafe for FrontendToolInvocation
impl Send for FrontendToolInvocation
impl Sync for FrontendToolInvocation
impl Unpin for FrontendToolInvocation
impl UnsafeUnpin for FrontendToolInvocation
impl UnwindSafe for FrontendToolInvocation
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