mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-01 20:23:36 +00:00
feat: add unified usage popover with Claude and Codex tabs
- Created combined UsagePopover component with tab switching between providers - Added Codex usage API endpoint and service (returns not available message) - Updated BoardHeader to show single usage button for both providers - Enhanced type definitions for Codex usage with primary/secondary rate limits - Wired up Codex usage API in HTTP client 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -646,20 +646,24 @@ export interface CodexRateLimitWindow {
|
||||
limit: number;
|
||||
used: number;
|
||||
remaining: number;
|
||||
window: number; // Duration in minutes
|
||||
usedPercent: number; // Percentage used (0-100)
|
||||
windowDurationMins: number; // Duration in minutes
|
||||
resetsAt: number; // Unix timestamp in seconds
|
||||
}
|
||||
|
||||
export interface CodexUsage {
|
||||
planType: CodexPlanType | null;
|
||||
credits: CodexCreditsSnapshot | null;
|
||||
rateLimits: {
|
||||
session?: CodexRateLimitWindow;
|
||||
weekly?: CodexRateLimitWindow;
|
||||
primary?: CodexRateLimitWindow;
|
||||
secondary?: CodexRateLimitWindow;
|
||||
credits?: CodexCreditsSnapshot;
|
||||
planType?: CodexPlanType;
|
||||
} | null;
|
||||
lastUpdated: string;
|
||||
}
|
||||
|
||||
// Response type for Codex usage API (can be success or error)
|
||||
export type CodexUsageResponse = CodexUsage | { error: string; message?: string };
|
||||
|
||||
/**
|
||||
* Check if Claude usage is at its limit (any of: session >= 100%, weekly >= 100%, OR cost >= limit)
|
||||
* Returns true if any limit is reached, meaning auto mode should pause feature pickup.
|
||||
|
||||
Reference in New Issue
Block a user