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:
@@ -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;
|
||||
|
||||
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user