agent ctx-badge: use dot decimal for M (1.3M not 1,3M)
This commit is contained in:
parent
93fe1a60dc
commit
14549dd8a9
1 changed files with 1 additions and 1 deletions
|
|
@ -536,7 +536,7 @@
|
||||||
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) => {
|
const fmt = (n) => {
|
||||||
if (n >= 1_000_000) return (n / 1_000_000).toFixed(1).replace('.', ',') + 'M';
|
if (n >= 1_000_000) return (n / 1_000_000).toFixed(1) + 'M';
|
||||||
if (n >= 1_000) return Math.round(n / 1000) + 'k';
|
if (n >= 1_000) return Math.round(n / 1000) + 'k';
|
||||||
return String(n);
|
return String(n);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue