pub fn compact_session_loops(
session: &mut Session,
current_loop_id: &str,
strategy: &dyn BlockCompactionStrategy,
config: &CompactionConfig,
max_context_tokens: usize,
counter: Option<&Arc<dyn TokenCounter>>,
)Expand description
Create CompactionBlocks for the current loop and earlier loops within scope.
Mutates the session in place.
When counter is None, uses HeuristicTokenCounter (chars/4) as the default.
The caller is responsible for persisting the session to disk afterward.