From 99bf65c539ca290922535892b0cde98b2fc33288 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Mon, 19 Jan 2026 01:11:42 +0000 Subject: [PATCH] style: apply oxfmt --- src/cli/argv.ts | 10 ++-------- src/cli/channels-cli.ts | 14 ++++---------- src/cli/program/message/helpers.ts | 28 ++++++++++++++-------------- src/commands/agent.test.ts | 5 +---- src/config/schema.ts | 3 +-- 5 files changed, 22 insertions(+), 38 deletions(-) diff --git a/src/cli/argv.ts b/src/cli/argv.ts index 2c3c8d8ce..5001881e7 100644 --- a/src/cli/argv.ts +++ b/src/cli/argv.ts @@ -45,19 +45,13 @@ export function getFlagValue(argv: string[], name: string): string | null | unde return undefined; } -export function getVerboseFlag( - argv: string[], - options?: { includeDebug?: boolean }, -): boolean { +export function getVerboseFlag(argv: string[], options?: { includeDebug?: boolean }): boolean { if (hasFlag(argv, "--verbose")) return true; if (options?.includeDebug && hasFlag(argv, "--debug")) return true; return false; } -export function getPositiveIntFlagValue( - argv: string[], - name: string, -): number | null | undefined { +export function getPositiveIntFlagValue(argv: string[], name: string): number | null | undefined { const raw = getFlagValue(argv, name); if (raw === null || raw === undefined) return raw; return parsePositiveInt(raw); diff --git a/src/cli/channels-cli.ts b/src/cli/channels-cli.ts index ee56a4a0a..9380dde44 100644 --- a/src/cli/channels-cli.ts +++ b/src/cli/channels-cli.ts @@ -197,8 +197,7 @@ export function registerChannelsCli(program: Command) { .option("--account ", "Account id (accountId)") .option("--verbose", "Verbose connection logs", false) .action(async (opts) => { - await runChannelsCommandWithDanger( - async () => { + await runChannelsCommandWithDanger(async () => { await runChannelLogin( { channel: opts.channel as string | undefined, @@ -207,9 +206,7 @@ export function registerChannelsCli(program: Command) { }, defaultRuntime, ); - }, - "Channel login failed", - ); + }, "Channel login failed"); }); channels @@ -218,8 +215,7 @@ export function registerChannelsCli(program: Command) { .option("--channel ", "Channel alias (default: whatsapp)") .option("--account ", "Account id (accountId)") .action(async (opts) => { - await runChannelsCommandWithDanger( - async () => { + await runChannelsCommandWithDanger(async () => { await runChannelLogout( { channel: opts.channel as string | undefined, @@ -227,8 +223,6 @@ export function registerChannelsCli(program: Command) { }, defaultRuntime, ); - }, - "Channel logout failed", - ); + }, "Channel logout failed"); }); } diff --git a/src/cli/program/message/helpers.ts b/src/cli/program/message/helpers.ts index 0f03a0b90..a2cfdc419 100644 --- a/src/cli/program/message/helpers.ts +++ b/src/cli/program/message/helpers.ts @@ -36,20 +36,20 @@ export function createMessageCliHelpers( await runCommandWithRuntime( defaultRuntime, async () => { - await messageCommand( - { - ...(() => { - const { account, ...rest } = opts; - return { - ...rest, - accountId: typeof account === "string" ? account : undefined, - }; - })(), - action, - }, - deps, - defaultRuntime, - ); + await messageCommand( + { + ...(() => { + const { account, ...rest } = opts; + return { + ...rest, + accountId: typeof account === "string" ? account : undefined, + }; + })(), + action, + }, + deps, + defaultRuntime, + ); }, (err) => { defaultRuntime.error(danger(String(err))); diff --git a/src/commands/agent.test.ts b/src/commands/agent.test.ts index 1cb41838e..bb8c84e27 100644 --- a/src/commands/agent.test.ts +++ b/src/commands/agent.test.ts @@ -361,10 +361,7 @@ describe("agentCommand", () => { const store = path.join(home, "sessions.json"); mockConfig(home, store); - await agentCommand( - { message: "hi", to: "+1555", accountId: "kev" }, - runtime, - ); + await agentCommand({ message: "hi", to: "+1555", accountId: "kev" }, runtime); const callArgs = vi.mocked(runEmbeddedPiAgent).mock.calls.at(-1)?.[0]; expect(callArgs?.agentAccountId).toBe("kev"); diff --git a/src/config/schema.ts b/src/config/schema.ts index c35a59bad..855d93be1 100644 --- a/src/config/schema.ts +++ b/src/config/schema.ts @@ -324,8 +324,7 @@ const FIELD_HELP: Record = { 'Optional allowlist of model ids (e.g. "gpt-5.2" or "openai/gpt-5.2").', "tools.exec.notifyOnExit": "When true (default), backgrounded exec sessions enqueue a system event and request a heartbeat on exit.", - "tools.exec.pathPrepend": - "Directories to prepend to PATH for exec runs (gateway/sandbox).", + "tools.exec.pathPrepend": "Directories to prepend to PATH for exec runs (gateway/sandbox).", "tools.message.allowCrossContextSend": "Legacy override: allow cross-context sends across all providers.", "tools.message.crossContext.allowWithinProvider":