pub struct Edit<G: ToolGate> {
gate: G,
}Expand description
Substitute strings in files (unrestricted)
Fields§
§gate: GGate for receiving permissions to edit files
Implementations§
Trait Implementations§
Source§impl<G: ToolGate> CallableTool for Edit<G>
impl<G: ToolGate> CallableTool for Edit<G>
Source§async fn execute(
&self,
_agent: &Agent,
params: EditParams,
) -> Result<EditResult>
async fn execute( &self, _agent: &Agent, params: EditParams, ) -> Result<EditResult>
Execute a tool call.
Source§impl<G: ToolGate> Tool for Edit<G>
impl<G: ToolGate> Tool for Edit<G>
Source§fn description(&self) -> Option<String>
fn description(&self) -> Option<String>
Tool description, if any
Source§fn execute_unparsed<'a>(
&'a self,
agent: &'a Agent,
arguments: &'a str,
) -> Pin<Box<dyn Future<Output = Result<String>> + 'a>>
fn execute_unparsed<'a>( &'a self, agent: &'a Agent, arguments: &'a str, ) -> Pin<Box<dyn Future<Output = Result<String>> + 'a>>
Execute this tool, arguments given in JSON format (unparsed)
Source§impl<G: ToolGate> ToolState for Edit<G>
impl<G: ToolGate> ToolState for Edit<G>
Source§type ParamType = EditParams
type ParamType = EditParams
Associated parameter type.
Source§type ResultType = EditResult
type ResultType = EditResult
Associated return type.
Auto Trait Implementations§
impl<G> Freeze for Edit<G>where
G: Freeze,
impl<G> RefUnwindSafe for Edit<G>where
G: RefUnwindSafe,
impl<G> Send for Edit<G>
impl<G> Sync for Edit<G>
impl<G> Unpin for Edit<G>where
G: Unpin,
impl<G> UnsafeUnpin for Edit<G>where
G: UnsafeUnpin,
impl<G> UnwindSafe for Edit<G>where
G: UnwindSafe,
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