Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions lib/codex-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4382,7 +4382,11 @@ async function handleManageAction(
): Promise<void> {
if (typeof menuResult.switchAccountIndex === "number") {
const index = menuResult.switchAccountIndex;
await runSwitch([String(index + 1)]);
await runSwitchCommand([String(index + 1)], {
setStoragePath,
loadAccounts,
persistAndSyncSelectedAccount,
});
return;
}

Expand Down Expand Up @@ -4796,14 +4800,6 @@ async function runAuthLogin(args: string[]): Promise<number> {
}
}

async function runSwitch(args: string[]): Promise<number> {
return runSwitchCommand(args, {
setStoragePath,
loadAccounts,
persistAndSyncSelectedAccount,
});
}

async function persistAndSyncSelectedAccount({
storage,
targetIndex,
Expand Down Expand Up @@ -5287,7 +5283,11 @@ export async function runCodexMultiAuthCli(rawArgs: string[]): Promise<number> {
});
}
if (command === "switch") {
return runSwitch(rest);
return runSwitchCommand(rest, {
setStoragePath,
loadAccounts,
persistAndSyncSelectedAccount,
});
}
if (command === "check") {
return runCheckCommand({ runHealthCheck });
Expand Down