mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-27 08:14:33 +08:00
df5cb6d771
CopilotQuotaFooter and CodexOauthQuotaFooter called their hooks with a hardcoded `enabled: true` plus an unconditional 5-minute refetch and refetchOnWindowFocus, so non-current reverse-proxy cards kept polling in violation of the project's "only the active provider auto-queries on cooldown" rule. With multiple Copilot or ChatGPT accounts bound to different cards, every card kept hitting its own usage endpoint. Adopt the same pattern as useUsageQuery: keep `enabled` independent of isCurrent so first-fetch and manual refresh still work, but gate refetchInterval / refetchIntervalInBackground / refetchOnWindowFocus on a new `autoQuery` option, and thread `isCurrent` from ProviderCard through the footers into the hooks.