feat: parse retry-after from errors, cache codex usage per account
- Parse "try again at" time from rate-limit errors instead of fixed 1-hour cooldown, with 3-min buffer after reset - Pass error message to rotateToken/rotateCodexToken for parsing - Cache usage % and reset time per Codex account for dashboard - Persist cached usage in rotation state file across restarts - Show rate-limited Codex accounts with cached 100% + reset time - Fix dashboard text indicators (*!/space) for monospace alignment
This commit is contained in:
@@ -616,10 +616,14 @@ async function buildUsageContent(): Promise<string> {
|
||||
});
|
||||
}
|
||||
} else {
|
||||
// Show cached usage for rate-limited accounts
|
||||
const pct = acct.isRateLimited && acct.cachedUsagePct != null
|
||||
? acct.cachedUsagePct : -1;
|
||||
const reset = acct.resetAt || '';
|
||||
rows.push({
|
||||
name: `${label} ${acct.planType}`,
|
||||
h5pct: -1,
|
||||
h5reset: '',
|
||||
h5pct: pct,
|
||||
h5reset: reset,
|
||||
d7pct: -1,
|
||||
d7reset: '',
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user