From e84dba2d3e484f5f0f99af9f975a1f8e34abbd94 Mon Sep 17 00:00:00 2001 From: Classic298 <27028174+Classic298@users.noreply.github.com> Date: Sun, 8 Nov 2026 02:41:35 +0100 Subject: [PATCH] feat: group digits in the token usage tooltip (#33896) The token usage shown when hovering the info icon under a reply listed large counts as one long run of digits, so a value like 26678623 was hard to read at a glance. Whole numbers in that tooltip are now grouped for the language set in Open WebUI, for example 26,678,623 in English or 26.678.623 in German. Decimal values such as costs are not grouped and look as before. --- src/lib/components/chat/Messages/ResponseMessage.svelte | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/lib/components/chat/Messages/ResponseMessage.svelte b/src/lib/components/chat/Messages/ResponseMessage.svelte index f6faacac7f..4cd74e46f6 100644 --- a/src/lib/components/chat/Messages/ResponseMessage.svelte +++ b/src/lib/components/chat/Messages/ResponseMessage.svelte @@ -1231,6 +1231,12 @@ .split('\n') .map((line) => line.slice(2)) .map((line) => (line.endsWith(',') ? line.slice(0, -1) : line)) + .map((line) => + line.replace( + /: (\d+)$/, + (_, count) => `: ${Number(count).toLocaleString($i18n.language)}` + ) + ) .join('\n')}