Skip to content

The agent that grows with you

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

hermes-seaeye[bot]9366ba3afb1f
diff --git a/apps/desktop/electron/gateway-stop-before-update.test.ts b/apps/desktop/electron/gateway-stop-before-update.test.ts
index 2b1cbfcced9..91c6275ae20 100644
--- a/apps/desktop/electron/gateway-stop-before-update.test.ts
+++ b/apps/desktop/electron/gateway-stop-before-update.test.ts
@@ -2,7 +2,11 @@ import assert from 'node:assert/strict'
import { test } from 'vitest'
-import { GATEWAY_STOP_TIMEOUT_MS, startGatewaysAfterUpdateAbort, stopGatewayBeforeUpdate } from './gateway-stop-before-update'
+import {
+ GATEWAY_STOP_TIMEOUT_MS,
+ startGatewaysAfterUpdateAbort,
+ stopGatewayBeforeUpdate
+} from './gateway-stop-before-update'
const CLI = 'C:\\Users\\x\\hermes\\hermes-agent\\venv\\Scripts\\hermes.exe'
const HOME = 'C:\\Users\\x\\hermes'
diff --git a/apps/desktop/electron/gateway-stop-before-update.ts b/apps/desktop/electron/gateway-stop-before-update.ts
index 5e9734f29c6..190799a8635 100644
--- a/apps/desktop/electron/gateway-stop-before-update.ts
+++ b/apps/desktop/electron/gateway-stop-before-update.ts
@@ -59,18 +59,11 @@ export function stopGatewayBeforeUpdate(
* must mirror that on its abort paths, or a failed update strands every
* profile's gateway stopped. Best-effort, never throws.
*/
-export function startGatewaysAfterUpdateAbort(
- hermesCliPath: string,
- deps: StopGatewayBeforeUpdateDeps = {}
-): boolean {
+export function startGatewaysAfterUpdateAbort(hermesCliPath: string, deps: StopGatewayBeforeUpdateDeps = {}): boolean {
return runGatewayLifecycleCommand(hermesCliPath, ['gateway', 'start', '--all'], deps)
}
-function runGatewayLifecycleCommand(
- hermesCliPath: string,
- args: string[],
- deps: StopGatewayBeforeUpdateDeps
-): boolean {
+function runGatewayLifecycleCommand(hermesCliPath: string, args: string[], deps: StopGatewayBeforeUpdateDeps): boolean {
const isWindows = deps.isWindows ?? process.platform === 'win32'
if (!isWindows) {
diff --git a/apps/desktop/electron/main.ts b/apps/desktop/electron/main.ts
index 2279aa322bc..599e4821546 100644
--- a/apps/desktop/electron/main.ts
+++ b/apps/desktop/electron/main.ts
@@ -3256,7 +3256,7 @@ function killHermesOwnedVenvDaemons(updateRoot) {
const parsed = JSON.parse(String(out || '[]'))
- holders = (Array.isArray(parsed) ? parsed : [parsed]).filter((p) =>
+ holders = (Array.isArray(parsed) ? parsed : [parsed]).filter(p =>
isHermesOwnedVenvDaemon(p?.ExecutablePath, p?.CommandLine, scriptsDir)
)
} catch {
@@ -3274,7 +3274,6 @@ function killHermesOwnedVenvDaemons(updateRoot) {
}
}
-
// Force-kill the entire process TREE rooted at each PID. Node's child.kill()
// only signals the direct child, so on Windows a backend `hermes.exe` that
// spawned its own grandchildren (a `hermes` REPL, a pty terminal session, the
diff --git a/apps/desktop/electron/venv-blocker-scan.test.ts b/apps/desktop/electron/venv-blocker-scan.test.ts
index c90bd98f10b..bc62f788493 100644
--- a/apps/desktop/electron/venv-blocker-scan.test.ts
+++ b/apps/desktop/electron/venv-blocker-scan.test.ts
@@ -140,7 +140,7 @@ describe('parseVenvBlockerScanOutput', () => {
}
assert.deepEqual(
- blocked.result.processes.map((p) => p.pid),
+ blocked.result.processes.map(p => p.pid),
[79]
)
})
diff --git a/apps/desktop/electron/venv-holder-select.test.ts b/apps/desktop/electron/venv-holder-select.test.ts
index 9067159f6e1..d38e567b356 100644
--- a/apps/desktop/electron/venv-holder-select.test.ts
+++ b/apps/desktop/electron/venv-holder-select.test.ts
@@ -30,10 +30,7 @@ test('Windows path prefix match is ordinal case-insensitive', () => {
test('excludes external venv holders that are not the hindsight daemon', () => {
// a user terminal running the hermes CLI from the venv — must NOT be killed
- assert.equal(
- isHermesOwnedVenvDaemon('C:\\Hermes\\venv\\Scripts\\hermes.exe', 'hermes chat -q "hi"', SCRIPTS),
- false
- )
+ assert.equal(isHermesOwnedVenvDaemon('C:\\Hermes\\venv\\Scripts\\hermes.exe', 'hermes chat -q "hi"', SCRIPTS), false)
// an unrelated python script using the venv interpreter
assert.equal(
isHermesOwnedVenvDaemon('C:\\Hermes\\venv\\Scripts\\python.exe', 'python C:\\tools\\import.py', SCRIPTS),
@@ -49,10 +46,7 @@ test('excludes exes outside the venv even when the cmdline mentions hindsight',
})
test('prefix boundary: sibling dirs (ScriptsX) do not match', () => {
- assert.equal(
- hasWindowsPathPrefix('C:\\Hermes\\venv\\ScriptsX\\python.exe', SCRIPTS),
- false
- )
+ assert.equal(hasWindowsPathPrefix('C:\\Hermes\\venv\\ScriptsX\\python.exe', SCRIPTS), false)
assert.equal(hasWindowsPathPrefix('C:\\Hermes\\venv\\Scripts\\python.exe', SCRIPTS), true)
})
diff --git a/apps/desktop/electron/venv-holder-select.ts b/apps/desktop/electron/venv-holder-select.ts
index 12128efe18f..d79d2e0a5f3 100644
--- a/apps/desktop/electron/venv-holder-select.ts
+++ b/apps/desktop/electron/venv-holder-select.ts
@@ -11,16 +11,10 @@
*/
/** Ordinal case-insensitive prefix check for Windows paths. */
-export function hasWindowsPathPrefix(
- exePath: string,
- venvScriptsDir: string
-): boolean {
+export function hasWindowsPathPrefix(exePath: string, venvScriptsDir: string): boolean {
const prefix = `${venvScriptsDir}\\`
- return (
- exePath.length >= prefix.length &&
- exePath.slice(0, prefix.length).toLowerCase() === prefix.toLowerCase()
- )
+ return exePath.length >= prefix.length && exePath.slice(0, prefix.length).toLowerCase() === prefix.toLowerCase()
}
/**