The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fmt(js): `npm run fix` on merge (#99917)
hermes-seaeye[bot]de590cc3cb66
diff --git a/apps/desktop/src/app/chat/composer/focus.ts b/apps/desktop/src/app/chat/composer/focus.tsindex 008ce4e1282..dc72c10e591 100644--- a/apps/desktop/src/app/chat/composer/focus.ts+++ b/apps/desktop/src/app/chat/composer/focus.ts@@ -406,11 +406,7 @@ export const focusComposerInput = (el: HTMLElement | null) => {const active = document.activeElement- if (- active instanceof HTMLElement &&- active.dataset.slot === RICH_INPUT_SLOT &&- !isElementInHiddenPane(active)- ) {+ if (active instanceof HTMLElement && active.dataset.slot === RICH_INPUT_SLOT && !isElementInHiddenPane(active)) {return}diff --git a/apps/desktop/src/app/chat/session-tile-actions.test.ts b/apps/desktop/src/app/chat/session-tile-actions.test.tsindex b15bfa08afb..4f8f862b9b5 100644--- a/apps/desktop/src/app/chat/session-tile-actions.test.ts+++ b/apps/desktop/src/app/chat/session-tile-actions.test.ts@@ -10,8 +10,10 @@ import { MAIN_COMPOSER_SCOPE } from './composer/scope'const requestGatewayMock = vi.hoisted(() => vi.fn())const { $activeSessionId, $sessions, setSessions } = await import('@/store/session')+const { $sessionStates, $sessionTiles, clearAllSessionStates, publishSessionState, setSessionTileDelegate } =await import('@/store/session-states')+const { listTileSessionRow, useSessionTileActions } = await import('./session-tile-actions')const RUNTIME_SESSION_ID = 'rt-tile-current'diff --git a/apps/desktop/src/app/chat/session-tile.tsx b/apps/desktop/src/app/chat/session-tile.tsxindex 37d6ded2721..773263e3ffc 100644--- a/apps/desktop/src/app/chat/session-tile.tsx+++ b/apps/desktop/src/app/chat/session-tile.tsx@@ -171,6 +171,7 @@ function TileChat({queryClient,requestGateway: requestTileGateway})+const activeGatewayProfile = useStore($activeGatewayProfile)const cwd = useStore(view.$cwd)const gatewayOpen = useStore($gatewayState) === 'open'diff --git a/apps/desktop/src/app/chat/sidebar/chrome.test.tsx b/apps/desktop/src/app/chat/sidebar/chrome.test.tsxindex caaef1e8dcd..500211c27f6 100644--- a/apps/desktop/src/app/chat/sidebar/chrome.test.tsx+++ b/apps/desktop/src/app/chat/sidebar/chrome.test.tsx@@ -10,10 +10,7 @@ describe('SidebarDateDivider', () => {const onToggle = vi.fn()render(- <SidebarDateDivider- label="Yesterday"- toggle={{ ariaLabel: 'Hide Yesterday sessions', onToggle, open: true }}- />+ <SidebarDateDivider label="Yesterday" toggle={{ ariaLabel: 'Hide Yesterday sessions', onToggle, open: true }} />)fireEvent.click(screen.getByRole('button', { name: 'Hide Yesterday sessions' }))diff --git a/apps/desktop/src/app/chat/sidebar/chrome.tsx b/apps/desktop/src/app/chat/sidebar/chrome.tsxindex e1e21b67128..62f02714286 100644--- a/apps/desktop/src/app/chat/sidebar/chrome.tsx+++ b/apps/desktop/src/app/chat/sidebar/chrome.tsx@@ -64,6 +64,7 @@ export function SidebarDateDivider({{label}</span>)+const rule = <span aria-hidden="true" className="h-px min-w-4 flex-1 bg-(--ui-stroke-tertiary)" />return (diff --git a/apps/desktop/src/app/chat/sidebar/filter-menu.tsx b/apps/desktop/src/app/chat/sidebar/filter-menu.tsxindex dce76ab7869..9aa683d5083 100644--- a/apps/desktop/src/app/chat/sidebar/filter-menu.tsx+++ b/apps/desktop/src/app/chat/sidebar/filter-menu.tsx@@ -174,6 +174,7 @@ export function SidebarFilterMenu({ className }: { className?: string }) {// locally, the gateway's REST mirror remotely. Resolved per render, not once// at module load: switching to a remote profile swaps the bridge underneath.const prAvailable = Boolean(desktopGit()?.review?.prList)+// Fold the level in view: project rows, or the date/status buckets. Project// rows default open, so "all collapsed" means every one of them has been// explicitly shut. Never sweeps Pinned or Cron.@@ -183,6 +184,7 @@ export function SidebarFilterMenu({ className }: { className?: string }) {: grouping === 'date' || grouping === 'status'? listGroupIds: []+const foldCollapsed = foldIds.length > 0 && foldIds.every(id => nodeOpen[id] === false)const groupingLabel = GROUPINGS.find(option => option.id === grouping)?.labeldiff --git a/apps/desktop/src/app/chat/sidebar/sessions-section.tsx b/apps/desktop/src/app/chat/sidebar/sessions-section.tsxindex bc85e5332f5..235b812cd48 100644--- a/apps/desktop/src/app/chat/sidebar/sessions-section.tsx+++ b/apps/desktop/src/app/chat/sidebar/sessions-section.tsx@@ -384,10 +384,7 @@ export function SidebarSessionsSection({// Closed date/status buckets keep their divider and drop the sessions under// it. Same array when nothing is collapsed so the virtualizer's rows ref// stays stable across parent re-renders.- const visibleRows = useMemo(- () => hideCollapsedGroupRows(flatRows, isListGroupOpen),- [flatRows, isListGroupOpen]- )+ const visibleRows = useMemo(() => hideCollapsedGroupRows(flatRows, isListGroupOpen), [flatRows, isListGroupOpen])// dnd-kit must see exactly the ids it renders, in render order: the sortable// set is derived from the rows, not from `sessions`. Feeding it the unrendered@@ -395,6 +392,7 @@ export function SidebarSessionsSection({// wasn't looking at — the drag that landed a row in the wrong slot.const sortableRowIds = useMemo(() => reorderableRowIds(visibleRows), [visibleRows])const allSortableRowIds = useMemo(() => reorderableRowIds(flatRows), [flatRows])+const persistSessionOrder = useCallback((ids: string[]) => onReorderSessions?.(mergeVisibleReorder(allSortableRowIds, ids)),[allSortableRowIds, onReorderSessions]@@ -405,9 +403,7 @@ export function SidebarSessionsSection({return}- $sidebarListGroupIds.set(- flatRows.flatMap(row => (row.kind === 'divider' ? [listGroupNodeId(row.key)] : []))- )+ $sidebarListGroupIds.set(flatRows.flatMap(row => (row.kind === 'divider' ? [listGroupNodeId(row.key)] : [])))return () => {$sidebarListGroupIds.set([])diff --git a/apps/desktop/src/app/model-picker-overlay.tsx b/apps/desktop/src/app/model-picker-overlay.tsxindex 2666cdb856b..34c8806d9d1 100644--- a/apps/desktop/src/app/model-picker-overlay.tsx+++ b/apps/desktop/src/app/model-picker-overlay.tsx@@ -18,12 +18,7 @@ import {setModelPickerOpen} from '@/store/session'import { requestForSessionProfile } from '@/store/session-request-router'-import {- $focusedRuntimeId,- $focusedSessionState,- $focusedStoredSessionId,- $sessionTiles-} from '@/store/session-states'+import { $focusedRuntimeId, $focusedSessionState, $focusedStoredSessionId, $sessionTiles } from '@/store/session-states'interface ModelPickerOverlayProps {gateway?: HermesGateway@@ -96,9 +91,7 @@ export function ModelPickerOverlay({currentProvider={currentProvider}gw={gateway}onOpenChange={setModelPickerOpen}- onSelect={selection =>- (pickerOwner.route ? selectFocusedModel : onSelect)({ ...selection, sessionId })- }+ onSelect={selection => (pickerOwner.route ? selectFocusedModel : onSelect)({ ...selection, sessionId })}open={open}ownerConnectionId={pickerOwner.connectionId}profile={pickerOwner.profile}diff --git a/apps/desktop/src/app/session/hooks/use-model-controls.test.tsx b/apps/desktop/src/app/session/hooks/use-model-controls.test.tsxindex da254e334c1..7d6a610d16e 100644--- a/apps/desktop/src/app/session/hooks/use-model-controls.test.tsx+++ b/apps/desktop/src/app/session/hooks/use-model-controls.test.tsx@@ -723,9 +723,9 @@ describe('useModelControls', () => {}))- await expect(- result.current.selectModel({ model: 'bogus', provider: 'xai', sessionId: 'runtime-b' })- ).resolves.toBe(false)+ await expect(result.current.selectModel({ model: 'bogus', provider: 'xai', sessionId: 'runtime-b' })).resolves.toBe(+ false+ )expect(queryClient.getQueryData(ownerBKey)).toMatchObject({ model: 'old-b', provider: 'provider-b' })expect(queryClient.getQueryData(ambientAKey)).toMatchObject({ model: 'model-a', provider: 'provider-a' })diff --git a/apps/desktop/src/app/session/hooks/use-model-controls.ts b/apps/desktop/src/app/session/hooks/use-model-controls.tsindex 392be887356..4d0d63b058b 100644--- a/apps/desktop/src/app/session/hooks/use-model-controls.ts+++ b/apps/desktop/src/app/session/hooks/use-model-controls.ts@@ -73,10 +73,7 @@ export function useModelControls({return { ...prev, provider, model, providers }}- queryClient.setQueryData<ModelOptionsResponse>(- modelOptionsQueryKey(profile, sessionId, ownerConnectionId),- patch- )+ queryClient.setQueryData<ModelOptionsResponse>(modelOptionsQueryKey(profile, sessionId, ownerConnectionId), patch)if (includeGlobal) {queryClient.setQueryData<ModelOptionsResponse>(modelOptionsQueryKey(profile, null, ownerConnectionId), patch)@@ -140,11 +137,7 @@ export function useModelControls({}const options = queryClient.getQueryData<ModelOptionsResponse>(- modelOptionsQueryKey(- cacheProfile || $activeGatewayProfile.get(),- null,- cacheOwnerConnectionId- )+ modelOptionsQueryKey(cacheProfile || $activeGatewayProfile.get(), null, cacheOwnerConnectionId))return !manualPickRemoved(options?.providers, $currentProvider.get(), $currentModel.get())diff --git a/apps/desktop/src/app/session/hooks/use-prompt-actions/index.test.tsx b/apps/desktop/src/app/session/hooks/use-prompt-actions/index.test.tsxindex 8daf185775a..59e71821958 100644--- a/apps/desktop/src/app/session/hooks/use-prompt-actions/index.test.tsx+++ b/apps/desktop/src/app/session/hooks/use-prompt-actions/index.test.tsx@@ -5789,6 +5789,7 @@ describe('usePromptActions reloadFromMessage failed-submit rollback (#95745)', (setMessages(seed as never)let latest: Record<string, unknown> | undefined+const requestGateway = vi.fn(async (method: string) => {if (method === 'prompt.submit') {throw new JsonRpcGatewayError('target user message is no longer in session history', {diff --git a/apps/desktop/src/components/assistant-ui/thread/list.tsx b/apps/desktop/src/components/assistant-ui/thread/list.tsxindex b2c318721eb..c978a56b648 100644--- a/apps/desktop/src/components/assistant-ui/thread/list.tsx+++ b/apps/desktop/src/components/assistant-ui/thread/list.tsx@@ -143,20 +143,14 @@ export const resolveThreadScrollTarget: GetTargetScrollTop = (targetScrollTop, {* off the bottom should still track, but a reader in history must not yank. */export const RUN_START_SNAP_THRESHOLD_PX = 64-export function shouldSnapOnRunStart(- remainingPx: number,- thresholdPx = RUN_START_SNAP_THRESHOLD_PX-): boolean {+export function shouldSnapOnRunStart(remainingPx: number, thresholdPx = RUN_START_SNAP_THRESHOLD_PX): boolean {return remainingPx < thresholdPx}// True when the pin-to-bottom settle should re-arm. A same-session refresh// (transcript briefly emptied and repopulated under the same key) must keep// the reader's position; only a session switch or a cold-load arrival re-pins.-export function shouldRePinOnTranscriptReload(opts: {- sessionSwitched: boolean- settledNonEmpty: boolean-}): boolean {+export function shouldRePinOnTranscriptReload(opts: { sessionSwitched: boolean; settledNonEmpty: boolean }): boolean {return opts.sessionSwitched || !opts.settledNonEmpty}@@ -609,10 +603,7 @@ const ThreadMessageListInner: FC<ThreadMessageListProps> = ({useEffect(() => () => resetPublishedThreadScroll({ paneVisible }), [paneVisible])// Floating jump button (outside this subtree) → return to the bottom.- useEffect(- () => onScrollToBottomRequest(() => void scrollToBottom(), sessionId),- [scrollToBottom, sessionId]- )+ useEffect(() => onScrollToBottomRequest(() => void scrollToBottom(), sessionId), [scrollToBottom, sessionId])// Waking from display: hidden (HUD mode hides the main window; OS hide does// the same to any window): rAF and ResizeObserver may have been frozen, sodiff --git a/apps/desktop/src/i18n/ja.ts b/apps/desktop/src/i18n/ja.tsindex 845b540d002..7a3a45c8bd0 100644--- a/apps/desktop/src/i18n/ja.ts+++ b/apps/desktop/src/i18n/ja.ts@@ -163,7 +163,8 @@ export const ja = defineLocale({openaiRejectedApiKey: 'OpenAI が API キーを拒否しました。',openaiRejectedApiKeyWithStatus: status => `OpenAI が API キーを拒否しました (${status} invalid_api_key)。`,openaiTtsNeedsKey: 'OpenAI TTS には VOICE_TOOLS_OPENAI_KEY または OPENAI_API_KEY が必要です。',- codeSkewRestartRequired: 'アップデート後、このバックエンドは古いコードのままです。再起動して新しいコードを読み込んでください。'+ codeSkewRestartRequired:+ 'アップデート後、このバックエンドは古いコードのままです。再起動して新しいコードを読み込んでください。'},voice: {configureSpeechToText: '音声モードを使用するには音声認識を設定してください。',@@ -998,7 +999,8 @@ export const ja = defineLocale({model: 'モデル',applying: '適用中...',loadFailed: 'モデルを読み込めませんでした',- restartRequired: 'アップデート後、このバックエンドは古いコードのままです。再起動して新しいコードを読み込んでください。',+ restartRequired:+ 'アップデート後、このバックエンドは古いコードのままです。再起動して新しいコードを読み込んでください。',restartBackend: 'バックエンドを再起動',restartingBackend: 'バックエンドを再起動中...',restartFailed: 'バックエンドを再起動できませんでした',diff --git a/apps/desktop/src/lib/model-options.test.ts b/apps/desktop/src/lib/model-options.test.tsindex c7846521ee7..350f454afa9 100644--- a/apps/desktop/src/lib/model-options.test.ts+++ b/apps/desktop/src/lib/model-options.test.ts@@ -206,13 +206,7 @@ describe('modelOptionsQueryKey', () => {const sourceBKey = modelOptionsQueryKey('default', 'session-1', 'source-b')const queryClient = new QueryClient()- expect(sourceAKey).toEqual([- 'model-options',- 'default',- 'session-1',- 'owner',- 'source-a'- ])+ expect(sourceAKey).toEqual(['model-options', 'default', 'session-1', 'owner', 'source-a'])queryClient.setQueryData(sourceAKey, { providers: [{ models: ['a/model'], slug: 'a' }] })queryClient.setQueryData(sourceBKey, { providers: [{ models: ['b/model'], slug: 'b' }] })diff --git a/apps/desktop/src/lib/model-picker-owner.test.ts b/apps/desktop/src/lib/model-picker-owner.test.tsindex f14de178192..89172e7bfc7 100644--- a/apps/desktop/src/lib/model-picker-owner.test.ts+++ b/apps/desktop/src/lib/model-picker-owner.test.ts@@ -43,4 +43,4 @@ describe('resolveModelPickerOwner', () => {})).toEqual({ connectionId: 'connection-a', profile: 'profile-a', route: undefined })})-})\ No newline at end of file+})diff --git a/apps/desktop/src/lib/model-picker-owner.ts b/apps/desktop/src/lib/model-picker-owner.tsindex 7c71f9df06e..92e7cbfe830 100644--- a/apps/desktop/src/lib/model-picker-owner.ts+++ b/apps/desktop/src/lib/model-picker-owner.ts@@ -36,4 +36,4 @@ export function resolveModelPickerOwner({profile: route?.targetProfile || route?.profile || ambientProfile,route}-}\ No newline at end of file+}diff --git a/apps/desktop/src/lib/session-date-groups.test.ts b/apps/desktop/src/lib/session-date-groups.test.tsindex 0f5b17ea615..dc44190c906 100644--- a/apps/desktop/src/lib/session-date-groups.test.ts+++ b/apps/desktop/src/lib/session-date-groups.test.ts@@ -214,12 +214,7 @@ describe('hideCollapsedGroupRows', () => {const visible = hideCollapsedGroupRows(rows, key => key !== 'yesterday')- expect(visible).toEqual([- rows[0],- rows[1],- rows[4],- rows[5]- ])+ expect(visible).toEqual([rows[0], rows[1], rows[4], rows[5]])})it('never hides the unlabelled head above the first divider', () => {diff --git a/apps/desktop/src/lib/session-date-groups.ts b/apps/desktop/src/lib/session-date-groups.tsindex 04f4c8bc421..089502104c0 100644--- a/apps/desktop/src/lib/session-date-groups.ts+++ b/apps/desktop/src/lib/session-date-groups.ts@@ -195,6 +195,7 @@ export function hideCollapsedGroupRows(if (row.kind === 'divider') {hiding = !isOpen(row.key)out.push(row)+continue}diff --git a/apps/desktop/src/store/session.ts b/apps/desktop/src/store/session.tsindex 029fa90acbb..b89d9e9a314 100644--- a/apps/desktop/src/store/session.ts+++ b/apps/desktop/src/store/session.ts@@ -5,7 +5,11 @@ import { lastVisibleMessageIsUser } from '@/app/chat/thread-loading'import type { ContextSuggestion } from '@/app/types'import type { HermesConnection } from '@/global'import type { ChatMessage } from '@/lib/chat-messages'-import { activeConnectionScopeSuffix, connectionScopeSuffix, rescopeConnectionScopedStores } from '@/lib/connection-scoped'+import {+ activeConnectionScopeSuffix,+ connectionScopeSuffix,+ rescopeConnectionScopedStores+} from '@/lib/connection-scoped'import { persistBoolean, persistString, readJson, storedBoolean, storedString, writeJson } from '@/lib/storage'import { syncCronModelImpactConnection } from '@/store/cron-model-impact-scope'import type { SessionInfo, UsageStats } from '@/types/hermes'diff --git a/apps/desktop/src/store/thread-scroll.test.ts b/apps/desktop/src/store/thread-scroll.test.tsindex 5fafa32a5d6..cfd1ecab5ee 100644--- a/apps/desktop/src/store/thread-scroll.test.ts+++ b/apps/desktop/src/store/thread-scroll.test.ts@@ -32,7 +32,7 @@ describe('publishThreadAtBottom', () => {expect($threadScrolledUp.get()).toBe(false)})- it('keeps the visible pane\'s scrolled-up chrome when a hidden pane publishes', () => {+ it("keeps the visible pane's scrolled-up chrome when a hidden pane publishes", () => {publishThreadAtBottom(false, { paneVisible: true })publishThreadAtBottom(true, { paneVisible: false })@@ -77,7 +77,7 @@ describe('requestScrollToBottom', () => {stopB()})- it('does not let a late unmount clear a newer session\'s handler', () => {+ it("does not let a late unmount clear a newer session's handler", () => {const first = vi.fn()const second = vi.fn()const stopFirst = onScrollToBottomRequest(first, 'session-a')