zen: show subscription usage in usage history

This commit is contained in:
Frank
2026-01-21 16:48:38 -05:00
parent a132b2a138
commit 80c808d186
2 changed files with 8 additions and 4 deletions

View File

@@ -42,7 +42,7 @@
font-family: var(--font-mono);
&[data-slot="usage-date"] {
color: var(--color-text);
color: var(--color-text-muted);
}
&[data-slot="usage-model"] {
@@ -53,8 +53,7 @@
}
&[data-slot="usage-cost"] {
color: var(--color-text);
font-weight: 500;
color: var(--color-text-muted);
}
[data-slot="tokens-with-breakdown"] {

View File

@@ -170,7 +170,12 @@ export function UsageSection() {
</div>
</td>
<td data-slot="usage-cost">
${usage.enrichment?.plan === "sub" ? "0.0000" : ((usage.cost ?? 0) / 100000000).toFixed(4)}
<Show
when={usage.enrichment?.plan === "sub"}
fallback={<>${((usage.cost ?? 0) / 100000000).toFixed(4)}</>}
>
subscription (${((usage.cost ?? 0) / 100000000).toFixed(4)})
</Show>
</td>
</tr>
)