feat(performance): update performance metrics handling and UI components

This commit is contained in:
CaIon
2026-05-12 16:04:15 +08:00
parent ba474393fb
commit 19fc384e67
37 changed files with 936 additions and 443 deletions
@@ -22,7 +22,7 @@ import {
Layers,
Gauge,
Zap,
Wallet,
Flame,
TrendingUp,
Activity,
type LucideIcon,
@@ -83,7 +83,7 @@ export function useModelStatCardsConfig(): StatCardConfig[] {
}
export function useSummaryCardsConfig(totals: {
remainDisplay: string
todayUsageDisplay: string
usedDisplay: string
requestCountDisplay: string
currencyLabel: string
@@ -93,13 +93,13 @@ export function useSummaryCardsConfig(totals: {
return [
{
key: 'balance',
title: t('Current Balance'),
value: totals.remainDisplay,
key: 'todayUsage',
title: t('Last 24h usage'),
value: totals.todayUsageDisplay,
description: totals.currencyEnabled
? `${t('Remaining quota')} (${totals.currencyLabel})`
: t('Remaining quota units'),
icon: Wallet,
? `${t('Consumed in the last 24 hours')} (${totals.currencyLabel})`
: t('Consumed in the last 24 hours'),
icon: Flame,
},
{
key: 'usage',