pub fn assemble_context(
candidates: &[MemoryEntry],
budget: &ContextBudget,
) -> ContextWindowExpand description
Assemble a context window from candidate entries, respecting the token budget.
Candidates are sorted by relevance (descending), then greedily packed until the budget is exhausted. Entries that don’t fit are dropped.