Skip to main content

assemble_symbol_context

Function assemble_symbol_context 

Source
pub fn assemble_symbol_context(
    engine: &Engine,
    index_store: &AsgIndexStore<'_>,
    effect_store: &AsgEffectStore<'_>,
    ledger_store: &AsgLedgerStore<'_>,
    symbol: &Symbol,
    id_map: &HashMap<String, Symbol>,
    include_body: bool,
    fts: Option<&SearchFtsDb>,
    ownership_hint: Option<&OwnershipSignal>,
) -> Result<Value, AsdError>
Expand description

Assemble the per-symbol context object — the building block both CLI asd context-for and MCP context_for emit per requested qname.

ownership_hint: when Some, skip the discover_symbol_ownership git blame/log calls. Pass this when processing multiple symbols to share per-file results.

fts: borrowed FTS connection from the Engine; used for covering-test lookup. None skips the test scan (tests, one-off calls).

include_body: when false, drops the symbol’s body field from the output to keep context compact (file + line range tells the agent exactly where to look).