pub struct EditFileTool;Expand description
Search-and-replace editing in files.
Trait Implementations§
Source§impl Tool for EditFileTool
impl Tool for EditFileTool
Source§fn description(&self) -> &str
fn description(&self) -> &str
One-line human-readable description shown to the model.
Source§fn parameters_schema(&self) -> Value
fn parameters_schema(&self) -> Value
JSON Schema description of the parameters object.
Must be a valid JSON object schema, e.g.: Read more
Source§fn execute(&self, args: &Value) -> Result<ToolResult, AgentError>
fn execute(&self, args: &Value) -> Result<ToolResult, AgentError>
Execute the tool with the given JSON arguments.
Returns the tool output as a string (will be injected back into the
conversation as the tool result).
Source§fn requires_permission(&self) -> bool
fn requires_permission(&self) -> bool
Whether this tool requires user permission before execution.
Defaults to
true for safety.Source§fn is_dangerous(&self, _args: &Value) -> bool
fn is_dangerous(&self, _args: &Value) -> bool
Whether this tool is considered dangerous (shown as a warning).
Auto Trait Implementations§
impl Freeze for EditFileTool
impl RefUnwindSafe for EditFileTool
impl Send for EditFileTool
impl Sync for EditFileTool
impl Unpin for EditFileTool
impl UnsafeUnpin for EditFileTool
impl UnwindSafe for EditFileTool
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