From 1b8e34e9456337955cb90a4e29afbaf7785189d1 Mon Sep 17 00:00:00 2001 From: "hermes-seaeye[bot]" <307254004+hermes-seaeye[bot]@users.noreply.github.com> Date: Wed, 22 Jul 2026 21:56:16 +0000 Subject: [PATCH] fmt(js): `npm run fix` on merge (#69644) Co-authored-by: github-actions[bot] --- .../app/session/hooks/use-prompt-actions/index.test.tsx | 4 +++- .../src/app/session/hooks/use-prompt-actions/slash.ts | 8 +++++++- .../src/app/session/hooks/use-prompt-actions/utils.ts | 4 +++- .../src/app/session/hooks/use-session-state-cache.ts | 3 ++- apps/desktop/src/components/model-picker.tsx | 8 ++------ apps/desktop/src/lib/desktop-slash-commands.ts | 7 ++++++- 6 files changed, 23 insertions(+), 11 deletions(-) diff --git a/apps/desktop/src/app/session/hooks/use-prompt-actions/index.test.tsx b/apps/desktop/src/app/session/hooks/use-prompt-actions/index.test.tsx index cac5495fbfcb..13e4b6661ae5 100644 --- a/apps/desktop/src/app/session/hooks/use-prompt-actions/index.test.tsx +++ b/apps/desktop/src/app/session/hooks/use-prompt-actions/index.test.tsx @@ -469,7 +469,9 @@ describe('usePromptActions /compress', () => { ]) ) expect($notifications.get()).not.toEqual( - expect.arrayContaining([expect.objectContaining({ kind: 'success', message: expect.stringContaining('Compression aborted') })]) + expect.arrayContaining([ + expect.objectContaining({ kind: 'success', message: expect.stringContaining('Compression aborted') }) + ]) ) }) diff --git a/apps/desktop/src/app/session/hooks/use-prompt-actions/slash.ts b/apps/desktop/src/app/session/hooks/use-prompt-actions/slash.ts index 78bc00077914..0edbea218b22 100644 --- a/apps/desktop/src/app/session/hooks/use-prompt-actions/slash.ts +++ b/apps/desktop/src/app/session/hooks/use-prompt-actions/slash.ts @@ -432,7 +432,13 @@ export function useSlashCommand(deps: SlashCommandDeps) { // system message would look like a successful state change. renderSlashOutput(lines.join('\n')) } - notify({ durationMs: 5_000, id: noticeId, kind: aborted ? 'error' : 'success', message: lines.join('\n') }) + + notify({ + durationMs: 5_000, + id: noticeId, + kind: aborted ? 'error' : 'success', + message: lines.join('\n') + }) return } diff --git a/apps/desktop/src/app/session/hooks/use-prompt-actions/utils.ts b/apps/desktop/src/app/session/hooks/use-prompt-actions/utils.ts index 3da0f9c983be..42598fb54627 100644 --- a/apps/desktop/src/app/session/hooks/use-prompt-actions/utils.ts +++ b/apps/desktop/src/app/session/hooks/use-prompt-actions/utils.ts @@ -248,7 +248,9 @@ export function renderRpcResult(response: unknown, name: string): string { // process.stop — { killed: number } if ('killed' in r && typeof r.killed === 'number') { - return r.killed > 0 ? `Stopped ${r.killed} background process${r.killed === 1 ? '' : 'es'}.` : 'No background processes to stop.' + return r.killed > 0 + ? `Stopped ${r.killed} background process${r.killed === 1 ? '' : 'es'}.` + : 'No background processes to stop.' } // session.save — { file } diff --git a/apps/desktop/src/app/session/hooks/use-session-state-cache.ts b/apps/desktop/src/app/session/hooks/use-session-state-cache.ts index 298eecf081c3..7e0d7278ed77 100644 --- a/apps/desktop/src/app/session/hooks/use-session-state-cache.ts +++ b/apps/desktop/src/app/session/hooks/use-session-state-cache.ts @@ -19,9 +19,10 @@ import { } from '@/store/session' import { publishSessionState } from '@/store/session-states' -import { chatMessageArraysEquivalent } from './use-session-actions/utils' import type { ClientSessionState } from '../../types' +import { chatMessageArraysEquivalent } from './use-session-actions/utils' + interface SessionStateCacheOptions { activeSessionId: string | null busyRef: MutableRefObject diff --git a/apps/desktop/src/components/model-picker.tsx b/apps/desktop/src/components/model-picker.tsx index 33028073522d..73e3401e078f 100644 --- a/apps/desktop/src/components/model-picker.tsx +++ b/apps/desktop/src/components/model-picker.tsx @@ -268,9 +268,7 @@ function ModelPrice({ price, isCurrent }: { price?: ModelPricing; isCurrent: boo ) } - const onSale = - typeof price.discount_percent === 'number' && - Boolean(price.was_input || price.was_output) + const onSale = typeof price.discount_percent === 'number' && Boolean(price.was_input || price.was_output) return ( -{price.discount_percent}% diff --git a/apps/desktop/src/lib/desktop-slash-commands.ts b/apps/desktop/src/lib/desktop-slash-commands.ts index 3b386e401b31..22ae4e590e42 100644 --- a/apps/desktop/src/lib/desktop-slash-commands.ts +++ b/apps/desktop/src/lib/desktop-slash-commands.ts @@ -190,7 +190,12 @@ const DESKTOP_COMMAND_SPECS: readonly DesktopCommandSpec[] = [ // them, /steer falls back to a next-turn prompt, and /usage is a formatted // live report. Keep them on slash.exec until their RPC contracts are fully // equivalent. - { name: '/agents', description: 'Show active desktop sessions and running tasks', aliases: ['/tasks'], surface: exec() }, + { + name: '/agents', + description: 'Show active desktop sessions and running tasks', + aliases: ['/tasks'], + surface: exec() + }, { name: '/background', description: 'Run a prompt in the background', aliases: ['/bg', '/btw'], surface: exec() }, // /compress must be an action (session.compress RPC), not exec: the slash // worker route times out on large sessions (30s WS / 45s pipe) before the