feat(tui): add configurable auto-compact threshold

Refs #1722

Preserves auto_compact as opt-in, adds the saved threshold setting, keeps the 500K hard floor, and wires Ctrl+L as a manual compaction shortcut for context-pressure recovery.

Harvested from PR #1723 by @aboimpinto

Co-authored-by: Paulo Aboim Pinto <aboimpinto@gmail.com>
This commit is contained in:
Hunter Bown
2026-06-01 14:09:49 -07:00
parent 2ca2927657
commit bb64018a15
10 changed files with 150 additions and 30 deletions
+4 -2
View File
@@ -481,8 +481,10 @@ exponential_base = 2.0
# Context Compaction
# ─────────────────────────────────────────────────────────────────────────────────
# Auto-compaction is a saved UI setting edited with `/config` (`auto_compact`).
# There is no config-file `[compaction]` table yet; detailed thresholds are
# chosen by the TUI from the active model/context budget.
# The optional saved threshold setting is `auto_compact_threshold_percent`
# (default 70, still gated by the 500K-token floor). There is no config-file
# `[compaction]` table yet; runtime compaction budgets are chosen by the TUI
# from the active model/context window.
# Append-only Flash seams are experimental and opt-in while the v0.7.5
# context/cache audit validates prefix-cache behavior.