From 54a5068e105d4dc5ccf994af5fcfe87f54cbdd5e Mon Sep 17 00:00:00 2001 From: ndycode Date: Sat, 21 Mar 2026 04:32:54 +0800 Subject: [PATCH] refactor: route list and status through command module --- lib/codex-manager.ts | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/lib/codex-manager.ts b/lib/codex-manager.ts index 4f7b6825..af128432 100644 --- a/lib/codex-manager.ts +++ b/lib/codex-manager.ts @@ -1983,15 +1983,6 @@ async function syncSelectionToCodex( }); } -async function showAccountStatus(): Promise { - await runStatusCommand({ - setStoragePath, - loadAccounts, - resolveActiveIndex, - formatRateLimitEntry, - }); -} - interface HealthCheckOptions { forceRefresh?: boolean; liveProbe?: boolean; @@ -5292,8 +5283,12 @@ export async function runCodexMultiAuthCli(rawArgs: string[]): Promise { return runAuthLogin(rest); } if (command === "list" || command === "status") { - await showAccountStatus(); - return 0; + return runStatusCommand({ + setStoragePath, + loadAccounts, + resolveActiveIndex, + formatRateLimitEntry, + }); } if (command === "switch") { return runSwitch(rest);