Skip to main content

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

fn new(query: impl Into<String>) -> Self
Create a new result. Parameters:
NameType
queryimpl Into&lt;String&gt;

add_file

fn add_file(&mut self, file: FileMatch) -> ()
Add a file match. Parameters:
NameType
fileFileMatch

total_files

fn total_files(&self) -> usize
Get total number of files.

is_empty

fn is_empty(&self) -> bool
Check if empty.

to_context_string

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