mirror of
https://github.com/lukaszraczylo/traefik-llmgateway.git
synced 2026-11-26 10:06:31 +00:00
fix(admin-ui): keep sign and precision in CSV, YAML and context labels
CSV export prefixed negative numbers with an apostrophe, which corrupted the data. YAML emitted NaN and Infinity as plain strings. Context windows such as 1500 read as 2k. Numbers now skip the CSV formula guard, non-finite values use YAML float forms, and counts below 10k keep one decimal.
This commit is contained in:
@@ -72,6 +72,9 @@ describe('formatContextWindow', () => {
|
||||
// when they happen to be exact multiples of 1024 (128000 = 125 ×
|
||||
// 1024) — decimal-K/M.
|
||||
{ tokens: 128_000, want: '128k' }, // review regression: was "125k"
|
||||
{ tokens: 1_500, want: '1.5k' },
|
||||
{ tokens: 9_950, want: '10k' },
|
||||
{ tokens: 1_500_000, want: '1.5M' },
|
||||
{ tokens: 1_000_000, want: '1M' }, // review regression: was "977k"
|
||||
{ tokens: 2_000_000, want: '2M' }, // review regression: was "1953k"
|
||||
// Plain digits under 1024, either path.
|
||||
|
||||
Reference in New Issue
Block a user