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,
}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 packed neighbors.
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.
Trait Implementations§
Source§impl Clone for ContextOptions
impl Clone for ContextOptions
Source§fn clone(&self) -> ContextOptions
fn clone(&self) -> ContextOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ContextOptions
impl Debug for ContextOptions
Auto Trait Implementations§
impl Freeze for ContextOptions
impl RefUnwindSafe for ContextOptions
impl Send for ContextOptions
impl Sync for ContextOptions
impl Unpin for ContextOptions
impl UnsafeUnpin for ContextOptions
impl UnwindSafe for ContextOptions
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