Skip to content

Commit 7d58341

Browse files
fix(quota): distinguish codex pro plan labels
1 parent 74d9adc commit 7d58341

4 files changed

Lines changed: 11 additions & 4 deletions

File tree

src/components/quota/quotaConfigs.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -733,6 +733,7 @@ const renderAntigravityItems = (
733733
};
734734

735735
const PREMIUM_GEMINI_CLI_TIER_IDS = new Set(['g1-ultra-tier']);
736+
const PREMIUM_CODEX_PLAN_TYPES = new Set(['pro', 'prolite', 'pro-lite', 'pro_lite']);
736737

737738
const renderCodexItems = (
738739
quota: CodexQuotaState,
@@ -748,14 +749,17 @@ const renderCodexItems = (
748749
const normalized = normalizePlanType(pt);
749750
if (!normalized) return null;
750751
if (normalized === 'pro') return t('codex_quota.plan_pro');
752+
if (PREMIUM_CODEX_PLAN_TYPES.has(normalized) && normalized !== 'pro') {
753+
return t('codex_quota.plan_prolite');
754+
}
751755
if (normalized === 'plus') return t('codex_quota.plan_plus');
752756
if (normalized === 'team') return t('codex_quota.plan_team');
753757
if (normalized === 'free') return t('codex_quota.plan_free');
754758
return pt || normalized;
755759
};
756760

757761
const planLabel = getPlanLabel(planType);
758-
const isPremiumPlan = normalizePlanType(planType) === 'pro';
762+
const isPremiumPlan = PREMIUM_CODEX_PLAN_TYPES.has(normalizePlanType(planType) ?? '');
759763
const nodes: ReactNode[] = [];
760764

761765
if (planLabel) {

src/i18n/locales/en.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,8 @@
670670
"plan_plus": "Plus",
671671
"plan_team": "Team",
672672
"plan_free": "Free",
673-
"plan_pro": "Pro"
673+
"plan_pro": "Pro 20x",
674+
"plan_prolite": "Pro 5x"
674675
},
675676
"gemini_cli_quota": {
676677
"title": "Gemini CLI Quota",

src/i18n/locales/ru.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,8 @@
667667
"plan_plus": "Plus",
668668
"plan_team": "Team",
669669
"plan_free": "Free",
670-
"plan_pro": "Pro"
670+
"plan_pro": "Pro 20x",
671+
"plan_prolite": "Pro 5x"
671672
},
672673
"gemini_cli_quota": {
673674
"title": "Квота Gemini CLI",

src/i18n/locales/zh-CN.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,8 @@
670670
"plan_plus": "Plus",
671671
"plan_team": "Team",
672672
"plan_free": "Free",
673-
"plan_pro": "Pro"
673+
"plan_pro": "Pro 20x",
674+
"plan_prolite": "Pro 5x"
674675
},
675676
"gemini_cli_quota": {
676677
"title": "Gemini CLI 额度",

0 commit comments

Comments
 (0)