This commit is contained in:
snav 2026-04-24 19:25:34 -05:00 committed by GitHub
commit efbef35d3b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 67 additions and 1 deletions

View file

@ -518,6 +518,11 @@ DEFAULT_CONFIG = {
"threshold": 0.50, # compress when context usage exceeds this ratio
"target_ratio": 0.20, # fraction of threshold to preserve as recent tail
"protect_last_n": 20, # minimum recent messages to keep uncompressed
"protect_first_n": 3, # head messages always preserved verbatim
# (system prompt + first exchange). Lower this
# to 1 if you rely on rolling compaction for
# long-running sessions and don't want the
# opening user/assistant turn pinned forever.
},
@ -3725,6 +3730,7 @@ def show_config():
print(f" Threshold: {compression.get('threshold', 0.50) * 100:.0f}%")
print(f" Target ratio: {compression.get('target_ratio', 0.20) * 100:.0f}% of threshold preserved")
print(f" Protect last: {compression.get('protect_last_n', 20)} messages")
print(f" Protect first: {compression.get('protect_first_n', 3)} messages")
_aux_comp = config.get('auxiliary', {}).get('compression', {})
_sm = _aux_comp.get('model', '') or '(auto)'
print(f" Model: {_sm}")