Fix Codex auth import and reset credit details
# Conflicts: # app/(tabs)/codex.tsx # app/(tabs)/index.tsx # app/(tabs)/settings.tsx # hooks/useCodexUsage.ts # lib/api/codexApi.ts # package-lock.json # package.json
This commit is contained in:
@@ -56,7 +56,7 @@ export async function scheduleDailyDigest(
|
||||
}
|
||||
if (codexUsage) {
|
||||
parts.push(
|
||||
`Codex: ${Math.round(codexUsage.rate_limit.secondary_window.used_percent)}% used`
|
||||
`Codex: ${Math.round(codexUsage.secondary?.usedPercent ?? 0)}% used`
|
||||
);
|
||||
}
|
||||
|
||||
@@ -106,7 +106,7 @@ function buildThresholdAlerts(
|
||||
}
|
||||
|
||||
if (codexUsage) {
|
||||
const remaining = 100 - codexUsage.rate_limit.secondary_window.used_percent;
|
||||
const remaining = 100 - (codexUsage.secondary?.usedPercent ?? 0);
|
||||
if (remaining <= thresholdPct) {
|
||||
alerts.push({ service: "Codex", window: "weekly", remaining });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user