Files
kit/internal/compaction
Ed Zynda 215a3186ff add /compact command with Pi-style token-based compaction
Rework compaction to match Pi's method:
- Token-based cut point (KeepRecentTokens=20k) instead of fixed message count
- Auto-trigger: contextTokens > contextWindow - reserveTokens (16k default)
- Pi's structured summary prompt (Goal/Progress/Decisions/Next Steps format)
- /compact [instructions] supports custom focus text
- Force compaction on manual request (only gate: >= 2 messages)
- Summary displayed in styled block with sky/cyan border and token stats
- Spinner properly animated during compaction
2026-02-27 17:05:25 +03:00
..