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
| Name | Type | Description |
|---|---|---|
query | String | Original query |
files | Vec<FileMatch> | Matching files |
search_time_ms | u64 | Search time in milliseconds |
turns_used | usize | Number of turns used |
total_tool_calls | usize | Total tool calls made |
from_cache | bool | Whether result is from cache |
Methods
new
fn new(query: impl Into<String>) -> SelfCreate a new result.
Parameters:
| Name | Type |
|---|---|
query | impl Into<String> |
add_file
fn add_file(&mut self, file: FileMatch) -> ()Add a file match.
Parameters:
| Name | Type |
|---|---|
file | FileMatch |
total_files
fn total_files(&self) -> usizeGet total number of files.
is_empty
fn is_empty(&self) -> boolCheck if empty.
to_context_string
fn to_context_string(&self) -> StringConvert to context string for agent injection.
Source
View on GitHubpraisonai/src/context/mod.rs at line 631