Skip to content

The agent that grows with you

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

hermes-seaeye[bot]a9109b07f426
diff --git a/apps/desktop/electron/main.ts b/apps/desktop/electron/main.ts
index 5d25bf0c958..f77cfe2df27 100644
--- a/apps/desktop/electron/main.ts
+++ b/apps/desktop/electron/main.ts
@@ -3739,9 +3739,7 @@ function killHermesOwnedVenvDaemons(updateRoot) {
let holders = []
try {
- holders = scanWindowsProcesses().filter(p =>
- isHermesOwnedVenvDaemon(p?.ExecutablePath, p?.CommandLine, scriptsDir)
- )
+ holders = scanWindowsProcesses().filter(p => isHermesOwnedVenvDaemon(p?.ExecutablePath, p?.CommandLine, scriptsDir))
} catch {
// Best-effort: the uninstall lock probe remains the backstop.
return
@@ -3785,9 +3783,7 @@ function killExternalVenvHolders(updateRoot) {
let holders = []
try {
- holders = scanWindowsProcesses().filter(p =>
- isExternalVenvHolder(p?.ExecutablePath, p?.CommandLine, scriptsDir)
- )
+ holders = scanWindowsProcesses().filter(p => isExternalVenvHolder(p?.ExecutablePath, p?.CommandLine, scriptsDir))
} catch {
// Best-effort: the shim-lock probe remains the backstop.
return
@@ -3797,7 +3793,9 @@ function killExternalVenvHolders(updateRoot) {
const pid = Number(holder?.ProcessId)
if (Number.isInteger(pid) && pid > 0) {
- rememberLog(`[updates] stopping external Hermes venv holder (autostart gateway/dashboard) PID ${pid} before hand-off`)
+ rememberLog(
+ `[updates] stopping external Hermes venv holder (autostart gateway/dashboard) PID ${pid} before hand-off`
+ )
try {
forceKillProcessTree(pid)
diff --git a/apps/desktop/electron/venv-holder-select.test.ts b/apps/desktop/electron/venv-holder-select.test.ts
index 9d6fd3636fb..11145fc8dd2 100644
--- a/apps/desktop/electron/venv-holder-select.test.ts
+++ b/apps/desktop/electron/venv-holder-select.test.ts
@@ -107,10 +107,7 @@ test('never matches a process outside the venv, even with hermes in the cmdline'
})
test('sibling-dir and boundary safety for the external selector', () => {
- assert.equal(
- isExternalVenvHolder('C:\\Hermes\\venv\\ScriptsX\\hermes.exe', 'hermes gateway run', SCRIPTS),
- false
- )
+ assert.equal(isExternalVenvHolder('C:\\Hermes\\venv\\ScriptsX\\hermes.exe', 'hermes gateway run', SCRIPTS), false)
assert.equal(isExternalVenvHolder(null, 'hermes gateway run', SCRIPTS), false)
assert.equal(isExternalVenvHolder('C:\\Hermes\\venv\\Scripts\\hermes.exe', null, SCRIPTS), false)
})
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 7477c568b27..7586a81e9b8 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
@@ -96,7 +96,9 @@ describe('contributed @ completion sources', () => {
// A bot tagged by its title slug (`@john`) is the same routable identity
// the gateway lists by raw profile name (`@john-2`) — one row must
// survive, and it must be the contributed one (title + connection meta).
- addSource('bots', q => ('john'.startsWith(q) ? [{ insert: '@john', meta: 'Bot · John ♥', handles: ['@john-2'] }] : []))
+ addSource('bots', q =>
+ 'john'.startsWith(q) ? [{ insert: '@john', meta: 'Bot · John ♥', handles: ['@john-2'] }] : []
+ )
const gateway = gatewayStub([
{ text: '@default', display: '@default', meta: 'Windows troubleshooting' },
diff --git a/apps/desktop/src/app/chat/sidebar/projects/base-branch-picker.tsx b/apps/desktop/src/app/chat/sidebar/projects/base-branch-picker.tsx
index d304b40701a..dc247365c68 100644
--- a/apps/desktop/src/app/chat/sidebar/projects/base-branch-picker.tsx
+++ b/apps/desktop/src/app/chat/sidebar/projects/base-branch-picker.tsx
@@ -53,6 +53,7 @@ export function BaseBranchPicker({
useEffect(() => {
let active = true
setBranches([])
+
if (!repoPath) {
return () => {
active = false
diff --git a/apps/desktop/src/app/chat/sidebar/session-row.test.tsx b/apps/desktop/src/app/chat/sidebar/session-row.test.tsx
index 8686262a9f6..501b0de8d40 100644
--- a/apps/desktop/src/app/chat/sidebar/session-row.test.tsx
+++ b/apps/desktop/src/app/chat/sidebar/session-row.test.tsx
@@ -421,9 +421,7 @@ describe('SidebarSessionRow continuation badge', () => {
const continuationGlyph = (container: HTMLElement) => container.querySelector('.codicon-layers')
it('paints the continuation glyph for a projected compression tip', () => {
- const { container } = renderRow(
- makeSession({ continuation_kind: 'compression', title: 'Long-running chat' })
- )
+ const { container } = renderRow(makeSession({ continuation_kind: 'compression', title: 'Long-running chat' }))
expect(continuationGlyph(container)).not.toBeNull()
})
@@ -433,9 +431,7 @@ describe('SidebarSessionRow continuation badge', () => {
expect(continuationGlyph(plain.container)).toBeNull()
- const branch = renderRow(
- makeSession({ parent_session_id: 'parent', title: 'A real branch' })
- )
+ const branch = renderRow(makeSession({ parent_session_id: 'parent', title: 'A real branch' }))
expect(continuationGlyph(branch.container)).toBeNull()
})
diff --git a/apps/desktop/src/app/hooks/use-keybinds.ts b/apps/desktop/src/app/hooks/use-keybinds.ts
index 4592e16956d..98b8e099395 100644
--- a/apps/desktop/src/app/hooks/use-keybinds.ts
+++ b/apps/desktop/src/app/hooks/use-keybinds.ts
@@ -17,7 +17,12 @@ import {
import { setWorkspaceScope } from '@/components/pane-shell/workspace-scope'
import { onReleaseTypingFocus } from '@/components/ui/keyboard-first'
import { findBarClaimsCombo } from '@/lib/find-in-page'
-import { contributedKeybindHandler, PROFILE_SLOT_COUNT, SESSION_SLOT_COUNT, TAB_SLOT_COUNT } from '@/lib/keybinds/actions'
+import {
+ contributedKeybindHandler,
+ PROFILE_SLOT_COUNT,
+ SESSION_SLOT_COUNT,
+ TAB_SLOT_COUNT
+} from '@/lib/keybinds/actions'
import { handleApprovalKey, releaseApprovalKey } from '@/lib/keybinds/approval-keys'
import { actionAllowedInInput, comboFromEvent, isEditableTarget } from '@/lib/keybinds/combo'
import { composerFocusKeysAllowed, isComposerFocusSoftCombo, typeToFocusChar } from '@/lib/keybinds/composer-focus-keys'
diff --git a/apps/desktop/src/app/session/hooks/use-session-actions/utils.ts b/apps/desktop/src/app/session/hooks/use-session-actions/utils.ts
index 8e8634c1e08..831606269e4 100644
--- a/apps/desktop/src/app/session/hooks/use-session-actions/utils.ts
+++ b/apps/desktop/src/app/session/hooks/use-session-actions/utils.ts
@@ -894,7 +894,8 @@ export function preserveLocalPendingTurnMessages(
// repeat of the same captioned paste). The rowId-less paste from
// #120978 carries no identity and keeps matching tolerantly.
!conflictingTranscriptIdentity(message, candidate) &&
- (textWithoutReferenceLines(chatMessageText(candidate)) === textWithoutReferenceLines(chatMessageText(message)) ||
+ (textWithoutReferenceLines(chatMessageText(candidate)) ===
+ textWithoutReferenceLines(chatMessageText(message)) ||
sameAttachmentTurn(candidate, message))
)
) {
diff --git a/apps/desktop/src/app/session/hooks/use-session-list-actions.ts b/apps/desktop/src/app/session/hooks/use-session-list-actions.ts
index 7f279eeb2b1..50e952a036f 100644
--- a/apps/desktop/src/app/session/hooks/use-session-list-actions.ts
+++ b/apps/desktop/src/app/session/hooks/use-session-list-actions.ts
@@ -57,7 +57,15 @@ import { refreshCronJobs as refreshCronJobsStore } from '../../cron/cron-actions
// conversations: every editor wake mints an auto-titled row, so they would
// bury local chats — and they were never ended before #118216, which also
// kept prune/archive away from them.
-const SIDEBAR_EXCLUDED_SOURCES = ['acp', 'cron', 'kanban', 'oneshot', 'subagent', 'tool', ...MESSAGING_SESSION_SOURCE_IDS]
+const SIDEBAR_EXCLUDED_SOURCES = [
+ 'acp',
+ 'cron',
+ 'kanban',
+ 'oneshot',
+ 'subagent',
+ 'tool',
+ ...MESSAGING_SESSION_SOURCE_IDS
+]
// The messaging slice is the inverse: drop cron + every local source so only
// external-platform conversations remain, then split per platform in the UI.
const MESSAGING_EXCLUDED_SOURCES = ['cron', ...LOCAL_SESSION_SOURCE_IDS]
diff --git a/apps/desktop/src/components/ui/search-field.test.tsx b/apps/desktop/src/components/ui/search-field.test.tsx
index 8b5a3145ff5..4fc0fda0bc9 100644
--- a/apps/desktop/src/components/ui/search-field.test.tsx
+++ b/apps/desktop/src/components/ui/search-field.test.tsx
@@ -27,6 +27,7 @@ describe('SearchField', () => {
it('keeps clear wired to the value reset', () => {
const onChange = vi.fn()
+
const { getByRole } = render(
<SearchField aria-label="find" onChange={onChange} placeholder="Search" value="query" />
)
diff --git a/apps/desktop/src/i18n/fr.ts b/apps/desktop/src/i18n/fr.ts
index f61f4e60d1d..09c55c98bf3 100644
--- a/apps/desktop/src/i18n/fr.ts
+++ b/apps/desktop/src/i18n/fr.ts
@@ -4088,7 +4088,7 @@ export const frOverrides = {
backgroundRunning: 'Tâche en arrière-plan en cours',
draftSession: 'Brouillon — aucun message envoyé',
handoffOrigin: platform => `Transférée depuis ${platform}`,
- continuationOrigin: "Continuation automatique — cette conversation a été compressée puis poursuivie",
+ continuationOrigin: 'Continuation automatique — cette conversation a été compressée puis poursuivie',
ownedByProfile: profile => `Profil : ${profile}`,
renamed: 'Renommée',
renameFailed: 'Échec du renommage',
diff --git a/apps/desktop/src/lib/chat-messages/reconciliation.test.ts b/apps/desktop/src/lib/chat-messages/reconciliation.test.ts
index b8722e365a3..2c6c46e0c30 100644
--- a/apps/desktop/src/lib/chat-messages/reconciliation.test.ts
+++ b/apps/desktop/src/lib/chat-messages/reconciliation.test.ts
@@ -260,12 +260,7 @@ it('folds a preserved attachment error onto the durable reply via the tolerant c
]
)
- expect(merged.map(message => message.id)).toEqual([
- '9-0-user',
- '9-1-assistant',
- '9-2-user',
- '9-3-assistant'
- ])
+ expect(merged.map(message => message.id)).toEqual(['9-0-user', '9-1-assistant', '9-2-user', '9-3-assistant'])
expect(merged[1]).toMatchObject({ error: 'upstream timeout', pending: false })
})
@@ -285,12 +280,7 @@ it('never tolerance-matches a plain repeated prompt without attachment evidence
]
)
- expect(merged.map(message => message.id)).toEqual([
- '9-0-user',
- '9-1-assistant',
- 'user-repeat',
- 'assistant-stream-x'
- ])
+ expect(merged.map(message => message.id)).toEqual(['9-0-user', '9-1-assistant', 'user-repeat', 'assistant-stream-x'])
})
it('never folds a captionless attachment error onto another paste\u2019s reply (#120978)', () => {
@@ -380,12 +370,7 @@ it('keeps a repeated-caption attachment error local when its prompt never commit
]
)
- expect(merged.map(message => message.id)).toEqual([
- '9-0-user',
- '9-1-assistant',
- 'user-paste-2',
- 'assistant-stream-x'
- ])
+ expect(merged.map(message => message.id)).toEqual(['9-0-user', '9-1-assistant', 'user-paste-2', 'assistant-stream-x'])
expect(merged.find(message => message.id === '9-1-assistant')?.error).toBeUndefined()
expect(merged.find(message => message.id === 'assistant-stream-x')?.error).toBe('upstream timeout')
})
@@ -425,10 +410,5 @@ it('keeps a rowId-less preserved run trailing (#118002 behavior unchanged)', ()
]
)
- expect(merged.map(message => message.id)).toEqual([
- '9-0-user',
- '9-1-assistant',
- 'user-no-row',
- 'assistant-stream-x'
- ])
+ expect(merged.map(message => message.id)).toEqual(['9-0-user', '9-1-assistant', 'user-no-row', 'assistant-stream-x'])
})
diff --git a/apps/desktop/src/lib/chat-messages/reconciliation.ts b/apps/desktop/src/lib/chat-messages/reconciliation.ts
index 71872eb7426..33961a19674 100644
--- a/apps/desktop/src/lib/chat-messages/reconciliation.ts
+++ b/apps/desktop/src/lib/chat-messages/reconciliation.ts
@@ -140,8 +140,9 @@ const attachmentTurnAssistantMatchIndex = (
const localCaptionOrdinal = localMessages
.slice(0, localMessages.indexOf(localUser))
- .filter(message => message.role === 'user' && attachmentTolerantUserText(chatMessageText(message)) === localCaption)
- .length
+ .filter(
+ message => message.role === 'user' && attachmentTolerantUserText(chatMessageText(message)) === localCaption
+ ).length
const matchingStoredUserIndices: number[] = []
@@ -356,8 +357,10 @@ function localAssistantErrorIdsToPreserve(
const captionOrdinal = (messages: ChatMessage[], target: ChatMessage): number =>
messages
.slice(0, messages.indexOf(target))
- .filter(message => message.role === 'user' && attachmentTolerantUserText(chatMessageText(message)) === tailUserTolerantText)
- .length
+ .filter(
+ message =>
+ message.role === 'user' && attachmentTolerantUserText(chatMessageText(message)) === tailUserTolerantText
+ ).length
const tailCaptionOrdinal = tailUserInNext ? captionOrdinal(mergedNextMessages, tailUserInNext) : 0
@@ -366,7 +369,8 @@ function localAssistantErrorIdsToPreserve(
((normalizedMessageText(candidate) === tailUserText &&
(candidate.attachmentRefs ?? []).join('\n') === tailUserRefs) ||
(tailUserInNext
- ? sameAttachmentTurn(tailUserInNext, candidate) && captionOrdinal(currentMessages, candidate) === tailCaptionOrdinal
+ ? sameAttachmentTurn(tailUserInNext, candidate) &&
+ captionOrdinal(currentMessages, candidate) === tailCaptionOrdinal
: false))
for (let index = 0; index < currentMessages.length; index += 1) {
@@ -389,9 +393,7 @@ function localAssistantErrorIdsToPreserve(
// hydrated user row, still names the turn: fold the error onto the first
// settled assistant reply after that row.
const hydratedAttachmentAssistantIndex =
- hydratedAssistantIndex === -1
- ? attachmentTurnAssistantMatchIndex(mergedNextMessages, currentMessages, index)
- : -1
+ hydratedAssistantIndex === -1 ? attachmentTurnAssistantMatchIndex(mergedNextMessages, currentMessages, index) : -1
if (hydratedAttachmentAssistantIndex !== -1) {
mergedNextMessages[hydratedAttachmentAssistantIndex] = {
diff --git a/apps/desktop/src/lib/session-source.ts b/apps/desktop/src/lib/session-source.ts
index 0991f882d02..5e904871ee4 100644
--- a/apps/desktop/src/lib/session-source.ts
+++ b/apps/desktop/src/lib/session-source.ts
@@ -46,7 +46,17 @@ const SOURCE_ALIASES: Record<string, string[]> = {
// Exported so the recents fetch can keep these in the main list while the
// messaging fetch excludes them. `acp` runs as a local stdio process spawned
// by an editor, and its rows must never land in the messaging slice either.
-export const LOCAL_SESSION_SOURCE_IDS = ['acp', 'cli', 'codex', 'desktop', 'gateway', 'kanban', 'local', 'oneshot', 'tui']
+export const LOCAL_SESSION_SOURCE_IDS = [
+ 'acp',
+ 'cli',
+ 'codex',
+ 'desktop',
+ 'gateway',
+ 'kanban',
+ 'local',
+ 'oneshot',
+ 'tui'
+]
const LOCAL_SOURCE_IDS = new Set(LOCAL_SESSION_SOURCE_IDS)
// External messaging platforms that each get their own self-managed sidebar
diff --git a/apps/desktop/src/plugins/hermes-bots/plugin.mentions.test.ts b/apps/desktop/src/plugins/hermes-bots/plugin.mentions.test.ts
index 6c32ba03694..b6cc0b91205 100644
--- a/apps/desktop/src/plugins/hermes-bots/plugin.mentions.test.ts
+++ b/apps/desktop/src/plugins/hermes-bots/plugin.mentions.test.ts
@@ -388,7 +388,7 @@ describe('@-mention completions', () => {
expect(eva?.handles).toEqual(['@eva-2'])
})
- it('never claims a remote row\'s name — the local gateway\'s twin is a different bot', async () => {
+ it("never claims a remote row's name — the local gateway's twin is a different bot", async () => {
const { provide } = await contributions({ profiles: [{ name: 'default' }, REMOTE_DEFAULTS[0]] })
const contributed = provide('cos').find(item => item.insert === '@cos-bot')
diff --git a/apps/desktop/src/store/session.ts b/apps/desktop/src/store/session.ts
index fa1d55e9ccf..1b8697cfa63 100644
--- a/apps/desktop/src/store/session.ts
+++ b/apps/desktop/src/store/session.ts
@@ -714,6 +714,7 @@ export function mergeSessionPage(
// rows; a failed RPC untombstones immediately, so the filter is only ever
// as sticky as the removal itself.
const tombstones = $removedSessionIds.get()
+
const tombstoned = (session: SessionInfo): boolean =>
tombstones.size > 0 &&
(tombstones.has(session.id) || (session._lineage_root_id != null && tombstones.has(session._lineage_root_id)))