pub struct ContextOptions {
pub max_tokens: usize,
pub hop_depth: usize,
pub max_seeds: usize,
pub max_nodes: usize,
pub hop_decay: f32,
pub no_symbols: bool,
pub include_types: Vec<NodeType>,
pub exclude_types: Vec<NodeType>,
pub hop_to_symbols: bool,
pub hop_from_docs_only: bool,
pub include_excerpts: bool,
}Expand description
Options controlling assemble_context and crate::Brain::context_for_prompt_with.
Fields§
§max_tokens: usizeApproximate max tokens for the packed bundle (chars ≈ tokens × 4).
hop_depth: usizeGraph expansion depth (0 = seeds only; 1 is the usual default).
max_seeds: usizeMax seed nodes taken from the ranked query before expansion.
max_nodes: usizeMax total nodes packed into the bundle (seeds + neighbors).
hop_decay: f32Multiplicative decay applied per hop for neighbor scores.
no_symbols: boolExclude pure code symbols from seeds (and from neighbors unless Self::hop_to_symbols).
include_types: Vec<NodeType>Only include these node types when non-empty.
exclude_types: Vec<NodeType>Always exclude these node types.
hop_to_symbols: boolWhen true, allow graph hops to symbols even if no_symbols filters seeds.
Default true so ADR → symbol:foo remains useful for agents.
hop_from_docs_only: boolPrefer expanding the graph from non-symbol seeds (docs/README). Default true.
include_excerpts: boolInclude body excerpts from FTS content (or summary fallback). Default true.
Implementations§
Source§impl ContextOptions
impl ContextOptions
Sourcepub fn with_symbols(self) -> Self
pub fn with_symbols(self) -> Self
Include symbols as seeds and neighbors (power-user / debugging).
Trait Implementations§
Source§impl Clone for ContextOptions
impl Clone for ContextOptions
Source§fn clone(&self) -> ContextOptions
fn clone(&self) -> ContextOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more