Skip to content

The agent that grows with you

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

hermes-seaeye[bot]13f6b46daab7
diff --git a/apps/desktop/electron/main.ts b/apps/desktop/electron/main.ts
index 0245042f6cf..f041020ca5f 100644
--- a/apps/desktop/electron/main.ts
+++ b/apps/desktop/electron/main.ts
@@ -7463,7 +7463,10 @@ async function clearOauthSession(baseUrl) {
// ``/auth/login`` → portal ``/oauth/authorize`` (auto-approves org members)
// → ``/auth/callback``, which sets the gateway cookie with NO interactive
// prompt. This is the per-agent cloud cascade (decisions.md Q5).
-function openOauthLoginWindow(baseUrl, { silent = false, background = false, connectionId = '', pendingAuthMode = '', pendingKind = '' } = {}) {
+function openOauthLoginWindow(
+ baseUrl,
+ { silent = false, background = false, connectionId = '', pendingAuthMode = '', pendingKind = '' } = {}
+) {
return new Promise((resolve, reject) => {
if (!app.isReady()) {
reject(new Error('Desktop is not ready to start an OAuth login.'))
diff --git a/apps/desktop/electron/oauth-navigation.test.ts b/apps/desktop/electron/oauth-navigation.test.ts
index ac8ddc6fc8a..0814ad9df27 100644
--- a/apps/desktop/electron/oauth-navigation.test.ts
+++ b/apps/desktop/electron/oauth-navigation.test.ts
@@ -4,9 +4,12 @@ import { isExpectedOauthNavigationAbort } from './oauth-navigation'
describe('isExpectedOauthNavigationAbort', () => {
it('treats Electron ERR_ABORTED callback navigation as non-fatal', () => {
- const error = Object.assign(new Error("ERR_ABORTED (-3) loading 'https://agent.example.com/auth/callback?code=redacted'"), {
- code: -3
- })
+ const error = Object.assign(
+ new Error("ERR_ABORTED (-3) loading 'https://agent.example.com/auth/callback?code=redacted'"),
+ {
+ code: -3
+ }
+ )
expect(isExpectedOauthNavigationAbort(error)).toBe(true)
})
diff --git a/apps/desktop/electron/oauth-partition.test.ts b/apps/desktop/electron/oauth-partition.test.ts
index 562d3d85dcd..1cac60d1e3a 100644
--- a/apps/desktop/electron/oauth-partition.test.ts
+++ b/apps/desktop/electron/oauth-partition.test.ts
@@ -289,9 +289,7 @@ describe('resolveOauthPartition with connectionId (pre-save sign-in identity)',
const savedReg = registry('local', [
{ id: 'local', kind: 'local' },
- kind === 'remote'
- ? remote('draft-1', draftUrl, { authMode })
- : { id: 'draft-1', kind, url: draftUrl, authMode }
+ kind === 'remote' ? remote('draft-1', draftUrl, { authMode }) : { id: 'draft-1', kind, url: draftUrl, authMode }
])
const readJar = resolveOauthPartition(draftUrl, { registry: savedReg })
diff --git a/apps/desktop/electron/oauth-partition.ts b/apps/desktop/electron/oauth-partition.ts
index d80d19f3520..b85196bfc2a 100644
--- a/apps/desktop/electron/oauth-partition.ts
+++ b/apps/desktop/electron/oauth-partition.ts
@@ -181,9 +181,7 @@ export function resolveOauthPartition(requestUrl: unknown, opts: ResolveOauthPar
const pendingKind = typeof opts.pendingKind === 'string' ? opts.pendingKind : ''
const pendingAuthMode = typeof opts.pendingAuthMode === 'string' ? opts.pendingAuthMode : ''
- return pendingKind === 'remote' &&
- pendingAuthMode === 'oauth' &&
- !(v1Norm && requestNorm === v1Norm)
+ return pendingKind === 'remote' && pendingAuthMode === 'oauth' && !(v1Norm && requestNorm === v1Norm)
? `${CONNECTION_PARTITION_PREFIX}${sanitizePartitionComponent(wantedId)}`
: LEGACY_OAUTH_PARTITION
}
diff --git a/apps/desktop/electron/renderer-log.test.ts b/apps/desktop/electron/renderer-log.test.ts
index f120e56fbb0..f955fc97e9e 100644
--- a/apps/desktop/electron/renderer-log.test.ts
+++ b/apps/desktop/electron/renderer-log.test.ts
@@ -38,9 +38,7 @@ describe('formatRendererConsoleLine', () => {
})
it('drops a canonical non-error string level', () => {
- expect(
- formatRendererConsoleLine('main', { level: 'info', message: 'x', sourceId: 's', lineNumber: 1 })
- ).toBeNull()
+ expect(formatRendererConsoleLine('main', { level: 'info', message: 'x', sourceId: 's', lineNumber: 1 })).toBeNull()
})
it('drops malformed event objects', () => {
diff --git a/apps/desktop/electron/renderer-log.ts b/apps/desktop/electron/renderer-log.ts
index 282f8b665c7..984d38ec63b 100644
--- a/apps/desktop/electron/renderer-log.ts
+++ b/apps/desktop/electron/renderer-log.ts
@@ -75,7 +75,7 @@ export function formatRendererConsoleLine(label: string, details: ConsoleMessage
/** Attach the error-level console hook to a renderer window. `log` is the
* desktop.log sink (rememberLog in main.ts). */
export function attachRendererConsoleCapture(win: WindowLike, label: string, log: (line: string) => void): void {
- win.webContents.on('console-message', (event) => {
+ win.webContents.on('console-message', event => {
if (!isConsoleMessageDetails(event)) {
if (!didReportConsoleMessageSignatureDrift) {
didReportConsoleMessageSignatureDrift = true
diff --git a/apps/desktop/src/app/chat/browser-popout-handoff.test.tsx b/apps/desktop/src/app/chat/browser-popout-handoff.test.tsx
index e1d63cc2abc..fefd1396073 100644
--- a/apps/desktop/src/app/chat/browser-popout-handoff.test.tsx
+++ b/apps/desktop/src/app/chat/browser-popout-handoff.test.tsx
@@ -69,9 +69,7 @@ async function expectGuestWithUrl(rendered: ReturnType<typeof render>, url: stri
expect(rendered.container.querySelector('[aria-label="Pop in"]')).not.toBeNull()
// Address bar tracks the handed-off URL.
- expect((rendered.container.querySelector('input') as HTMLInputElement | null)?.value).toContain(
- '127.0.0.1'
- )
+ expect((rendered.container.querySelector('input') as HTMLInputElement | null)?.value).toContain('127.0.0.1')
}
describe('browser pop-out content handoff', () => {
@@ -124,7 +122,10 @@ describe('a fresh renderer adopts stored tabs without clobbering them', () => {
// init, and echoing the just-read (empty) view back over storage wiped the
// record before any adoption could read it.
it('seeds the default bucket into the view at boot', async () => {
- window.localStorage.setItem(TABS_KEY, JSON.stringify({ default: [tabRow('url:boot-1', 'http://127.0.0.1:9119/kanban')] }))
+ window.localStorage.setItem(
+ TABS_KEY,
+ JSON.stringify({ default: [tabRow('url:boot-1', 'http://127.0.0.1:9119/kanban')] })
+ )
const { $previewTabs } = await import('@/store/preview')
diff --git a/apps/desktop/src/app/command-center/index.tsx b/apps/desktop/src/app/command-center/index.tsx
index 3b15b5e070e..0adf6127965 100644
--- a/apps/desktop/src/app/command-center/index.tsx
+++ b/apps/desktop/src/app/command-center/index.tsx
@@ -162,9 +162,8 @@ export function CommandCenterView({
// Gate like the other selectors: only subscribe on the Sessions tab so
// System/Usage/Maintenance don't re-render when $sessionProfilesTruncated
// ticks on every session fetch.
- const sessionProfilesTruncated = useStoreSelector(
- $sessionProfilesTruncated,
- s => (section === 'sessions' ? s : EMPTY_TRUNCATED)
+ const sessionProfilesTruncated = useStoreSelector($sessionProfilesTruncated, s =>
+ section === 'sessions' ? s : EMPTY_TRUNCATED
)
const [query, setQuery] = useState('')
@@ -421,48 +420,48 @@ export function CommandCenterView({
) : (
<ul>
{filteredSessions.map(session => {
- const pinId = sessionPinId(session)
- const pinned = pinnedSessionIds.includes(pinId)
-
- return (
- <li className="group flex items-center gap-2 py-2" key={session.id}>
- <button
- className="min-w-0 flex-1 text-left"
- onClick={() => onOpenSession(session.id)}
- type="button"
- >
- <div className="truncate text-[length:var(--conversation-text-font-size)] font-medium text-foreground">
- {sessionTitle(session)}
- </div>
- <div className="truncate text-[length:var(--conversation-caption-font-size)] text-(--ui-text-tertiary)">
- {formatTimestamp(session.last_active || session.started_at)}
- </div>
- </button>
- <div className="flex shrink-0 items-center gap-0.5 opacity-0 transition-opacity group-hover:opacity-100 focus-within:opacity-100">
- <RowIconButton
- onClick={() => (pinned ? unpinSession(pinId) : pinSession(pinId))}
- title={pinned ? cc.unpinSession : cc.pinSession}
- >
- {pinned ? <BookmarkFilled className="size-3.5" /> : <Bookmark className="size-3.5" />}
- </RowIconButton>
- <RowIconButton
- onClick={() => void exportSession(session.id, { session, title: sessionTitle(session) })}
- title={cc.exportSession}
+ const pinId = sessionPinId(session)
+ const pinned = pinnedSessionIds.includes(pinId)
+
+ return (
+ <li className="group flex items-center gap-2 py-2" key={session.id}>
+ <button
+ className="min-w-0 flex-1 text-left"
+ onClick={() => onOpenSession(session.id)}
+ type="button"
>
- <Download className="size-3.5" />
- </RowIconButton>
- <RowIconButton
- className="hover:text-destructive"
- onClick={() => setPendingDelete(session)}
- title={cc.deleteSession}
- >
- <Trash2 className="size-3.5" />
- </RowIconButton>
- </div>
- </li>
- )
- })}
- </ul>
+ <div className="truncate text-[length:var(--conversation-text-font-size)] font-medium text-foreground">
+ {sessionTitle(session)}
+ </div>
+ <div className="truncate text-[length:var(--conversation-caption-font-size)] text-(--ui-text-tertiary)">
+ {formatTimestamp(session.last_active || session.started_at)}
+ </div>
+ </button>
+ <div className="flex shrink-0 items-center gap-0.5 opacity-0 transition-opacity group-hover:opacity-100 focus-within:opacity-100">
+ <RowIconButton
+ onClick={() => (pinned ? unpinSession(pinId) : pinSession(pinId))}
+ title={pinned ? cc.unpinSession : cc.pinSession}
+ >
+ {pinned ? <BookmarkFilled className="size-3.5" /> : <Bookmark className="size-3.5" />}
+ </RowIconButton>
+ <RowIconButton
+ onClick={() => void exportSession(session.id, { session, title: sessionTitle(session) })}
+ title={cc.exportSession}
+ >
+ <Download className="size-3.5" />
+ </RowIconButton>
+ <RowIconButton
+ className="hover:text-destructive"
+ onClick={() => setPendingDelete(session)}
+ title={cc.deleteSession}
+ >
+ <Trash2 className="size-3.5" />
+ </RowIconButton>
+ </div>
+ </li>
+ )
+ })}
+ </ul>
)}
</div>
{hasMoreSessions && !!onLoadMoreSessions && !debouncedQuery && (
diff --git a/apps/desktop/src/app/contrib/hooks/use-desktop-integrations.test.tsx b/apps/desktop/src/app/contrib/hooks/use-desktop-integrations.test.tsx
index cc2feaad3f9..8ce05a7f36c 100644
--- a/apps/desktop/src/app/contrib/hooks/use-desktop-integrations.test.tsx
+++ b/apps/desktop/src/app/contrib/hooks/use-desktop-integrations.test.tsx
@@ -321,8 +321,6 @@ describe('useDesktopIntegrations', () => {
})
})
-
-
describe('resume-exhausted write barrier (#98467)', () => {
it('does not re-persist an exhausted session on a session-list refresh', () => {
window.localStorage.setItem('hermes.desktop.lastRoute.profile.default', '/exhausted-session')
diff --git a/apps/desktop/src/app/gateway/hooks/use-gateway-boot-initial-connect.test.ts b/apps/desktop/src/app/gateway/hooks/use-gateway-boot-initial-connect.test.ts
index 3818b124cad..602e131c28e 100644
--- a/apps/desktop/src/app/gateway/hooks/use-gateway-boot-initial-connect.test.ts
+++ b/apps/desktop/src/app/gateway/hooks/use-gateway-boot-initial-connect.test.ts
@@ -20,16 +20,14 @@ describe('connectInitialGateway (initial-boot dial retry, #49645)', () => {
it('throws the last error after exhausting all attempts', async () => {
const connect = vi.fn<() => Promise<void>>().mockRejectedValue(new Error('backend cold'))
- await expect(
- connectInitialGateway({ attempts: 3, connect, delayMs: 0, isCancelled: never })
- ).rejects.toThrow('backend cold')
+ await expect(connectInitialGateway({ attempts: 3, connect, delayMs: 0, isCancelled: never })).rejects.toThrow(
+ 'backend cold'
+ )
expect(connect).toHaveBeenCalledTimes(3)
})
it('fails fast on reauth errors without retrying', async () => {
- const connect = vi
- .fn<() => Promise<void>>()
- .mockRejectedValue(new GatewayReauthRequiredError('sign in again'))
+ const connect = vi.fn<() => Promise<void>>().mockRejectedValue(new GatewayReauthRequiredError('sign in again'))
await expect(connectInitialGateway({ connect, delayMs: 0, isCancelled: never })).rejects.toBeInstanceOf(
GatewayReauthRequiredError
@@ -39,15 +37,16 @@ describe('connectInitialGateway (initial-boot dial retry, #49645)', () => {
it('stops retrying once cancelled (component unmounted)', async () => {
let cancelled = false
+
const connect = vi.fn<() => Promise<void>>().mockImplementation(() => {
cancelled = true
return Promise.reject(new Error('connect ECONNREFUSED'))
})
- await expect(
- connectInitialGateway({ connect, delayMs: 0, isCancelled: () => cancelled })
- ).rejects.toThrow('connect ECONNREFUSED')
+ await expect(connectInitialGateway({ connect, delayMs: 0, isCancelled: () => cancelled })).rejects.toThrow(
+ 'connect ECONNREFUSED'
+ )
expect(connect).toHaveBeenCalledTimes(1)
})
})
diff --git a/apps/desktop/src/app/gateway/hooks/use-gateway-boot.ts b/apps/desktop/src/app/gateway/hooks/use-gateway-boot.ts
index 882e5355fcd..9168fefee09 100644
--- a/apps/desktop/src/app/gateway/hooks/use-gateway-boot.ts
+++ b/apps/desktop/src/app/gateway/hooks/use-gateway-boot.ts
@@ -199,6 +199,7 @@ export async function connectInitialGateway({
if (isGatewayReauthRequired(err)) {
throw err
}
+
lastConnectError = err
if (attempt < attempts - 1) {
@@ -1437,12 +1438,14 @@ export function useGatewayBoot({
RECONNECT_ATTEMPT_TIMEOUT_MS,
'Timed out minting the gateway WebSocket URL'
))
+
await gateway.connect(url)
},
isCancelled: () => cancelled,
initialUrl: wsUrl
})
}
+
stage = 'connected'
if (cancelled) {
diff --git a/apps/desktop/src/app/right-sidebar/files/ipc.test.ts b/apps/desktop/src/app/right-sidebar/files/ipc.test.ts
index 56bd61065a8..e5857a6070a 100644
--- a/apps/desktop/src/app/right-sidebar/files/ipc.test.ts
+++ b/apps/desktop/src/app/right-sidebar/files/ipc.test.ts
@@ -281,8 +281,10 @@ describe('readProjectDir', () => {
// `nested` is the set of directories that are their own repository root;
// everything else resolves to its parent repo. Growing the set between
// reads simulates the user running `git init` underneath the project.
- const gitRootOf = (nested: string[]) =>
- async (path: string): Promise<string | null> => (nested.includes(path) ? path : path.startsWith('/repo2') ? '/repo2' : '/repo')
+ const gitRootOf =
+ (nested: string[]) =>
+ async (path: string): Promise<string | null> =>
+ nested.includes(path) ? path : path.startsWith('/repo2') ? '/repo2' : '/repo'
const countCalls = (mock: typeof gitRoot | typeof readFileDataUrl, arg: string) =>
mock.mock.calls.filter(([callArg]) => callArg === arg).length
diff --git a/apps/desktop/src/app/session/hooks/use-background-queue-drain.test.tsx b/apps/desktop/src/app/session/hooks/use-background-queue-drain.test.tsx
index 5bc99b7147f..ea18717dab9 100644
--- a/apps/desktop/src/app/session/hooks/use-background-queue-drain.test.tsx
+++ b/apps/desktop/src/app/session/hooks/use-background-queue-drain.test.tsx
@@ -290,7 +290,7 @@ describe('useBackgroundQueueDrain', () => {
await waitFor(() => expect(getQueuedPrompts('stored-session-a')).toHaveLength(0))
})
- it('drops a gone session\'s queued prompt quietly at drain exhaustion instead of erroring (#98015)', async () => {
+ it("drops a gone session's queued prompt quietly at drain exhaustion instead of erroring (#98015)", async () => {
vi.useFakeTimers()
// The session list has settled and no row answers to the queued session:
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 8df4ff202eb..ea193b5a7f6 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
@@ -339,6 +339,7 @@ export function useSessionListActions({ profileScope }: UseSessionListActionsArg
if (owns()) {
const recents = result.recents
const recentsErrors = recents.errors ?? result.errors
+
const scopedRetry =
recents.retry === true ||
(sessionProfile !== 'all' && recents.profiles_failed?.[sessionProfile]?.retry === true) ||
@@ -348,11 +349,7 @@ export function useSessionListActions({ profileScope }: UseSessionListActionsArg
// A damaged store already has its own notice; Retry can't repair it.
const retryableErrors = recentsErrors?.filter(e => !result.storage?.[e.profile])
setSessionsLoadError(
- Boolean(
- showLoading &&
- (scopedRetry || retryableErrors?.length) &&
- (recents.sessions?.length ?? 0) === 0
- )
+ Boolean(showLoading && (scopedRetry || retryableErrors?.length) && (recents.sessions?.length ?? 0) === 0)
)
// Drop rows the user just deleted/archived: a refresh can race an
diff --git a/apps/desktop/src/app/session/hooks/use-session-state-cache.test.tsx b/apps/desktop/src/app/session/hooks/use-session-state-cache.test.tsx
index 1b041e5e857..2b868fb7f4c 100644
--- a/apps/desktop/src/app/session/hooks/use-session-state-cache.test.tsx
+++ b/apps/desktop/src/app/session/hooks/use-session-state-cache.test.tsx
@@ -249,7 +249,11 @@ describe('useSessionStateCache — stored-id rotation provenance', () => {
setActiveSessionId('runtime-visible-b')
render(
- <Harness activeSessionId="runtime-visible-b" onReady={value => (cache = value)} selectedStoredSessionId={null} />
+ <Harness
+ activeSessionId="runtime-visible-b"
+ onReady={value => (cache = value)}
+ selectedStoredSessionId={null}
+ />
)
act(() => {
diff --git a/apps/desktop/src/components/remote-setup/use-remote-setup.ts b/apps/desktop/src/components/remote-setup/use-remote-setup.ts
index a8262eb9f05..67c656fe122 100644
--- a/apps/desktop/src/components/remote-setup/use-remote-setup.ts
+++ b/apps/desktop/src/components/remote-setup/use-remote-setup.ts
@@ -1,10 +1,6 @@
import { useRef, useState } from 'react'
-import type {
- DesktopConnectionConfigInput,
- DesktopConnectionProbeResult,
- DesktopOauthLoginOptions
-} from '@/global'
+import type { DesktopConnectionConfigInput, DesktopConnectionProbeResult, DesktopOauthLoginOptions } from '@/global'
import { useI18n } from '@/i18n'
import { deriveRemoteAuthProviderShape } from '@/lib/desktop-remote-auth'
import { coerceRemoteUrlScheme } from '@/lib/remote-url'
@@ -150,8 +146,7 @@ export function useRemoteSetup(options: RemoteSetupOptions): RemoteSetup {
targetSeq,
beforeOAuthLogin: (value: DesktopConnectionConfigInput): Promise<void> | undefined =>
callbacks.current.beforeOAuthLogin?.(value),
- oauthLoginIdentity: (): DesktopOauthLoginOptions | undefined =>
- callbacks.current.oauthLoginIdentity?.(),
+ oauthLoginIdentity: (): DesktopOauthLoginOptions | undefined => callbacks.current.oauthLoginIdentity?.(),
onOAuthLoginSettled: (connectionId: string): void => {
callbacks.current.onOAuthLoginSettled?.(connectionId)
},
diff --git a/apps/desktop/src/i18n/de.ts b/apps/desktop/src/i18n/de.ts
index 092fa629052..69ef04a2fa3 100644
--- a/apps/desktop/src/i18n/de.ts
+++ b/apps/desktop/src/i18n/de.ts
@@ -5643,7 +5643,8 @@ export const deOverrides = {
questionProgress: (answered, total) => `${answered} von ${total} beantwortet`,
lateAnswer: (question, choice) => `Re: „${question}“ — meine Antwort: ${choice}`,
lateAnswerTip: 'Diese Antwort als Folgenachricht entwerfen',
- lateAnswerHint: 'Dieser Prompt wartet nicht mehr. Wählen Sie eine Option, um sie als Folgenachricht zu entwerfen.',
+ lateAnswerHint:
+ 'Dieser Prompt wartet nicht mehr. Wählen Sie eine Option, um sie als Folgenachricht zu entwerfen.',
notDelivered:
'Diese Frage hat die App nicht erreicht und kann hier nicht beantwortet werden. Klicken Sie auf Stopp, um den Durchgang zu beenden, und antworten Sie dann im Chat.'
},
diff --git a/apps/desktop/src/i18n/fr.ts b/apps/desktop/src/i18n/fr.ts
index 1859ef62dd4..0ce3e333877 100644
--- a/apps/desktop/src/i18n/fr.ts
+++ b/apps/desktop/src/i18n/fr.ts
@@ -3789,8 +3789,8 @@ export const frOverrides = {
nameLabel: 'Nom',
namePlaceholder: 'Point du matin',
promptLabel: 'Invite',
- scriptLabel: "Script",
- scriptBadge: "script",
+ scriptLabel: 'Script',
+ scriptBadge: 'script',
promptPlaceholder: 'Résumez mes fils Slack non lus et envoyez-moi les 5 principaux par email...',
frequencyLabel: 'Fréquence',
deliverLabel: 'Livrer vers',
diff --git a/apps/desktop/src/i18n/ja.ts b/apps/desktop/src/i18n/ja.ts
index 784ac76764c..9d76d7a347b 100644
--- a/apps/desktop/src/i18n/ja.ts
+++ b/apps/desktop/src/i18n/ja.ts
@@ -3872,7 +3872,8 @@ export const ja = defineLocale({
questionProgress: (answered, total) => `${total}問中${answered}問回答済み`,
lateAnswer: (question, choice) => `「${question}」について — 私の回答: ${choice}`,
lateAnswerTip: 'この回答をフォローアップメッセージとして下書きします',
- lateAnswerHint: 'この質問はもう回答を待っていません。選択肢を選ぶとフォローアップメッセージとして下書きされます。',
+ lateAnswerHint:
+ 'この質問はもう回答を待っていません。選択肢を選ぶとフォローアップメッセージとして下書きされます。',
notDelivered:
'この質問はアプリに届かなかったため、ここでは回答できません。停止を押してターンを終了し、チャットで返信してください。'
},
diff --git a/apps/desktop/src/lib/markdown-preprocess.citation.test.ts b/apps/desktop/src/lib/markdown-preprocess.citation.test.ts
index 69c8a18da3e..3069b6fabed 100644
--- a/apps/desktop/src/lib/markdown-preprocess.citation.test.ts
+++ b/apps/desktop/src/lib/markdown-preprocess.citation.test.ts
@@ -12,9 +12,9 @@ const P = { E200: '', E201: '', E202: '' }
describe('web citation transport markers', () => {
it('strips a single-id marker from prose', () => {
- expect(preprocessMarkdown(`Ice floats because it is less dense than liquid water.${P.E200}citeturn0search0${P.E201}`)).toBe(
- 'Ice floats because it is less dense than liquid water.'
- )
+ expect(
+ preprocessMarkdown(`Ice floats because it is less dense than liquid water.${P.E200}citeturn0search0${P.E201}`)
+ ).toBe('Ice floats because it is less dense than liquid water.')
})
it('strips a multi-id marker list', () => {
diff --git a/apps/desktop/src/lib/session-branch-tree.test.ts b/apps/desktop/src/lib/session-branch-tree.test.ts
index a78bbbb60fc..36bf27f1c17 100644
--- a/apps/desktop/src/lib/session-branch-tree.test.ts
+++ b/apps/desktop/src/lib/session-branch-tree.test.ts
@@ -158,7 +158,9 @@ describe('flattenSessionsWithBranches', () => {
const second = reset('second', 'first', { last_active: 20 })
const third = reset('third', 'second', { last_active: 30 })
- expect(flattenSessionsWithBranches([first, second, third]).map(e => ({ id: e.session.id, stem: e.branchStem }))).toEqual([
+ expect(
+ flattenSessionsWithBranches([first, second, third]).map(e => ({ id: e.session.id, stem: e.branchStem }))
+ ).toEqual([
{ id: 'third', stem: undefined },
{ id: 'second', stem: undefined },
{ id: 'first', stem: undefined }
@@ -170,7 +172,9 @@ describe('flattenSessionsWithBranches', () => {
const branch = fork('branch', 'parent', { last_active: 15 })
const nextTopic = reset('next', 'parent', { last_active: 20 })
- expect(flattenSessionsWithBranches([parent, branch, nextTopic]).map(e => ({ id: e.session.id, stem: e.branchStem }))).toEqual([
+ expect(
+ flattenSessionsWithBranches([parent, branch, nextTopic]).map(e => ({ id: e.session.id, stem: e.branchStem }))
+ ).toEqual([
{ id: 'next', stem: undefined },
{ id: 'parent', stem: undefined },
{ id: 'branch', stem: '└─ ' }
diff --git a/apps/desktop/src/lib/stale-transcript-guard.test.ts b/apps/desktop/src/lib/stale-transcript-guard.test.ts
index 89c6563ee6b..dc7170a59cf 100644
--- a/apps/desktop/src/lib/stale-transcript-guard.test.ts
+++ b/apps/desktop/src/lib/stale-transcript-guard.test.ts
@@ -35,7 +35,13 @@ const assistantTurn = (id: number, text: string): SessionMessage =>
/** What an in-place model switch persists, exactly as the gateway writes it. */
const modelSwitchNotice = (id: number): SessionMessage =>
- row({ content: 'switched to another model', display_kind: 'model_switch', id, role: 'user', timestamp: 1_700_000_000 + id })
+ row({
+ content: 'switched to another model',
+ display_kind: 'model_switch',
+ id,
+ role: 'user',
+ timestamp: 1_700_000_000 + id
+ })
describe('messagesIfTranscriptBehind', () => {
it('does not treat a backend-authored notice as another view being ahead', () => {
diff --git a/apps/desktop/src/store/session-states.ts b/apps/desktop/src/store/session-states.ts
index 5b08e10d3b0..f3b44dc84fa 100644
--- a/apps/desktop/src/store/session-states.ts
+++ b/apps/desktop/src/store/session-states.ts
@@ -1304,7 +1304,8 @@ function sameSessionOwner(left: SessionOwnerScope, right: SessionOwnerScope): bo
return (
left.connectionId.trim() === right.connectionId.trim() &&
normalizeProfileKey(left.profile) === normalizeProfileKey(right.profile) &&
- normalizeProfileKey(left.targetProfile ?? left.profile) === normalizeProfileKey(right.targetProfile ?? right.profile)
+ normalizeProfileKey(left.targetProfile ?? left.profile) ===
+ normalizeProfileKey(right.targetProfile ?? right.profile)
)
}
@@ -1345,11 +1346,7 @@ function tilesShareOwner(left: SessionTile, right: SessionTile): boolean {
return true
}
-function tileBelongsToMain(
- tile: SessionTile,
- selectedStoredSessionId: string,
- tileProfile = profileKey()
-): boolean {
+function tileBelongsToMain(tile: SessionTile, selectedStoredSessionId: string, tileProfile = profileKey()): boolean {
if (tileWorkspaceMode(tile) === 'bots') {
return false
}