* fix(#1194): correct inverted statusline auto-compact buffer math The reserved-buffer percentage was computed as (acw/totalCtx)*100 — the usable fraction — instead of (1 - acw/totalCtx)*100 — the reserved fraction. When acw == totalCtx this produced buffer=100%, making the usable-range denominator zero and pinning `used` at a constant 100% regardless of real remaining context. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * chore: backfill changeset PR number (#1211) --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -312,7 +312,7 @@ function runStatusline() {
|
||||
const totalCtx = data.context_window?.total_tokens || 1_000_000;
|
||||
const acw = parseInt(process.env.CLAUDE_CODE_AUTO_COMPACT_WINDOW || '0', 10);
|
||||
const AUTO_COMPACT_BUFFER_PCT = acw > 0
|
||||
? Math.min(100, (acw / totalCtx) * 100)
|
||||
? Math.min(100, Math.max(0, (1 - acw / totalCtx) * 100))
|
||||
: 16.5;
|
||||
let ctx = '';
|
||||
if (remaining != null) {
|
||||
|
||||
Reference in New Issue
Block a user