pub struct PresentPlanTool { /* private fields */ }Expand description
Tool for presenting a completed plan to the user for approval.
Implementations§
Source§impl PresentPlanTool
impl PresentPlanTool
Sourcepub fn with_todo_manager(manager: Arc<Mutex<TodoManager>>) -> Self
pub fn with_todo_manager(manager: Arc<Mutex<TodoManager>>) -> Self
Create a present_plan tool with a shared todo manager.
When a plan is approved, its implementation steps will be added as todos to this manager.
Sourcepub fn with_approval_tx(self, tx: PlanApprovalSender) -> Self
pub fn with_approval_tx(self, tx: PlanApprovalSender) -> Self
Attach a plan approval channel for interactive (TUI) mode.
When set, execute() sends the plan content through this channel
and blocks until the user approves, rejects, or requests modification.
Trait Implementations§
Source§impl BaseTool for PresentPlanTool
impl BaseTool for PresentPlanTool
Source§fn description(&self) -> &str
fn description(&self) -> &str
Human-readable description shown to the LLM.
Source§fn parameter_schema(&self) -> Value
fn parameter_schema(&self) -> Value
JSON Schema describing the tool’s parameters. Read more
Source§fn execute<'life0, 'life1, 'async_trait>(
&'life0 self,
args: HashMap<String, Value>,
ctx: &'life1 ToolContext,
) -> Pin<Box<dyn Future<Output = ToolResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn execute<'life0, 'life1, 'async_trait>(
&'life0 self,
args: HashMap<String, Value>,
ctx: &'life1 ToolContext,
) -> Pin<Box<dyn Future<Output = ToolResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Execute the tool with the given arguments and context.
Source§fn format_validation_error(&self, errors: &[ValidationError]) -> Option<String>
fn format_validation_error(&self, errors: &[ValidationError]) -> Option<String>
Format a validation error into a tool-specific, LLM-friendly message. Read more
Source§fn display_meta(&self) -> Option<ToolDisplayMeta>
fn display_meta(&self) -> Option<ToolDisplayMeta>
Return TUI display metadata for this tool. Read more
Source§impl Debug for PresentPlanTool
impl Debug for PresentPlanTool
Auto Trait Implementations§
impl Freeze for PresentPlanTool
impl RefUnwindSafe for PresentPlanTool
impl Send for PresentPlanTool
impl Sync for PresentPlanTool
impl Unpin for PresentPlanTool
impl UnsafeUnpin for PresentPlanTool
impl UnwindSafe for PresentPlanTool
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