From dacb2c25fdff9ada0bb73335e58fc8013b1d3068 Mon Sep 17 00:00:00 2001 From: Classic298 <27028174+Classic298@users.noreply.github.com> Date: Mon, 26 Oct 2026 20:44:49 +0100 Subject: [PATCH] fix: replies without reported token usage show an empty Info button (#33220) A recent dev change marks a reply as having incomplete usage when the provider reports no token counts, so the session analytics can tell measured replies apart. The chat then treated that marker as usage and showed the Info button under every such reply, with a tooltip that only said "incomplete: true". The Info button now only appears when the reply carries actual usage data, while the stored marker stays as it is for analytics. --- src/lib/components/chat/Messages/ResponseMessage.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/components/chat/Messages/ResponseMessage.svelte b/src/lib/components/chat/Messages/ResponseMessage.svelte index 372c6535ba..d8a83d94e1 100644 --- a/src/lib/components/chat/Messages/ResponseMessage.svelte +++ b/src/lib/components/chat/Messages/ResponseMessage.svelte @@ -1205,7 +1205,7 @@ {/if} - {#if message.usage && $visibleControls['chat.usage']} + {#if Object.keys(message.usage ?? {}).some((key) => key !== 'incomplete') && $visibleControls['chat.usage']} {@const usage = JSON.stringify(message.usage, null, 2) .replace(/"([^(")"]+)":/g, '$1:') .slice(1, -1)