Fast Context Result • Rust AI Agent SDK

FastContextResult: Result of a fast context search.

FastContextResult

Defined in the context module.

Rust AI Agent SDK

Result of a fast context search.

Fields

NameTypeDescription
queryStringOriginal query
filesVec<FileMatch>Matching files
search_time_msu64Search time in milliseconds
turns_usedusizeNumber of turns used
total_tool_callsusizeTotal tool calls made
from_cacheboolWhether result is from cache

Methods

new

rust
fn new(query: impl Into<String>) -> Self

Create a new result.

Parameters:

NameType
queryimpl Into&lt;String&gt;

add_file

rust
fn add_file(&mut self, file: FileMatch) -> ()

Add a file match.

Parameters:

NameType
fileFileMatch

total_files

rust
fn total_files(&self) -> usize

Get total number of files.

is_empty

rust
fn is_empty(&self) -> bool

Check if empty.

to_context_string

rust
fn to_context_string(&self) -> String

Convert to context string for agent injection.

Source

View on GitHub

praisonai/src/context/mod.rs at line 631


Related Documentation