pub struct ViewTool;Trait Implementations§
Source§impl StaticTool for ViewTool
impl StaticTool for ViewTool
const DESCRIPTION: &'static str = "Reads a file from the local filesystem. The file_path parameter must be an absolute path, not a relative path.\nBy default, it reads up to 2000 lines starting from the beginning of the file. You can optionally specify a line offset and limit\n(especially handy for long files), but it\'s recommended to read the whole file by not providing these parameters.\nAny lines longer than 2000 characters will be truncated."
const REQUIRES_APPROVAL: bool = false
const REQUIRED_CAPABILITIES: Capabilities = Capabilities::WORKSPACE
type Params = ViewParams
type Output = FileContentResult
type Spec = ViewToolSpec
fn execute<'life0, 'life1, 'async_trait>(
&'life0 self,
params: Self::Params,
ctx: &'life1 StaticToolContext,
) -> Pin<Box<dyn Future<Output = Result<Self::Output, StaticToolError<ViewError>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn schema() -> ToolSchemawhere
Self: Sized,
Auto Trait Implementations§
impl Freeze for ViewTool
impl RefUnwindSafe for ViewTool
impl Send for ViewTool
impl Sync for ViewTool
impl Unpin for ViewTool
impl UnwindSafe for ViewTool
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request