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

@@ -253,7 +253,9 @@ export async function fetchClaudeUsageViaCli(
});
}
export async function fetchAllClaudeProfiles(): Promise<ClaudeAccountProfile[]> {
export async function fetchAllClaudeProfiles(): Promise<
ClaudeAccountProfile[]
> {
return ensureProfiles();
}

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;

View File

@@ -105,10 +105,7 @@ export function evaluateTaskSuspension(
/**
* Apply suspension to a task in the DB.
*/
export function suspendTask(
taskId: string,
suspendedUntil: string,
): void {
export function suspendTask(taskId: string, suspendedUntil: string): void {
updateTask(taskId, { suspended_until: suspendedUntil });
logger.info(
{ taskId, suspendedUntil },

View File

@@ -29,7 +29,10 @@ function syncHostClaudeAccount(accountDir: string): void {
path.join(accountDir, '.credentials.json'),
path.join(HOST_CLAUDE_DIR, '.credentials.json'),
);
copyIfExists(path.join(accountDir, 'settings.json'), path.join(HOST_CLAUDE_DIR, 'settings.json'));
copyIfExists(
path.join(accountDir, 'settings.json'),
path.join(HOST_CLAUDE_DIR, 'settings.json'),
);
}
export function getTokenCount(): number {
@@ -47,8 +50,7 @@ export function rotateToken(_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;