aboutsummaryrefslogtreecommitdiff
path: root/modules/core/module-loader.js
diff options
context:
space:
mode:
authorAgando <roduccomm@gmail.com>2026-10-23 21:43:45 +0200
committerAgando <roduccomm@gmail.com>2026-10-23 21:43:45 +0200
commit5b05af91fa3fcc9ae7aff00feedc26d062babbc2 (patch)
tree7060f31c71275ad64a22a8ccdab3260ea42d3208 /modules/core/module-loader.js
parentd5b6e6f12c8c3c4551050f8fc7d19fb78d6b581b (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.js2
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) {