diff --git a/docs/api.md b/docs/api.md index 54eea9ec7..5658a2880 100644 --- a/docs/api.md +++ b/docs/api.md @@ -1781,7 +1781,8 @@ OAuth 账号优先按可归属整个账号的实际周/月额度窗口统计, Antigravity 按部署时区汇总今天及前 6 天,`usage.windowKind` 为 `recent_week`,管理端显示“近一周”;其他 Provider 默认使用过去 24 小时,返回 `daily`。 Token 与模型用量共用该范围,上游额度快照缺失时仍可展示本地统计;账号请求小时图仍独立展示最近 24 个 UTC 小时桶 -账号列表展示额度桶时,Token 取自使用率对应窗口的 `localUsage`。桶内所有窗口的使用率均未知时取第一个展示窗口。窗口用量为零时显示 `0`,缺少统计时显示 `—` +账号列表展示额度桶时,Token 取自使用率对应窗口的 `localUsage`。桶内所有窗口的使用率均未知时取第一个展示窗口。 +缺少窗口统计时显示 `—`。账号列表统一隐藏为零的 Token 用量 批量导入 AT / RT 使用 `accounts` JSON 数组,最多 200 项,不接受纯文本 token 列表。例如: diff --git a/frontend/src/views/accounts/components/account-quota-summary-cell/index.vue b/frontend/src/views/accounts/components/account-quota-summary-cell/index.vue index eaa6dfb23..a913c763d 100644 --- a/frontend/src/views/accounts/components/account-quota-summary-cell/index.vue +++ b/frontend/src/views/accounts/components/account-quota-summary-cell/index.vue @@ -41,10 +41,17 @@ const recentUsageEntry = computed(() => recentlyUsedQuotaEntry( const currentUsageWindow = computed(() => representativeQuotaWindow(recentUsageEntry.value)) const tokenDisplay = computed(() => { const window = currentUsageWindow.value ?? recentUsageEntry.value?.windows[0] - if (window && !localUsageOnly.value) - return quotaWindowTokens(window)?.display ?? '—' + if (window && !localUsageOnly.value) { + const tokens = quotaWindowTokens(window) + return tokens?.total === 0 + ? null + : tokens?.display ?? '—' + } const usage = props.account.usage + if (usage.totalTokens === 0) + return null + return localUsageOnly.value || (usage.totalTokens ?? 0) > 0 ? usage.totalTokensDisplay : null