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:
Bohdan Triapitsyn
2026-06-11 00:16:48 +03:00
parent 7b33805ea0
commit b46153801b
16 changed files with 381 additions and 0 deletions
@@ -10,6 +10,7 @@ import { buildResult } from '../utils/index.js';
import * as claude from './claude.js';
import * as codex from './codex.js';
import * as copilot from './copilot.js';
import * as cursor from './cursor.js';
import * as google from './google/index.js';
import * as kimi from './kimi.js';
import * as nanogpt from './nanogpt.js';
@@ -35,6 +36,12 @@ const registry = {
isConfigured: codex.isConfigured,
fetchQuota: codex.fetchQuota
},
cursor: {
providerId: cursor.providerId,
providerName: cursor.providerName,
isConfigured: cursor.isConfigured,
fetchQuota: cursor.fetchQuota
},
google: {
providerId: 'google',
providerName: 'Google',
@@ -155,6 +162,7 @@ export const fetchClaudeQuota = claude.fetchQuota;
export const fetchOpenaiQuota = openai.fetchQuota;
export const fetchGoogleQuota = google.fetchGoogleQuota;
export const fetchCodexQuota = codex.fetchQuota;
export const fetchCursorQuota = cursor.fetchQuota;
export const fetchCopilotQuota = copilot.fetchQuota;
export const fetchCopilotAddonQuota = copilot.fetchQuotaAddon;
export const fetchKimiQuota = kimi.fetchQuota;