fix: Gemini/Antigravity quota sources and update labels (#379)

* refactor: unify Google quota window logic and labels

* chore: add OAuth client id/secret and notes in quota providers
This commit is contained in:
gsxdsm
2026-02-11 11:23:46 +02:00
committed by GitHub
parent 1e797e99ca
commit 0bab4dfa26
4 changed files with 535 additions and 196 deletions
+2 -4
View File
@@ -1063,8 +1063,7 @@ export const Header: React.FC = () => {
const displayPercent = quotaDisplayMode === 'remaining'
? window.remainingPercent
: window.usedPercent;
// For model-level quotas, use '5h' as typical window label for Google models
const paceInfo = calculatePace(window.usedPercent, window.resetAt, window.windowSeconds, '5h');
const paceInfo = calculatePace(window.usedPercent, window.resetAt, window.windowSeconds);
const expectedMarker = paceInfo?.dailyAllocationPercent != null
? calculateExpectedUsagePercent(paceInfo.elapsedRatio)
: null;
@@ -1509,8 +1508,7 @@ export const Header: React.FC = () => {
const displayPercent = quotaDisplayMode === 'remaining'
? window.remainingPercent
: window.usedPercent;
// For model-level quotas, use '5h' as typical window label for Google models
const paceInfo = calculatePace(window.usedPercent, window.resetAt, window.windowSeconds, '5h');
const paceInfo = calculatePace(window.usedPercent, window.resetAt, window.windowSeconds);
const expectedMarker = paceInfo?.dailyAllocationPercent != null
? calculateExpectedUsagePercent(paceInfo.elapsedRatio)
: null;
+2 -1
View File
@@ -27,11 +27,12 @@ export const resolveUsageTone = (percent: number | null): 'safe' | 'warn' | 'cri
};
export const formatWindowLabel = (label: string): string => {
if (label === '5h') return '5-Hour Limit';
if (label === '5h') return '5-Hour';
if (label === '7d') return '7-Day Limit';
if (label === '7d-sonnet') return '7-Day Sonnet Limit';
if (label === '7d-opus') return '7-Day Opus Limit';
if (label === 'weekly') return 'Weekly Limit';
if (label === 'daily') return 'Daily';
if (label === 'monthly') return 'Monthly Limit';
if (label === 'credits') return 'Credits';
if (label === 'premium') return 'Premium Interactions';