pub struct FileSearchExtension { /* private fields */ }Expand description
Extension providing grep, find, and ls tools.
Implementations§
Source§impl FileSearchExtension
impl FileSearchExtension
pub fn new(cwd: PathBuf) -> Self
Sourcepub fn with_grep_operations(self, ops: Arc<dyn GrepOperations>) -> Self
pub fn with_grep_operations(self, ops: Arc<dyn GrepOperations>) -> Self
Set custom grep operations (e.g. for SSH targets).
Sourcepub fn with_find_operations(self, ops: Arc<dyn FindOperations>) -> Self
pub fn with_find_operations(self, ops: Arc<dyn FindOperations>) -> Self
Set custom find operations (e.g. for SSH targets).
Sourcepub fn with_ls_operations(self, ops: Arc<dyn LsOperations>) -> Self
pub fn with_ls_operations(self, ops: Arc<dyn LsOperations>) -> Self
Set custom ls operations (e.g. for SSH targets).
Trait Implementations§
Source§impl Extension for FileSearchExtension
impl Extension for FileSearchExtension
fn name(&self) -> Cow<'static, str>
Source§fn tools(&self) -> Vec<ToolDefinition>
fn tools(&self) -> Vec<ToolDefinition>
Tools this extension provides (LLM-callable), each with its own prompt metadata.
Source§fn commands(&self) -> Vec<SlashCommand>
fn commands(&self) -> Vec<SlashCommand>
Slash commands this extension provides (e.g.
/quit, /model).
Built-in commands and extension commands use the same interface.Source§fn skills(&self) -> SkillSet
fn skills(&self) -> SkillSet
Skills this extension provides (AgentSkills-compatible).
Merged into the session’s skill set for /skill:name expansion and system prompt.
Source§fn before_compact(
&self,
_first_kept_entry_id: &str,
_tokens_before: u64,
_reason: &str,
_cancel: &Cancel,
) -> Option<BeforeCompactResult>
fn before_compact( &self, _first_kept_entry_id: &str, _tokens_before: u64, _reason: &str, _cancel: &Cancel, ) -> Option<BeforeCompactResult>
Called before compaction runs (matching pi’s
session_before_compact).
Return Some(BeforeCompactResult { cancel: true, .. }) to cancel compaction.
Return Some(BeforeCompactResult { cancel: false, summary: Some(...), .. })
to provide a custom summary instead of calling the provider.
Return None to let the default compaction proceed. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for FileSearchExtension
impl !UnwindSafe for FileSearchExtension
impl Freeze for FileSearchExtension
impl Send for FileSearchExtension
impl Sync for FileSearchExtension
impl Unpin for FileSearchExtension
impl UnsafeUnpin for FileSearchExtension
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