diff --git a/apps/desktop/src/app/chat/composer/focus.ts b/apps/desktop/src/app/chat/composer/focus.ts
index 008ce4e128..dc72c10e59 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.ts
index b15bfa08af..4f8f862b9b 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.tsx
index 37d6ded272..773263e3ff 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.tsx
index caaef1e8dc..500211c27f 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(
-
+
)
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.tsx
index e1e21b6712..62f0271428 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}
)
+
const rule =
return (
diff --git a/apps/desktop/src/app/chat/sidebar/filter-menu.tsx b/apps/desktop/src/app/chat/sidebar/filter-menu.tsx
index dce76ab786..9aa683d508 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)?.label
diff --git a/apps/desktop/src/app/chat/sidebar/sessions-section.tsx b/apps/desktop/src/app/chat/sidebar/sessions-section.tsx
index bc85e5332f..235b812cd4 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.tsx
index 2666cdb856..34c8806d9d 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.tsx
index da254e334c..7d6a610d16 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.ts
index 392be88735..4d0d63b058 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(
- modelOptionsQueryKey(profile, sessionId, ownerConnectionId),
- patch
- )
+ queryClient.setQueryData(modelOptionsQueryKey(profile, sessionId, ownerConnectionId), patch)
if (includeGlobal) {
queryClient.setQueryData(modelOptionsQueryKey(profile, null, ownerConnectionId), patch)
@@ -140,11 +137,7 @@ export function useModelControls({
}
const options = queryClient.getQueryData(
- 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.tsx
index 8daf185775..59e7182195 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 | 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.tsx
index b2c318721e..c978a56b64 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 = ({
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, so
diff --git a/apps/desktop/src/i18n/ja.ts b/apps/desktop/src/i18n/ja.ts
index 845b540d00..7a3a45c8bd 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.ts
index c7846521ee..350f454afa 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.ts
index f14de17819..89172e7bfc 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.ts
index 7c71f9df06..92e7cbfe83 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.ts
index 0f5b17ea61..dc44190c90 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.ts
index 04f4c8bc42..089502104c 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.ts
index 029fa90acb..b89d9e9a31 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.ts
index 5fafa32a5d..cfd1ecab5e 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')