From 110736c0bc9fd249f1ce7f7ca5d353040f640be6 Mon Sep 17 00:00:00 2001 From: "hermes-seaeye[bot]" <307254004+hermes-seaeye[bot]@users.noreply.github.com> Date: Thu, 10 Sep 2026 15:26:17 +0000 Subject: [PATCH] fmt(js): `npm run fix` on merge (#107454) Co-authored-by: github-actions[bot] --- .../electron/desktop-plugins-root.test.ts | 5 +- apps/desktop/electron/fs-ipc.ts | 7 +- .../src/app/skills/plugins-tab.test.tsx | 9 +- apps/desktop/src/app/skills/plugins-tab.tsx | 134 ++++++++++-------- .../src/contrib/runtime-loader.test.ts | 5 +- apps/desktop/src/i18n/en.ts | 3 +- apps/desktop/src/i18n/zh.ts | 6 +- 7 files changed, 97 insertions(+), 72 deletions(-) diff --git a/apps/desktop/electron/desktop-plugins-root.test.ts b/apps/desktop/electron/desktop-plugins-root.test.ts index 6427806f26..ddcf42d96e 100644 --- a/apps/desktop/electron/desktop-plugins-root.test.ts +++ b/apps/desktop/electron/desktop-plugins-root.test.ts @@ -110,7 +110,10 @@ describe('reconcileUnifiedDesktopHalves', () => { JSON.stringify({ catalog_name: 'cat', repo: 'https://github.com/o/cat.git', sha: 'deadbeef' }) ) write(path.join(home, 'plugins', 'raw', 'desktop', 'plugin.js'), 'y') - write(path.join(home, 'plugins', 'raw', '.git', 'config'), '[core]\n\tbare = false\n[remote "origin"]\n\turl = file:///srv/raw.git\n\tfetch = +refs/heads/*:refs/remotes/origin/*\n') + write( + path.join(home, 'plugins', 'raw', '.git', 'config'), + '[core]\n\tbare = false\n[remote "origin"]\n\turl = file:///srv/raw.git\n\tfetch = +refs/heads/*:refs/remotes/origin/*\n' + ) await reconcileUnifiedDesktopHalves(home, appRoot) diff --git a/apps/desktop/electron/fs-ipc.ts b/apps/desktop/electron/fs-ipc.ts index f8bdea257e..8f57bf979b 100644 --- a/apps/desktop/electron/fs-ipc.ts +++ b/apps/desktop/electron/fs-ipc.ts @@ -141,7 +141,12 @@ export function registerFsIpc({ return { ok: false, error: 'identifier is required' } } - return installDesktopPluginFromGit(resolveGitBinary(), identifier, await desktopPluginsRoot(), Boolean(payload?.force)) + return installDesktopPluginFromGit( + resolveGitBinary(), + identifier, + await desktopPluginsRoot(), + Boolean(payload?.force) + ) }) // Rename a file/folder in place. The renderer passes the existing path + a new diff --git a/apps/desktop/src/app/skills/plugins-tab.test.tsx b/apps/desktop/src/app/skills/plugins-tab.test.tsx index 88dd2137f6..8b3c5b7e94 100644 --- a/apps/desktop/src/app/skills/plugins-tab.test.tsx +++ b/apps/desktop/src/app/skills/plugins-tab.test.tsx @@ -66,7 +66,14 @@ describe('PluginsTab', () => { media: { id: 'media', name: 'Media Studio', kind: 'disk', status: 'loaded', packageName: 'hermes-media-studio' } }) $agentPlugins.set([ - { description: '', key: 'hermes-media-studio', name: 'hermes-media-studio', source: 'git', status: 'disabled', version: '1' } + { + description: '', + key: 'hermes-media-studio', + name: 'hermes-media-studio', + source: 'git', + status: 'disabled', + version: '1' + } ]) render() diff --git a/apps/desktop/src/app/skills/plugins-tab.tsx b/apps/desktop/src/app/skills/plugins-tab.tsx index 3d3b92f70b..6b67c75bac 100644 --- a/apps/desktop/src/app/skills/plugins-tab.tsx +++ b/apps/desktop/src/app/skills/plugins-tab.tsx @@ -1,5 +1,13 @@ import { useStore } from '@nanostores/react' -import { memo, type ReactNode, type PointerEvent as ReactPointerEvent, useEffect, useMemo, useRef, useState } from 'react' +import { + memo, + type ReactNode, + type PointerEvent as ReactPointerEvent, + useEffect, + useMemo, + useRef, + useState +} from 'react' import { useGatewayRequest } from '@/app/gateway/hooks/use-gateway-request' import { Button } from '@/components/ui/button' @@ -276,71 +284,71 @@ function PackageRow({ lacks shows a dash; a half it has but which is missing on this side shows the install affordance. */} - {desktop ? ( - { - triggerHaptic('selection') - void setPluginEnabled(desktop.id, on) - }} - /> - ) : pkg.desktopMissing ? ( - - {p.desktopHalfPending} - - ) : ( - - )} + {desktop ? ( + { + triggerHaptic('selection') + void setPluginEnabled(desktop.id, on) + }} + /> + ) : pkg.desktopMissing ? ( + + {p.desktopHalfPending} + + ) : ( + + )} - {agent ? ( - <> - {agent.update_available && ( - - )} - {busy && } - {agentToggleable ? ( - onAgentToggle(agent, on)} - /> - ) : ( - - - - - - )} - - ) : pkg.agentMissingInProfile && desktop ? ( - - - - - - ) : ( - - )} + {agent ? ( + <> + {agent.update_available && ( + + )} + {busy && } + {agentToggleable ? ( + onAgentToggle(agent, on)} + /> + ) : ( + + + + + + )} + + ) : pkg.agentMissingInProfile && desktop ? ( + + + + + + ) : ( + + )} ) diff --git a/apps/desktop/src/contrib/runtime-loader.test.ts b/apps/desktop/src/contrib/runtime-loader.test.ts index e748177c9b..f1ea3d331c 100644 --- a/apps/desktop/src/contrib/runtime-loader.test.ts +++ b/apps/desktop/src/contrib/runtime-loader.test.ts @@ -86,7 +86,9 @@ describe('scanDiskPlugins (#66899)', () => { if (dir === '/local/.hermes/desktop-plugins/my-feature') { return { - entries: [{ isDirectory: false, name: 'README.md', path: '/local/.hermes/desktop-plugins/my-feature/README.md' }] + entries: [ + { isDirectory: false, name: 'README.md', path: '/local/.hermes/desktop-plugins/my-feature/README.md' } + ] } } @@ -122,7 +124,6 @@ describe('scanDiskPlugins (#66899)', () => { expect($pluginRecords.get().odd).toBeUndefined() }) - it('loads a unified desktop half (app-root copy + package marker) OPT-IN and tags it with its package', async () => { desktopPluginsRoot.mockResolvedValue('/local/.hermes/desktop-plugins') let desktopEntryPresent = true diff --git a/apps/desktop/src/i18n/en.ts b/apps/desktop/src/i18n/en.ts index 5ac119af96..1d5f0aadc1 100644 --- a/apps/desktop/src/i18n/en.ts +++ b/apps/desktop/src/i18n/en.ts @@ -1513,8 +1513,7 @@ export const en: Translations = { agentTitle: 'Agent plugins', agentBlurb: 'Extend the agent for the selected profile — tools, hooks, providers. Take effect after a gateway restart.', - pageBlurb: - 'One row per plugin. A plugin can extend this app, the agent, or both — each half has its own switch.', + pageBlurb: 'One row per plugin. A plugin can extend this app, the agent, or both — each half has its own switch.', halfDesktop: 'Desktop', halfDesktopHint: 'this app, same for every profile', halfAgent: 'Agent', diff --git a/apps/desktop/src/i18n/zh.ts b/apps/desktop/src/i18n/zh.ts index b012b3d730..0fadf697cf 100644 --- a/apps/desktop/src/i18n/zh.ts +++ b/apps/desktop/src/i18n/zh.ts @@ -1693,8 +1693,10 @@ export const zh: Translations = { kindDesktop: '桌面', kindBoth: 'Agent + 桌面', installAgentHere: '在此安装', - installAgentHereTip: (profile: string) => `桌面部分已加载到本应用,但 agent 部分尚未安装到 ${profile}。在那里安装它。`, - installAgentHereNoOrigin: '此配置未安装 agent 部分,且该包是手动复制的(无目录条目或 git 远程),无法从此处安装。请将其文件夹复制到该配置或从 Git 重新安装。', + installAgentHereTip: (profile: string) => + `桌面部分已加载到本应用,但 agent 部分尚未安装到 ${profile}。在那里安装它。`, + installAgentHereNoOrigin: + '此配置未安装 agent 部分,且该包是手动复制的(无目录条目或 git 远程),无法从此处安装。请将其文件夹复制到该配置或从 Git 重新安装。', desktopHalfPending: '复制中…', desktopHalfPendingTip: '此包附带的桌面部分尚未复制到应用中。请重新扫描或重启应用。', emptyAll: '还没有插件。',