Expand description
Context compaction for long sessions.
This module ports the pi-mono compaction algorithm:
- Estimate context usage and choose a cut point that keeps recent context
- Summarize the discarded portion with the LLM (iteratively updating prior summaries)
- Record a
compactionsession entry containing the summary and cut point - When building provider context, the session inserts the summary before the kept region and omits older messages.
Structs§
- Compaction
Details - Details stored in
CompactionEntry.detailsfor cumulative file tracking. - Compaction
Preparation - Compaction
Result - File
Operations - Resolved
Compaction Settings