webui: Use toLocaleString() format consistently across chat message statistics (#27990)
* webui: Use toLocaleString() format consistently across chat message statistics * Add missing semicolon * ui: respect lint
This commit is contained in:
1 parent
8f9ae20c86
commit
9d853bb36a
1 file changed
+11
-6
+11
-6
@@ -124,6 +124,11 @@
|
||||
);
|
||||
|
||||
let formattedAgenticTotalTime = $derived(formatPerformanceTime(agenticTotalTimeMs));
|
||||
|
||||
const fixedFormatter = new Intl.NumberFormat(undefined, {
|
||||
maximumFractionDigits: 2,
|
||||
minimumFractionDigits: 2
|
||||
});
|
||||
</script>
|
||||
|
||||
{#snippet viewButton(opts: {
|
||||
@@ -223,14 +228,14 @@
|
||||
class="bg-transparent"
|
||||
icon={Gauge}
|
||||
tooltipLabel="Generation speed"
|
||||
value="{tokensPerSecond.toFixed(2)} t/s"
|
||||
value="{fixedFormatter.format(tokensPerSecond)} t/s"
|
||||
/>
|
||||
{:else if activeView === ChatMessageStatsView.TOOLS && hasAgenticStats}
|
||||
<ChatMessageStatisticsBadge
|
||||
class="bg-transparent"
|
||||
icon={Wrench}
|
||||
tooltipLabel="Tool calls executed"
|
||||
value="{agenticTimings!.toolCallsCount} calls"
|
||||
value="{agenticTimings!.toolCallsCount.toLocaleString()} calls"
|
||||
/>
|
||||
|
||||
<ChatMessageStatisticsBadge
|
||||
@@ -244,14 +249,14 @@
|
||||
class="bg-transparent"
|
||||
icon={Gauge}
|
||||
tooltipLabel="Tool execution rate"
|
||||
value="{agenticToolsPerSecond.toFixed(2)} calls/s"
|
||||
value="{fixedFormatter.format(agenticToolsPerSecond)} calls/s"
|
||||
/>
|
||||
{:else if activeView === ChatMessageStatsView.SUMMARY && hasAgenticStats}
|
||||
<ChatMessageStatisticsBadge
|
||||
class="bg-transparent"
|
||||
icon={Layers}
|
||||
tooltipLabel="Agentic turns (LLM calls)"
|
||||
value="{agenticTimings!.turns} turns"
|
||||
value="{agenticTimings!.turns.toLocaleString()} turns"
|
||||
/>
|
||||
|
||||
<ChatMessageStatisticsBadge
|
||||
@@ -272,7 +277,7 @@
|
||||
class="bg-transparent"
|
||||
icon={WholeWord}
|
||||
tooltipLabel="Prompt tokens"
|
||||
value="{promptTokens} tokens"
|
||||
value="{promptTokens?.toLocaleString()} tokens"
|
||||
/>
|
||||
|
||||
<ChatMessageStatisticsBadge
|
||||
@@ -286,7 +291,7 @@
|
||||
class="bg-transparent"
|
||||
icon={Gauge}
|
||||
tooltipLabel="Prompt processing speed"
|
||||
value="{promptTokensPerSecond!.toFixed(2)} tokens/s"
|
||||
value="{fixedFormatter.format(promptTokensPerSecond!)} tokens/s"
|
||||
/>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user