pub struct CodeIndex { /* private fields */ }Expand description
Index and search a codebase.
Implementations§
Source§impl CodeIndex
impl CodeIndex
Sourcepub async fn index_dir(&self, path: &str) -> Result<IndexResult>
pub async fn index_dir(&self, path: &str) -> Result<IndexResult>
Index a directory (respects .gitignore).
Sourcepub async fn index_file(&self, path: &str) -> Result<IndexResult>
pub async fn index_file(&self, path: &str) -> Result<IndexResult>
Index a single file.
Sourcepub async fn find_symbol(&self, name: &str) -> Result<Vec<CodeChunk>>
pub async fn find_symbol(&self, name: &str) -> Result<Vec<CodeChunk>>
Find symbol by name (SQL filter).
Sourcepub async fn context_for(&self, question: &str) -> Result<CodeContext>
pub async fn context_for(&self, question: &str) -> Result<CodeContext>
Get relevant context for an LLM question.
Sourcepub fn context(&self, question: &str) -> ContextBuilder<'_>
pub fn context(&self, question: &str) -> ContextBuilder<'_>
Build a context query with options.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CodeIndex
impl !RefUnwindSafe for CodeIndex
impl Send for CodeIndex
impl Sync for CodeIndex
impl Unpin for CodeIndex
impl UnsafeUnpin for CodeIndex
impl !UnwindSafe for CodeIndex
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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