diff --git a/ui/src/components/account/flow-viz/account-card.tsx b/ui/src/components/account/flow-viz/account-card.tsx index f52ca1f6..babef8dc 100644 --- a/ui/src/components/account/flow-viz/account-card.tsx +++ b/ui/src/components/account/flow-viz/account-card.tsx @@ -299,7 +299,7 @@ export function AccountCard({ ) : quota && isCodexQuotaResult(quota) ? (

Rate Limits:

- {quota.windows?.map((w) => ( + {quota.windows.map((w) => (
{w.label} @@ -322,7 +322,7 @@ export function AccountCard({ ) : quota && isGeminiQuotaResult(quota) ? (

Buckets:

- {quota.buckets?.map((b) => ( + {quota.buckets.map((b) => (
{b.label} diff --git a/ui/src/hooks/use-cliproxy-stats.ts b/ui/src/hooks/use-cliproxy-stats.ts index 05fa0682..91dac614 100644 --- a/ui/src/hooks/use-cliproxy-stats.ts +++ b/ui/src/hooks/use-cliproxy-stats.ts @@ -9,6 +9,7 @@ import type { CodexQuotaResult, GeminiCliQuotaResult, } from '@/lib/api-client'; +import type { UnifiedQuotaResult } from '@/lib/utils'; /** Per-account usage statistics */ export interface AccountUsageStats { @@ -261,8 +262,8 @@ async function fetchGeminiQuotaApi(accountId: string): Promise { - if (!accountId) throw new Error('Account ID required'); - return fetchCodexQuotaApi(accountId); - }, - enabled: !!accountId, - staleTime: 30000, - refetchInterval: 60000, - }); -} - -/** - * Hook to get Gemini CLI quota for a specific account - */ -export function useGeminiQuota(accountId: string | null) { - return useQuery({ - queryKey: ['gemini-quota', accountId], - queryFn: async () => { - if (!accountId) throw new Error('Account ID required'); - return fetchGeminiQuotaApi(accountId); - }, - enabled: !!accountId, - staleTime: 30000, - refetchInterval: 60000, - }); -}