Merge pull request #400 from AutoMaker-Org/feat/codex-usage

feat: improve codex plan and usage detection
This commit is contained in:
Shirone
2026-01-10 15:29:33 +00:00
committed by GitHub
19 changed files with 1134 additions and 463 deletions

View File

@@ -2053,6 +2053,25 @@ export class HttpApiClient implements ElectronAPI {
// Codex API
codex = {
getUsage: (): Promise<CodexUsageResponse> => this.get('/api/codex/usage'),
getModels: (
refresh = false
): Promise<{
success: boolean;
models?: Array<{
id: string;
label: string;
description: string;
hasThinking: boolean;
supportsVision: boolean;
tier: 'premium' | 'standard' | 'basic';
isDefault: boolean;
}>;
cachedAt?: number;
error?: string;
}> => {
const url = `/api/codex/models${refresh ? '?refresh=true' : ''}`;
return this.get(url);
},
};
// Context API