Skip to main content

MessagesExt

Trait MessagesExt 

Source
pub trait MessagesExt {
    // Required methods
    fn push_approval_response(&mut self, response: ToolApprovalResponse);
    fn pending_approval_requests(&self) -> Vec<&ToolApprovalRequest>;
}
Expand description

Helpers for message histories.

Required Methods§

Source

fn push_approval_response(&mut self, response: ToolApprovalResponse)

Appends an approval response to the trailing tool message, creating one when the history does not end with a tool message.

Source

fn pending_approval_requests(&self) -> Vec<&ToolApprovalRequest>

Returns the approval requests that have no response yet.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl MessagesExt for Vec<Message>

Implementors§