fix(usage): only show CLI subscription quota for active provider

CLI-credential-based subscriptions (Claude/Codex/Gemini) read from a
single global credential file, so the quota always reflects the last
CLI login rather than a specific provider. Showing it on non-current
cards is misleading when multiple official subscriptions exist.

Apply the same isCurrent + autoQuery pattern already used by Copilot
and Codex OAuth: only query and render the quota footer when the
provider is the currently active one.
This commit is contained in:
Jason
2026-04-09 15:19:51 +08:00
parent bafe9e820d
commit 521571c4ca
3 changed files with 14 additions and 5 deletions
+1 -1
View File
@@ -369,7 +369,7 @@ export function ProviderCard({
isCurrent={isCurrent}
/>
) : isOfficial ? (
<SubscriptionQuotaFooter appId={appId} inline={true} />
<SubscriptionQuotaFooter appId={appId} inline={true} isCurrent={isCurrent} />
) : hasMultiplePlans ? (
<div className="flex items-center gap-2 text-xs text-gray-600 dark:text-gray-400">
<span className="font-medium">