diff --git a/lib/codex-manager.ts b/lib/codex-manager.ts index b1c32ea7..ac2598ff 100644 --- a/lib/codex-manager.ts +++ b/lib/codex-manager.ts @@ -2834,35 +2834,6 @@ function applyDoctorFixes(storage: AccountStorageV3): { return { changed, actions }; } -async function runDoctor(args: string[]): Promise { - return runDoctorCommand(args, { - setStoragePath, - getStoragePath, - getCodexCliAuthPath, - getCodexCliConfigPath, - loadCodexCliState, - parseDoctorArgs, - printDoctorUsage, - loadAccounts, - applyDoctorFixes, - saveAccounts, - resolveActiveIndex, - evaluateForecastAccounts, - recommendForecastAccount, - sanitizeEmail, - extractAccountEmail, - extractAccountId, - hasPlaceholderEmail, - hasLikelyInvalidRefreshToken, - getDoctorRefreshTokenKey, - hasUsableAccessToken, - queuedRefresh, - normalizeFailureDetail, - applyTokenAccountIdentity, - setCodexCliActiveSelection, - }); -} - async function clearAccountsAndReset(): Promise { await clearAccounts(); } @@ -3600,7 +3571,32 @@ export async function runCodexMultiAuthCli(rawArgs: string[]): Promise { return runFix(rest); } if (command === "doctor") { - return runDoctor(rest); + return runDoctorCommand(rest, { + setStoragePath, + getStoragePath, + getCodexCliAuthPath, + getCodexCliConfigPath, + loadCodexCliState, + parseDoctorArgs, + printDoctorUsage, + loadAccounts, + applyDoctorFixes, + saveAccounts, + resolveActiveIndex, + evaluateForecastAccounts, + recommendForecastAccount, + sanitizeEmail, + extractAccountEmail, + extractAccountId, + hasPlaceholderEmail, + hasLikelyInvalidRefreshToken, + getDoctorRefreshTokenKey, + hasUsableAccessToken, + queuedRefresh, + normalizeFailureDetail, + applyTokenAccountIdentity, + setCodexCliActiveSelection, + }); } console.error(`Unknown command: ${command}`);