Skip to content

The agent that grows with you

fmt(js): `npm run fix` on merge (#123423)

hermes-seaeye[bot]d0288be5b333
diff --git a/apps/desktop/electron/host-published-token.ts b/apps/desktop/electron/host-published-token.ts
index d2083fd760d..73027aaa95f 100644
--- a/apps/desktop/electron/host-published-token.ts
+++ b/apps/desktop/electron/host-published-token.ts
@@ -50,6 +50,7 @@ export function hostRendezvousDirectory(env: HostRendezvousEnv): string {
}
const stateHomeEnv = String(env.stateHome || '').trim()
+
const stateHome =
stateHomeEnv && path.isAbsolute(stateHomeEnv) ? stateHomeEnv : path.join(env.home, '.local', 'state')
diff --git a/apps/desktop/electron/ssh-connection.test.ts b/apps/desktop/electron/ssh-connection.test.ts
index ce3a34c8272..2cd4224ae95 100644
--- a/apps/desktop/electron/ssh-connection.test.ts
+++ b/apps/desktop/electron/ssh-connection.test.ts
@@ -596,6 +596,7 @@ test('open() records what the failed ssh did in the desktop log (#80836)', async
const logs: string[] = []
const spawnFn = scriptedSpawn([{ code: 255, stderr: 'me@box: Permission denied (publickey).' }])
+
const conn = new SshConnection(
{ host: 'box', user: 'me' },
{ spawnFn, mux: false, rememberLog: line => logs.push(line) }
diff --git a/apps/desktop/electron/updater/channel-protocol.ts b/apps/desktop/electron/updater/channel-protocol.ts
index 348ecdd4622..9a7ad7ce902 100644
--- a/apps/desktop/electron/updater/channel-protocol.ts
+++ b/apps/desktop/electron/updater/channel-protocol.ts
@@ -87,8 +87,10 @@ export interface ChannelManifest {
const SHA256 = /^[a-f0-9]{64}$/
const COMMIT = /^[a-f0-9]{40}$/
const BUILD_ID = /^[a-f0-9]{32}$/
+
const VERSION =
/^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(?:-[0-9A-Za-z]+(?:[.-][0-9A-Za-z]+)*)?(?:\+[0-9A-Za-z]+(?:[.-][0-9A-Za-z]+)*)?$/
+
// rc.<N>-vX.Y.Z with N >= 1 without leading zeros and a release version whose
// major stays within three digits — one regex matching the Python grammar.
const ARCHIVE_REF = /^rc\.(?:[1-9]\d*)-v(?:0|[1-9]\d{0,2})\.(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)$/
diff --git a/apps/desktop/electron/updater/checkout-legacy.test.ts b/apps/desktop/electron/updater/checkout-legacy.test.ts
index 3b908612eb8..55084b88e85 100644
--- a/apps/desktop/electron/updater/checkout-legacy.test.ts
+++ b/apps/desktop/electron/updater/checkout-legacy.test.ts
@@ -93,6 +93,7 @@ it.skipIf(process.platform === 'win32')(
hermesHome: home,
channel: 'stable' as const
}
+
await expect(readSourceUpdate(probe)).resolves.toMatchObject({ supported: true, channel: 'stable', behind: null })
fs.rmSync(launcher)
await expect(readSourceUpdate(probe)).rejects.toThrow('installation launcher is missing')
diff --git a/apps/desktop/src/app/session/hooks/use-message-stream/gateway-event/fallback-switch.test.ts b/apps/desktop/src/app/session/hooks/use-message-stream/gateway-event/fallback-switch.test.ts
index eed90e94f1b..97f68fd414f 100644
--- a/apps/desktop/src/app/session/hooks/use-message-stream/gateway-event/fallback-switch.test.ts
+++ b/apps/desktop/src/app/session/hooks/use-message-stream/gateway-event/fallback-switch.test.ts
@@ -35,6 +35,7 @@ function statusContext(text: string, kind = 'lifecycle') {
function systemText(updateSessionState: ReturnType<typeof statusContext>['updateSessionState']): string {
const updater = updateSessionState.mock.calls[0]?.[1]
+
const next = updater?.({ messages: [] }) as
{ messages: Array<{ parts: Array<{ text?: string }>; role: string }> } | undefined
@@ -49,6 +50,7 @@ describe('desktop fallback switch', () => {
it('shows a model fallback switch in the transcript', () => {
const notice =
'⚠️ Model fallback: wan2.7-image-pro via alibaba-token-plan unavailable (bad request); using qwen3.8-max via alibaba-token-plan.'
+
const { ctx, updateSessionState } = statusContext(notice)
expect(handleStatusEvent(ctx)).toBe(true)
diff --git a/apps/desktop/src/store/projects.test.ts b/apps/desktop/src/store/projects.test.ts
index 7c63055b389..951c2157ef5 100644
--- a/apps/desktop/src/store/projects.test.ts
+++ b/apps/desktop/src/store/projects.test.ts
@@ -176,11 +176,13 @@ describe('projects RPC profile forwarding', () => {
const next = payload()
next.projects[1] = { ...next.projects[1], sessionCount: 1, sessionIds: ['s2'] }
+
const request = vi
.fn()
.mockResolvedValueOnce(payload())
.mockResolvedValueOnce(payload())
.mockResolvedValueOnce(next)
+
const gateway = { connectionState: 'open', request }
activeGateway.mockReturnValue(gateway as never)
gatewayAtom.set(gateway as never)