Skip to content

The agent that grows with you

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

hermes-seaeye[bot]891ec3fb6c41
diff --git a/apps/desktop/src/app/chat/sidebar/profile-remote-override-dialog.tsx b/apps/desktop/src/app/chat/sidebar/profile-remote-override-dialog.tsx
index acf71926fd9..cfd9bd00df1 100644
--- a/apps/desktop/src/app/chat/sidebar/profile-remote-override-dialog.tsx
+++ b/apps/desktop/src/app/chat/sidebar/profile-remote-override-dialog.tsx
@@ -152,7 +152,11 @@ export function ProfileRemoteOverrideDialog({ profileNames }: { profileNames: st
...(allowPlainText ? { allowPlainTextToken: true } : {})
})
- notify({ kind: 'success', title: p.savedTitle, message: p.savedMessage(profile, remoteHostLabel(trimmedUrl) || trimmedUrl) })
+ notify({
+ kind: 'success',
+ title: p.savedTitle,
+ message: p.savedMessage(profile, remoteHostLabel(trimmedUrl) || trimmedUrl)
+ })
await refreshProfileRemoteOverrides(profileNames)
closeRemoteOverrideDialog()
} catch (err) {
diff --git a/apps/desktop/src/app/session/hooks/use-session-actions/index.ts b/apps/desktop/src/app/session/hooks/use-session-actions/index.ts
index 287f3500bf5..810f6beebff 100644
--- a/apps/desktop/src/app/session/hooks/use-session-actions/index.ts
+++ b/apps/desktop/src/app/session/hooks/use-session-actions/index.ts
@@ -634,12 +634,9 @@ export function useSessionActions({
if (!stored) {
const closeCreated = capturedRoute
- ? requestGatewayForAgent(
- capturedRoute.connectionId,
- capturedRoute.profile,
- 'session.close',
- { session_id: created.session_id }
- )
+ ? requestGatewayForAgent(capturedRoute.connectionId, capturedRoute.profile, 'session.close', {
+ session_id: created.session_id
+ })
: requestGateway('session.close', { session_id: created.session_id })
await closeCreated.catch(() => undefined)
diff --git a/apps/desktop/src/components/pane-shell/tree/renderer/workspace-scope.test.tsx b/apps/desktop/src/components/pane-shell/tree/renderer/workspace-scope.test.tsx
index 310d85943b6..29cba946c9e 100644
--- a/apps/desktop/src/components/pane-shell/tree/renderer/workspace-scope.test.tsx
+++ b/apps/desktop/src/components/pane-shell/tree/renderer/workspace-scope.test.tsx
@@ -23,7 +23,11 @@ function render(ui: ReactNode) {
act(() => root!.render(ui))
}
-function register(id: string, title: string, scope: { workspaceMode?: 'sessions' | 'bots'; workspaceOwnerKey?: string } = {}) {
+function register(
+ id: string,
+ title: string,
+ scope: { workspaceMode?: 'sessions' | 'bots'; workspaceOwnerKey?: string } = {}
+) {
disposers.push(
registry.register({
area: 'panes',
diff --git a/apps/desktop/src/components/pane-shell/workspace-scope.test.ts b/apps/desktop/src/components/pane-shell/workspace-scope.test.ts
index 241a4da966d..49686f0f7bd 100644
--- a/apps/desktop/src/components/pane-shell/workspace-scope.test.ts
+++ b/apps/desktop/src/components/pane-shell/workspace-scope.test.ts
@@ -70,9 +70,7 @@ describe('workspace scope', () => {
expect($workspaceNewSessionTarget.get()).toEqual({ kind: 'route', route })
// Equivalent route objects are a semantic no-op, not a new render signal.
- expect(
- setWorkspaceScope('bots', 'bot:connection-a::writer', { kind: 'route', route: { ...route } })
- ).toBe(false)
+ expect(setWorkspaceScope('bots', 'bot:connection-a::writer', { kind: 'route', route: { ...route } })).toBe(false)
setWorkspaceScope('sessions')
expect($workspaceNewSessionTarget.get()).toBeNull()
@@ -141,9 +139,10 @@ describe('filterContributionsForWorkspace', () => {
'global-1',
'bot:alpha'
])
- expect(
- filterContributionsForWorkspace(contributions, 'sessions', null).map(c => c.id)
- ).toEqual(['global-1', 'sessions-only'])
+ expect(filterContributionsForWorkspace(contributions, 'sessions', null).map(c => c.id)).toEqual([
+ 'global-1',
+ 'sessions-only'
+ ])
})
it('returns the original array reference on a no-op', () => {
diff --git a/apps/desktop/src/components/pane-shell/workspace-scope.ts b/apps/desktop/src/components/pane-shell/workspace-scope.ts
index a034477b04a..c9770d8977c 100644
--- a/apps/desktop/src/components/pane-shell/workspace-scope.ts
+++ b/apps/desktop/src/components/pane-shell/workspace-scope.ts
@@ -35,8 +35,7 @@ export interface WorkspaceSessionRoute {
/** What the shared `+` / session.newTab command means in this workspace. */
export type WorkspaceNewSessionTarget =
- | { kind: 'blocked'; message: string }
- | { kind: 'route'; route: WorkspaceSessionRoute }
+ { kind: 'blocked'; message: string } | { kind: 'route'; route: WorkspaceSessionRoute }
/** Sessions uses its established ambient behavior (`null`). Bots publishes an
* exact route or a concise reason that a generic session is unavailable. */
@@ -189,10 +188,7 @@ export function rememberActivePane(ownerKey: string, paneId: string): void {
* panes. A remembered pane that has since been removed must not restore: the
* fallback is the first eligible pane, or null when none are eligible.
*/
-export function resolveRememberedActivePane(
- ownerKey: string,
- eligiblePaneIds: readonly string[]
-): string | null {
+export function resolveRememberedActivePane(ownerKey: string, eligiblePaneIds: readonly string[]): string | null {
const remembered = rememberedActivePanes.get(ownerKey)
if (remembered != null && eligiblePaneIds.includes(remembered)) {
diff --git a/apps/desktop/src/i18n/en.ts b/apps/desktop/src/i18n/en.ts
index e4a112700e3..df70b466378 100644
--- a/apps/desktop/src/i18n/en.ts
+++ b/apps/desktop/src/i18n/en.ts
@@ -1819,8 +1819,7 @@ export const en: Translations = {
menuItem: 'Connect to a remote host…',
badge: (host: string) => `Runs on ${host}`,
title: (profile: string) => `Connect ${profile} to a remote host`,
- description:
- 'Sessions in this profile will run on the remote Hermes you point it at, instead of this computer.',
+ description: 'Sessions in this profile will run on the remote Hermes you point it at, instead of this computer.',
urlLabel: 'Remote address',
urlPlaceholder: 'https://hermes.example.com',
urlInvalid: 'Enter a full address starting with http:// or https://',
diff --git a/apps/desktop/src/i18n/zh-hant.ts b/apps/desktop/src/i18n/zh-hant.ts
index 7edaa7c6e63..b9b55e0490f 100644
--- a/apps/desktop/src/i18n/zh-hant.ts
+++ b/apps/desktop/src/i18n/zh-hant.ts
@@ -1483,8 +1483,7 @@ export const zhHant = defineLocale({
tokenPlaceholder: '貼上遠端工作階段權杖',
tokenSavedHint: '已儲存權杖。留空以保留現有權杖。',
plainTextOptIn: '這台電腦沒有安全金鑰儲存空間,權杖將以未加密方式儲存到磁碟。仍要儲存。',
- collisionWarning: (label: string) =>
- `設定中已存在名為「${label}」的閘道。此設定檔連線是獨立的,不會變更它。`,
+ collisionWarning: (label: string) => `設定中已存在名為「${label}」的閘道。此設定檔連線是獨立的,不會變更它。`,
confirmTitle: '將此設定檔連線至遠端主機?',
confirmNote: (profile: string, host: string) =>
`${profile} 中的新對話將在 ${host} 上執行。指令執行與檔案讀取都會發生在那台電腦上,而不是這台。請只連線你信任的主機。`,
diff --git a/apps/desktop/src/i18n/zh.ts b/apps/desktop/src/i18n/zh.ts
index c6393e6c1f3..f4bf71a4f71 100644
--- a/apps/desktop/src/i18n/zh.ts
+++ b/apps/desktop/src/i18n/zh.ts
@@ -2013,8 +2013,7 @@ export const zh: Translations = {
tokenPlaceholder: '粘贴远程会话令牌',
tokenSavedHint: '已保存令牌。留空以保留现有令牌。',
plainTextOptIn: '这台电脑没有安全密钥存储,令牌将以未加密方式保存到磁盘。仍然保存。',
- collisionWarning: (label: string) =>
- `设置中已存在名为“${label}”的网关。此配置档案连接是独立的,不会更改它。`,
+ collisionWarning: (label: string) => `设置中已存在名为“${label}”的网关。此配置档案连接是独立的,不会更改它。`,
confirmTitle: '将此配置档案连接到远程主机?',
confirmNote: (profile: string, host: string) =>
`${profile} 中的新对话将在 ${host} 上运行。命令和文件读取都发生在那台电脑上,而不是这台。请只连接你信任的主机。`,
diff --git a/apps/desktop/src/lib/voice-client-direct.test.ts b/apps/desktop/src/lib/voice-client-direct.test.ts
index a3a028d846c..6d345cbe226 100644
--- a/apps/desktop/src/lib/voice-client-direct.test.ts
+++ b/apps/desktop/src/lib/voice-client-direct.test.ts
@@ -65,7 +65,7 @@ describe('fetchVoiceClientConfig', () => {
expect(request.connectionId).toBe('gw-remote')
})
- it('a scope switch never reuses another scope\'s credentials', async () => {
+ it("a scope switch never reuses another scope's credentials", async () => {
const api = mockDesktopApi({ ok: true, stt: directStt, tts: relay })
setApiRequestProfile('alpha')
await fetchVoiceClientConfig()
@@ -237,7 +237,10 @@ describe('synthesizeSpeechClientDirect', () => {
})
it('throws on provider rejection', async () => {
- vi.stubGlobal('fetch', vi.fn(async () => new Response('quota exceeded', { status: 429 })))
+ vi.stubGlobal(
+ 'fetch',
+ vi.fn(async () => new Response('quota exceeded', { status: 429 }))
+ )
await expect(synthesizeSpeechClientDirect(openaiTts, 'Hi.')).rejects.toThrow(/openai TTS error.*429/)
})