mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-02 20:43:36 +00:00
merge in v0.9.0
This commit is contained in:
@@ -681,20 +681,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