agent ctx-badge: drop decimal — 1304.2k misread as 1304.2

This commit is contained in:
müde 2026-05-18 18:37:46 +02:00
parent 6e23d087d2
commit 118fbe6a71

View file

@ -535,7 +535,7 @@
if (!el_) return; if (!el_) return;
if (!u) { el_.hidden = true; return; } if (!u) { el_.hidden = true; return; }
const ctx = u.input_tokens + u.cache_read_input_tokens + u.cache_creation_input_tokens; const ctx = u.input_tokens + u.cache_read_input_tokens + u.cache_creation_input_tokens;
const fmt = (n) => n >= 1000 ? (n / 1000).toFixed(1) + 'k' : String(n); const fmt = (n) => n >= 1000 ? Math.round(n / 1000) + 'k' : String(n);
el_.hidden = false; el_.hidden = false;
el_.title = [ el_.title = [
'context window in use', 'context window in use',