Skip to content

The agent that grows with you

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

hermes-seaeye[bot]046a868b7f29
diff --git a/apps/desktop/electron/ssh-connection.test.ts b/apps/desktop/electron/ssh-connection.test.ts
index ef66dfef455..8af1cec722b 100644
--- a/apps/desktop/electron/ssh-connection.test.ts
+++ b/apps/desktop/electron/ssh-connection.test.ts
@@ -74,7 +74,10 @@ test('redactSecrets leaves legitimate ssh target logging untouched', () => {
redactSecrets('connecting (no-mux) to [email protected]:22'),
'connecting (no-mux) to [email protected]:22'
)
- assert.equal(redactSecrets('opening control master to [email protected]:2222'), 'opening control master to [email protected]:2222')
+ assert.equal(
+ redactSecrets('opening control master to [email protected]:2222'),
+ 'opening control master to [email protected]:2222'
+ )
})
test('controlSocketPath is stable, short, and host-distinct', () => {
@@ -686,6 +689,7 @@ test('validateSshTarget rejects whitespace in host (pasted ssh command)', () =>
test('validateSshTarget rejects a password glued into the host field', () => {
// Real incident shape: user typed host:PASSWORD (port parsed off upstream).
assert.throws(() => validateSshTarget('100.84.204.123:hunter2', 'root', 22), /password|":" segment/i)
+
// The thrown message must not echo the credential verbatim.
try {
validateSshTarget('100.84.204.123:hunter2', 'root', 22)
diff --git a/apps/desktop/electron/ssh-connection.ts b/apps/desktop/electron/ssh-connection.ts
index fa0c038b31e..5015f979e3e 100644
--- a/apps/desktop/electron/ssh-connection.ts
+++ b/apps/desktop/electron/ssh-connection.ts
@@ -70,7 +70,9 @@ function validateSshTarget(host, user, port) {
}
if (host.includes(',')) {
- throw new Error(`Invalid SSH host "${host}": commas are not valid in a hostname or IP (use dots, e.g. 192.168.1.10).`)
+ throw new Error(
+ `Invalid SSH host "${host}": commas are not valid in a hostname or IP (use dots, e.g. 192.168.1.10).`
+ )
}
if (host.includes(':')) {
diff --git a/apps/desktop/src/app/chat/composer/hooks/use-at-completions-contrib.test.tsx b/apps/desktop/src/app/chat/composer/hooks/use-at-completions-contrib.test.tsx
index 7333677ff6b..85ec5d6023e 100644
--- a/apps/desktop/src/app/chat/composer/hooks/use-at-completions-contrib.test.tsx
+++ b/apps/desktop/src/app/chat/composer/hooks/use-at-completions-contrib.test.tsx
@@ -64,9 +64,7 @@ afterEach(() => {
describe('contributed @ completion sources', () => {
it('merges contributed rows ahead of gateway path results', async () => {
vi.useFakeTimers()
- addSource('bots', q =>
- 'researcher'.startsWith(q) ? [{ insert: '@researcher', meta: 'Bot · Researcher' }] : []
- )
+ addSource('bots', q => ('researcher'.startsWith(q) ? [{ insert: '@researcher', meta: 'Bot · Researcher' }] : []))
const { result } = renderHook(() =>
useAtCompletions({ gateway: gatewayStub() as never, sessionId: 's1', cwd: '/repo' })
@@ -79,9 +77,7 @@ describe('contributed @ completion sources', () => {
it('drops rows when the query does not match the source filter', async () => {
vi.useFakeTimers()
- addSource('bots', q =>
- 'researcher'.startsWith(q) ? [{ insert: '@researcher', meta: 'Bot' }] : []
- )
+ addSource('bots', q => ('researcher'.startsWith(q) ? [{ insert: '@researcher', meta: 'Bot' }] : []))
const { result } = renderHook(() =>
useAtCompletions({ gateway: gatewayStub() as never, sessionId: 's1', cwd: '/repo' })
diff --git a/apps/desktop/src/app/chat/session-tile-actions.ts b/apps/desktop/src/app/chat/session-tile-actions.ts
index a56cc1ef04a..55419761601 100644
--- a/apps/desktop/src/app/chat/session-tile-actions.ts
+++ b/apps/desktop/src/app/chat/session-tile-actions.ts
@@ -514,7 +514,14 @@ export function useSessionTileActions({ runtimeId, scope, storedSessionId }: Ses
)
)
} catch (err) {
- update(state => ({ ...state, busy: false, awaitingResponse: false, turnLive: false, turnStartedAt: null, messages }))
+ update(state => ({
+ ...state,
+ busy: false,
+ awaitingResponse: false,
+ turnLive: false,
+ turnStartedAt: null,
+ messages
+ }))
throw err
}
},
@@ -555,7 +562,14 @@ export function useSessionTileActions({ runtimeId, scope, storedSessionId }: Ses
)
)
} catch (err) {
- update(state => ({ ...state, busy: false, awaitingResponse: false, turnLive: false, turnStartedAt: null, messages }))
+ update(state => ({
+ ...state,
+ busy: false,
+ awaitingResponse: false,
+ turnLive: false,
+ turnStartedAt: null,
+ messages
+ }))
notifyError(err, copy.editFailed)
}
},
diff --git a/apps/desktop/src/sdk/index.ts b/apps/desktop/src/sdk/index.ts
index 3be5a2c2d18..3c56a1ad9db 100644
--- a/apps/desktop/src/sdk/index.ts
+++ b/apps/desktop/src/sdk/index.ts
@@ -425,7 +425,13 @@ export const host = {
// Every contribution surface, plugin-reachable: register keybinds, palette
// commands, routes, themes, panes, composer extensions, and bar items with
// the same area ids + payload types core uses.
-export { COMPOSER_AREAS, type ComposerAtCompletionItem, type ComposerAtCompletionSource, type ComposerAttachmentProvider, type ComposerMiddleware } from '@/app/chat/composer/contrib'
+export {
+ COMPOSER_AREAS,
+ type ComposerAtCompletionItem,
+ type ComposerAtCompletionSource,
+ type ComposerAttachmentProvider,
+ type ComposerMiddleware
+} from '@/app/chat/composer/contrib'
// -- ui: the design language --------------------------------------------------