style: prettier formatting from pre-commit hook

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Eyejoker
2026-03-24 03:49:00 +09:00
parent 3467e245d5
commit 5cd424017f
4 changed files with 16 additions and 12 deletions

View File

@@ -74,7 +74,8 @@ function resolveActiveIndex(accountDirs: string[]): number {
const hostAuth = readTextIfExists(path.join(HOST_CODEX_DIR, 'auth.json'));
if (hostAuth) {
const matchIndex = accountDirs.findIndex(
(accountDir) => readTextIfExists(path.join(accountDir, 'auth.json')) === hostAuth,
(accountDir) =>
readTextIfExists(path.join(accountDir, 'auth.json')) === hostAuth,
);
if (matchIndex >= 0) {
activeIndexCache = matchIndex;
@@ -93,7 +94,10 @@ function copyIfExists(src: string, dst: string): void {
}
function syncHostCodexAccount(accountDir: string): void {
copyIfExists(path.join(accountDir, 'auth.json'), path.join(HOST_CODEX_DIR, 'auth.json'));
copyIfExists(
path.join(accountDir, 'auth.json'),
path.join(HOST_CODEX_DIR, 'auth.json'),
);
}
export function getAllCodexAccounts(): CodexAccountState[] {
@@ -134,8 +138,7 @@ export function rotateCodexToken(_reason?: string): boolean {
const nextIndex =
candidates.find(
(index) => index !== activeIndex && !rateLimitedAccounts.has(index),
) ??
candidates.find((index) => index !== activeIndex);
) ?? candidates.find((index) => index !== activeIndex);
if (nextIndex === undefined) return false;