feat: add Cursor usage quota tracking
Adds Cursor as a supported quota provider Reads Cursor auth from env, token files, or local app data Improves Cursor usage labels in the UI
This commit is contained in:
@@ -2571,6 +2571,11 @@ export const dict = {
|
||||
'quota.window.monthly': 'Monthly Limit',
|
||||
'quota.window.credits': 'Credits',
|
||||
'quota.window.creditsBalance': 'Credits Balance',
|
||||
'quota.window.billingCycle': 'Billing Cycle',
|
||||
'quota.window.auto': 'Auto',
|
||||
'quota.window.api': 'API',
|
||||
'quota.window.planLimit': 'Plan Limit',
|
||||
'quota.window.onDemand': 'On-demand',
|
||||
'quota.window.session': 'Session',
|
||||
'quota.window.premium': 'Premium Interactions',
|
||||
'quota.window.chat': 'Chat Requests',
|
||||
|
||||
@@ -2572,6 +2572,11 @@ export const dict: Record<I18nKey, string> = {
|
||||
"quota.window.monthly": "Monthly Limit",
|
||||
"quota.window.credits": "Credits",
|
||||
"quota.window.creditsBalance": "Credits Balance",
|
||||
"quota.window.billingCycle": "Billing Cycle",
|
||||
"quota.window.auto": "Auto",
|
||||
"quota.window.api": "API",
|
||||
"quota.window.planLimit": "Plan Limit",
|
||||
"quota.window.onDemand": "On-demand",
|
||||
"quota.window.session": "Session",
|
||||
"quota.window.premium": "Premium Interactions",
|
||||
"quota.window.chat": "Chat Requests",
|
||||
|
||||
@@ -2381,6 +2381,11 @@ export const dict = {
|
||||
'quota.window.monthly': 'Limite mensuelle',
|
||||
'quota.window.credits': 'Crédits',
|
||||
'quota.window.creditsBalance': 'Solde de crédits',
|
||||
'quota.window.billingCycle': 'Cycle de facturation',
|
||||
'quota.window.auto': 'Auto',
|
||||
'quota.window.api': 'API',
|
||||
'quota.window.planLimit': 'Limite du forfait',
|
||||
'quota.window.onDemand': 'À la demande',
|
||||
'quota.window.session': 'Session',
|
||||
'quota.window.premium': 'Interactions premium',
|
||||
'quota.window.chat': 'Requêtes de chat',
|
||||
|
||||
@@ -2571,6 +2571,11 @@ export const dict: Record<I18nKey, string> = {
|
||||
'quota.window.monthly': 'Monthly Limit',
|
||||
'quota.window.credits': 'Credits',
|
||||
'quota.window.creditsBalance': 'Credits Balance',
|
||||
'quota.window.billingCycle': 'Billing Cycle',
|
||||
'quota.window.auto': 'Auto',
|
||||
'quota.window.api': 'API',
|
||||
'quota.window.planLimit': 'Plan Limit',
|
||||
'quota.window.onDemand': 'On-demand',
|
||||
'quota.window.session': 'Session',
|
||||
'quota.window.premium': 'Premium Interactions',
|
||||
'quota.window.chat': 'Chat Requests',
|
||||
|
||||
@@ -2588,6 +2588,11 @@ export const dict: Record<I18nKey, string> = {
|
||||
'quota.window.monthly': 'Monthly Limit',
|
||||
'quota.window.credits': 'Credits',
|
||||
'quota.window.creditsBalance': 'Credits Balance',
|
||||
'quota.window.billingCycle': 'Billing Cycle',
|
||||
'quota.window.auto': 'Auto',
|
||||
'quota.window.api': 'API',
|
||||
'quota.window.planLimit': 'Plan Limit',
|
||||
'quota.window.onDemand': 'On-demand',
|
||||
'quota.window.session': 'Session',
|
||||
'quota.window.premium': 'Premium Interactions',
|
||||
'quota.window.chat': 'Chat Requests',
|
||||
|
||||
@@ -2572,6 +2572,11 @@ export const dict: Record<I18nKey, string> = {
|
||||
"quota.window.monthly": "Monthly Limit",
|
||||
"quota.window.credits": "Credits",
|
||||
"quota.window.creditsBalance": "Credits Balance",
|
||||
"quota.window.billingCycle": "Billing Cycle",
|
||||
"quota.window.auto": "Auto",
|
||||
"quota.window.api": "API",
|
||||
"quota.window.planLimit": "Plan Limit",
|
||||
"quota.window.onDemand": "On-demand",
|
||||
"quota.window.session": "Session",
|
||||
"quota.window.premium": "Premium Interactions",
|
||||
"quota.window.chat": "Chat Requests",
|
||||
|
||||
@@ -2572,6 +2572,11 @@ export const dict: Record<I18nKey, string> = {
|
||||
"quota.window.monthly": "Monthly Limit",
|
||||
"quota.window.credits": "Credits",
|
||||
"quota.window.creditsBalance": "Credits Balance",
|
||||
"quota.window.billingCycle": "Billing Cycle",
|
||||
"quota.window.auto": "Auto",
|
||||
"quota.window.api": "API",
|
||||
"quota.window.planLimit": "Plan Limit",
|
||||
"quota.window.onDemand": "On-demand",
|
||||
"quota.window.session": "Session",
|
||||
"quota.window.premium": "Premium Interactions",
|
||||
"quota.window.chat": "Chat Requests",
|
||||
|
||||
@@ -2572,6 +2572,11 @@ export const dict: Record<I18nKey, string> = {
|
||||
'quota.window.monthly': 'Monthly Limit',
|
||||
'quota.window.credits': 'Credits',
|
||||
'quota.window.creditsBalance': 'Credits Balance',
|
||||
'quota.window.billingCycle': 'Billing Cycle',
|
||||
'quota.window.auto': 'Auto',
|
||||
'quota.window.api': 'API',
|
||||
'quota.window.planLimit': 'Plan Limit',
|
||||
'quota.window.onDemand': 'On-demand',
|
||||
'quota.window.session': 'Session',
|
||||
'quota.window.premium': 'Premium Interactions',
|
||||
'quota.window.chat': 'Chat Requests',
|
||||
|
||||
@@ -2571,6 +2571,11 @@ export const dict: Record<I18nKey, string> = {
|
||||
'quota.window.monthly': 'Monthly Limit',
|
||||
'quota.window.credits': 'Credits',
|
||||
'quota.window.creditsBalance': 'Credits Balance',
|
||||
'quota.window.billingCycle': 'Billing Cycle',
|
||||
'quota.window.auto': 'Auto',
|
||||
'quota.window.api': 'API',
|
||||
'quota.window.planLimit': 'Plan Limit',
|
||||
'quota.window.onDemand': 'On-demand',
|
||||
'quota.window.session': 'Session',
|
||||
'quota.window.premium': 'Premium Interactions',
|
||||
'quota.window.chat': 'Chat Requests',
|
||||
|
||||
@@ -8,6 +8,7 @@ export interface QuotaProviderMeta {
|
||||
export const QUOTA_PROVIDERS: QuotaProviderMeta[] = [
|
||||
{ id: 'claude', name: 'Claude' },
|
||||
{ id: 'codex', name: 'Codex' },
|
||||
{ id: 'cursor', name: 'Cursor' },
|
||||
{ id: 'github-copilot', name: 'GitHub Copilot' },
|
||||
{ id: 'google', name: 'Google' },
|
||||
{ id: 'kimi-for-coding', name: 'Kimi for Coding' },
|
||||
|
||||
@@ -82,6 +82,11 @@ export const formatWindowLabel = (label: string): string => {
|
||||
if (label === 'monthly') return t('quota.window.monthly');
|
||||
if (label === 'credits') return t('quota.window.credits');
|
||||
if (label === 'credits_balance') return t('quota.window.creditsBalance');
|
||||
if (label === 'billing_cycle') return t('quota.window.billingCycle');
|
||||
if (label === 'auto') return t('quota.window.auto');
|
||||
if (label === 'api') return t('quota.window.api');
|
||||
if (label === 'plan_limit') return t('quota.window.planLimit');
|
||||
if (label === 'on_demand') return t('quota.window.onDemand');
|
||||
if (label === 'session') return t('quota.window.session');
|
||||
if (label === 'premium') return t('quota.window.premium');
|
||||
if (label === 'chat') return t('quota.window.chat');
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
export type QuotaProviderId =
|
||||
| 'openai'
|
||||
| 'codex'
|
||||
| 'cursor'
|
||||
| 'claude'
|
||||
| 'github-copilot'
|
||||
| 'github-copilot-addon'
|
||||
|
||||
Reference in New Issue
Block a user