diff options
| author | Agando <roduccomm@gmail.com> | 2026-10-23 21:43:45 +0200 |
|---|---|---|
| committer | Agando <roduccomm@gmail.com> | 2026-10-23 21:43:45 +0200 |
| commit | 534ffd12903f74d2b0227c23dd90776df97cc70d (patch) | |
| tree | 7f642c7589aac43b9e8b450fc77887bf98bba0e5 /modules/core/module-loader.js | |
| parent | 6af7c8ddfbd1d18a0d10cecd9c5d5eb398749570 (diff) | |
feat(newos4): context window warns at 80% and says what trimming dropped (v4.6.91)
P0-5 asked what to do about a 422k-token session against a 400k threshold. There is no 400k
threshold in this tree — the budgets are maxContextTokens (12000) and maxContext*2 messages — so
rather than chase a number that does not exist, this applies the decision that is defensible
either way: warn before the cliff, never lose history without saying so.
- 80% of the token budget prints one warning per crossing (no per-turn nagging)
- the message-count trim unshifts a marker naming how many messages left the window and quoting
the earliest one, instead of splicing them away silently
- 'max-context-tokens (default: 2000)' now reports the real code default, 12000
Verified: 900/1000 tokens -> warns once, second call silent; 1500/1000 -> compresses to 17
messages with the summary head intact; 9-message window with maxContext=2 -> 4 messages, marker
'[context trim: 6 earlier message(s) ... earliest was: "turn 0 ..."]'.
Diffstat (limited to 'modules/core/module-loader.js')
| -rw-r--r-- | modules/core/module-loader.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/core/module-loader.js b/modules/core/module-loader.js index 95176d9..3ab51d7 100644 --- a/modules/core/module-loader.js +++ b/modules/core/module-loader.js @@ -4,7 +4,7 @@ // Core module bundle loaded synchronously in main.html. // This loader only handles version cache-busting, splash, terminal init, and optional ext modules. - const LATEST_VER = 'v4.6.90'; + const LATEST_VER = 'v4.6.91'; const CACHE = '?v=' + LATEST_VER; const stored = localStorage.getItem('webx11_cache_ver'); if (stored !== LATEST_VER) { |