context_state_summary() was used for both compaction decisions (just needs token counts) and debug screen display (needs full tree with labels). Split into: - Agent::context_budget() -> ContextBudget: cheap token counting by category, used by compact(), restore_from_log(), mind event loop - ContextBudget::format(): replaces sections_budget_string() which fragily pattern-matched on section name strings - context_state_summary(): now UI-only, formatting code stays here Also extracted entry_sections() as shared helper with include_memories param — false for context_state_summary (memories have own section), true for conversation_sections_from() (subconscious screen shows all). Co-Authored-By: Proof of Concept <poc@bcachefs.org> |
||
|---|---|---|
| .. | ||
| chat.rs | ||
| context.rs | ||
| mod.rs | ||
| subconscious.rs | ||
| thalamus.rs | ||
| unconscious.rs | ||