Skip to content

The agent that grows with you

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

hermes-seaeye[bot]bcef556b0030
diff --git a/apps/desktop/src/app/agents/index.tsx b/apps/desktop/src/app/agents/index.tsx
index 09d9ce88c31..e9f977b60ed 100644
--- a/apps/desktop/src/app/agents/index.tsx
+++ b/apps/desktop/src/app/agents/index.tsx
@@ -178,7 +178,8 @@ function groupDelegations(roots: readonly SubagentNode[]): RootGroup[] {
const prev = groups.at(-1)
const prevTail = prev?.nodes.at(-1)
const closeInTime = prevTail ? Math.abs(node.startedAt - prevTail.startedAt) <= 5_000 : false
- const sameShape = prev && !prev.id.startsWith('delegation:') && node.taskCount > 1 && prev.taskCount === node.taskCount
+ const sameShape =
+ prev && !prev.id.startsWith('delegation:') && node.taskCount > 1 && prev.taskCount === node.taskCount
const uniqueStep = prev ? !prev.nodes.some(item => item.taskIndex === node.taskIndex) : false
if (prev && sameShape && closeInTime && uniqueStep) {
diff --git a/apps/desktop/src/app/chat/session-tile.tsx b/apps/desktop/src/app/chat/session-tile.tsx
index 5a472405f1c..484307c4071 100644
--- a/apps/desktop/src/app/chat/session-tile.tsx
+++ b/apps/desktop/src/app/chat/session-tile.tsx
@@ -559,7 +559,9 @@ function tileCaption(storedSessionId: string): string {
function tileDragPayload(storedSessionId: string): SessionDragPayload {
const stored = tileStoredRow(storedSessionId)
const tile = $sessionTiles.get().find(candidate => candidate.storedSessionId === storedSessionId)
- const title = stored ? sessionTitle(stored) : tile?.workspaceTabTitle || draftTitleFor(storedSessionId) || NEW_SESSION_TITLE
+ const title = stored
+ ? sessionTitle(stored)
+ : tile?.workspaceTabTitle || draftTitleFor(storedSessionId) || NEW_SESSION_TITLE
return { id: storedSessionId, profile: stored?.profile ?? '', title: workspaceOwnerTitle(title, tile) }
}
diff --git a/apps/desktop/src/app/contrib/hooks/use-background-sync.test.ts b/apps/desktop/src/app/contrib/hooks/use-background-sync.test.ts
index 346f47e280a..10f978faa9f 100644
--- a/apps/desktop/src/app/contrib/hooks/use-background-sync.test.ts
+++ b/apps/desktop/src/app/contrib/hooks/use-background-sync.test.ts
@@ -373,7 +373,12 @@ describe('active transcript refresh', () => {
await reconcileTileTranscriptsForTest({
tiles: [
{
- ownerRoute: { connectionId: 'connection-a', mode: 'remote', profile: 'shared-profile', targetProfile: 'target-a' },
+ ownerRoute: {
+ connectionId: 'connection-a',
+ mode: 'remote',
+ profile: 'shared-profile',
+ targetProfile: 'target-a'
+ },
runtimeId: 'runtime-a',
storedSessionId: 'stored-a'
},
@@ -389,7 +394,10 @@ describe('active transcript refresh', () => {
updateSessionState
})
- expect(getLatestSessionMessages).toHaveBeenCalledWith('stored-a', { connectionId: 'connection-a', profile: 'target-a' })
+ expect(getLatestSessionMessages).toHaveBeenCalledWith('stored-a', {
+ connectionId: 'connection-a',
+ profile: 'target-a'
+ })
expect(getLatestSessionMessages).toHaveBeenCalledWith('stored-b', {
connectionId: 'connection-b',
profile: 'shared-profile'
diff --git a/apps/desktop/src/app/contrib/hooks/use-background-sync.ts b/apps/desktop/src/app/contrib/hooks/use-background-sync.ts
index 785f4f20275..9bd5e474031 100644
--- a/apps/desktop/src/app/contrib/hooks/use-background-sync.ts
+++ b/apps/desktop/src/app/contrib/hooks/use-background-sync.ts
@@ -151,7 +151,10 @@ export async function reconcileTileTranscripts({
// read from that backend, not whichever profile is foreground. Tiles
// without a route keep the legacy local read.
const profileScope: ProfileScope = tile.ownerRoute
- ? { connectionId: tile.ownerRoute.connectionId, profile: tile.ownerRoute.targetProfile ?? tile.ownerRoute.profile }
+ ? {
+ connectionId: tile.ownerRoute.connectionId,
+ profile: tile.ownerRoute.targetProfile ?? tile.ownerRoute.profile
+ }
: undefined
const signatureKey = tileTranscriptSignatureKey(tile)
@@ -159,7 +162,11 @@ export async function reconcileTileTranscripts({
try {
const latest = await getLatestSessionMessages(storedSessionId, profileScope)
- if (requestId !== requestSequenceRef.current || tileRuntimeOwnsLiveState(runtimeSessionId) || !tileStillPresent()) {
+ if (
+ requestId !== requestSequenceRef.current ||
+ tileRuntimeOwnsLiveState(runtimeSessionId) ||
+ !tileStillPresent()
+ ) {
// Tile closed or superseded mid-read — discard AND prune its
// signature so the map doesn't grow one entry per ever-opened tile
// for the app's lifetime (#94255 review point 3).
diff --git a/apps/desktop/src/components/pane-shell/workspace-scope.test.ts b/apps/desktop/src/components/pane-shell/workspace-scope.test.ts
index 3e5b3ef6d0c..14e93c0703c 100644
--- a/apps/desktop/src/components/pane-shell/workspace-scope.test.ts
+++ b/apps/desktop/src/components/pane-shell/workspace-scope.test.ts
@@ -70,7 +70,7 @@ describe('workspace scope', () => {
})
describe('workspace owner title', () => {
- it("captions a bot chat by its bot instead of the canonical stored title, and leaves everything else alone (#99152)", () => {
+ it('captions a bot chat by its bot instead of the canonical stored title, and leaves everything else alone (#99152)', () => {
setWorkspaceOwnerLabel('bot:alpha', 'Alpha')
const botChat = { workspaceMode: 'bots' as const, workspaceOwnerKey: 'bot:alpha', workspaceTabTitle: 'Bot Chat' }
diff --git a/apps/desktop/src/i18n/en.ts b/apps/desktop/src/i18n/en.ts
index 04280720860..0bfbdc43cf4 100644
--- a/apps/desktop/src/i18n/en.ts
+++ b/apps/desktop/src/i18n/en.ts
@@ -609,7 +609,8 @@ export const en: Translations = {
embedsOff: 'Off',
embedsReset: (count: number) => `Reset ${count} allowed ${count === 1 ? 'service' : 'services'}`,
resumeLastSessionTitle: 'Reopen Last Chat on Launch',
- resumeLastSessionDesc: 'When enabled, the app reopens your most recent chat on cold start. Turn off to always start with a fresh new chat.',
+ resumeLastSessionDesc:
+ 'When enabled, the app reopens your most recent chat on cold start. Turn off to always start with a fresh new chat.',
product: 'Product',
productDesc: 'Human-friendly tool activity with concise summaries.',
technical: 'Technical',
diff --git a/apps/desktop/src/i18n/ja.ts b/apps/desktop/src/i18n/ja.ts
index 81675d1d4b0..63008af741c 100644
--- a/apps/desktop/src/i18n/ja.ts
+++ b/apps/desktop/src/i18n/ja.ts
@@ -433,7 +433,8 @@ export const ja = defineLocale({
embedsOff: 'オフ',
embedsReset: (count: number) => `許可した${count}件のサービスをリセット`,
resumeLastSessionTitle: '起動時に前回のチャットを再開',
- resumeLastSessionDesc: 'オンの場合、コールドスタート時に直近のチャットを再び開きます。オフにすると常に新しいチャットから始まります。',
+ resumeLastSessionDesc:
+ 'オンの場合、コールドスタート時に直近のチャットを再び開きます。オフにすると常に新しいチャットから始まります。',
product: 'プロダクト',
productDesc: '読みやすいツール活動と簡潔な要約を表示します。',
technical: 'テクニカル',
diff --git a/apps/desktop/src/i18n/ru.ts b/apps/desktop/src/i18n/ru.ts
index d9bf0a06db2..1f42e1ee2d5 100644
--- a/apps/desktop/src/i18n/ru.ts
+++ b/apps/desktop/src/i18n/ru.ts
@@ -594,7 +594,8 @@ export const ru = defineLocale({
embedsReset: count =>
`Сбросить ${count} ${RU_NOUN(count, 'разрешённый сервис', 'разрешённых сервиса', 'разрешённых сервисов')}`,
resumeLastSessionTitle: 'Открывать последний чат при запуске',
- resumeLastSessionDesc: 'Продолжайте с того места, где остановились. Выключите, чтобы всегда начинать с нового чата.',
+ resumeLastSessionDesc:
+ 'Продолжайте с того места, где остановились. Выключите, чтобы всегда начинать с нового чата.',
product: 'Продукт',
productDesc: 'Дружелюбная активность инструментов с краткими сводками.',
technical: 'Технический',
diff --git a/apps/desktop/src/plugins/hermes-bots/bot-row.tsx b/apps/desktop/src/plugins/hermes-bots/bot-row.tsx
index a89ef201693..48f60acc4d5 100644
--- a/apps/desktop/src/plugins/hermes-bots/bot-row.tsx
+++ b/apps/desktop/src/plugins/hermes-bots/bot-row.tsx
@@ -310,9 +310,7 @@ export function BotRow({ bot, onDelete, onEdit, onGroup, onNewSection, showHandl
<ContextMenu>
<ContextMenuTrigger asChild>{row}</ContextMenuTrigger>
<ContextMenuContent>
- <ContextMenuItem onSelect={() => void openRosterBot(bot)}>
- {b.bot.openBotChat}
- </ContextMenuItem>
+ <ContextMenuItem onSelect={() => void openRosterBot(bot)}>{b.bot.openBotChat}</ContextMenuItem>
<ContextMenuSeparator />
<ContextMenuItem
onSelect={() => {
diff --git a/apps/desktop/src/plugins/hermes-bots/i18n.ts b/apps/desktop/src/plugins/hermes-bots/i18n.ts
index 477dbef0931..d0bd53e29eb 100644
--- a/apps/desktop/src/plugins/hermes-bots/i18n.ts
+++ b/apps/desktop/src/plugins/hermes-bots/i18n.ts
@@ -540,7 +540,9 @@ const ja: BotsMessages = {
newSectionEllipsis: '新しいセクション…',
removeFromSection: 'セクションから外す',
deleted: (name, count) =>
- count === 0 ? `「${name}」を削除しました` : `「${name}」を削除しました — ${count} 件のボットを未分類に移動しました`,
+ count === 0
+ ? `「${name}」を削除しました`
+ : `「${name}」を削除しました — ${count} 件のボットを未分類に移動しました`,
undo: '元に戻す'
},
bot: {
@@ -753,8 +755,7 @@ const zh: BotsMessages = {
moveTo: '移动到分区',
newSectionEllipsis: '新建分区…',
removeFromSection: '移出分区',
- deleted: (name, count) =>
- count === 0 ? `已删除“${name}”` : `已删除“${name}” — ${count} 个机器人已移至未分类`,
+ deleted: (name, count) => (count === 0 ? `已删除“${name}”` : `已删除“${name}” — ${count} 个机器人已移至未分类`),
undo: '撤销'
},
bot: {
@@ -967,8 +968,7 @@ const zhHant: BotsMessages = {
moveTo: '移動到分區',
newSectionEllipsis: '新增分區…',
removeFromSection: '移出分區',
- deleted: (name, count) =>
- count === 0 ? `已刪除「${name}」` : `已刪除「${name}」— ${count} 個機器人已移至未分類`,
+ deleted: (name, count) => (count === 0 ? `已刪除「${name}」` : `已刪除「${name}」— ${count} 個機器人已移至未分類`),
undo: '復原'
},
bot: {
diff --git a/apps/desktop/src/plugins/hermes-bots/roster-actions.ts b/apps/desktop/src/plugins/hermes-bots/roster-actions.ts
index 8004b121539..29f2ce81d2f 100644
--- a/apps/desktop/src/plugins/hermes-bots/roster-actions.ts
+++ b/apps/desktop/src/plugins/hermes-bots/roster-actions.ts
@@ -165,7 +165,9 @@ function focusExistingBotTab(bot: RosterRow): null | { registryId: string; store
try {
const focused = host.focusOpenWorkspaceSession(botWorkspaceOwnerKey(bot), isStaleTile, canonicalIds)
- return typeof focused === 'string' && focused ? { registryId: String(canonical!.id), storedSessionId: focused } : null
+ return typeof focused === 'string' && focused
+ ? { registryId: String(canonical!.id), storedSessionId: focused }
+ : null
} catch {
return null
}
diff --git a/apps/desktop/src/plugins/hermes-bots/roster-pane.tsx b/apps/desktop/src/plugins/hermes-bots/roster-pane.tsx
index b87c1062ef9..8d82d7dd366 100644
--- a/apps/desktop/src/plugins/hermes-bots/roster-pane.tsx
+++ b/apps/desktop/src/plugins/hermes-bots/roster-pane.tsx
@@ -626,7 +626,9 @@ export function BotsPane() {
return (
<SectionDropZone
- isSource={Boolean(dragging) && block.rows.some(row => row.kind !== 'group' && botRosterKey(row.bot) === dragging)}
+ isSource={
+ Boolean(dragging) && block.rows.some(row => row.kind !== 'group' && botRosterKey(row.bot) === dragging)
+ }
key={key}
nested={nested}
onDropBot={rosterKey => {
@@ -683,9 +685,7 @@ export function BotsPane() {
option={section.option}
/>
{collapsed ? null : (
- <div className="grid min-w-0 gap-0.5">
- {renderUserSections(section.rows, `${section.id}:`)}
- </div>
+ <div className="grid min-w-0 gap-0.5">{renderUserSections(section.rows, `${section.id}:`)}</div>
)}
</div>
)
diff --git a/apps/desktop/src/store/session-pin-sync.ts b/apps/desktop/src/store/session-pin-sync.ts
index 95e71acca38..5ca8c694b5e 100644
--- a/apps/desktop/src/store/session-pin-sync.ts
+++ b/apps/desktop/src/store/session-pin-sync.ts
@@ -27,13 +27,7 @@ import { setSessionPinnedRemote } from '@/hermes'
import { onConnectionScopeChange } from '@/lib/connection-scoped'
import { $pinnedSessionIds, pinSession, unpinSession } from '@/store/layout'
import { $activeGatewayProfile, normalizeProfileKey } from '@/store/profile'
-import {
- $cronSessions,
- $messagingSessions,
- $sessions,
- sessionMatchesStoredId,
- sessionPinId
-} from '@/store/session'
+import { $cronSessions, $messagingSessions, $sessions, sessionMatchesStoredId, sessionPinId } from '@/store/session'
import type { SessionInfo } from '@/types/hermes'
// pin ids we've successfully PATCHed pinned=true this session.
diff --git a/apps/desktop/src/store/session-states.test.ts b/apps/desktop/src/store/session-states.test.ts
index 9c026b223d9..a5f887cbb05 100644
--- a/apps/desktop/src/store/session-states.test.ts
+++ b/apps/desktop/src/store/session-states.test.ts
@@ -335,9 +335,7 @@ describe('SessionTile workspace scope', () => {
// The tile was opened when seg-2 was the tip; the conversation has since
// rotated to seg-3 (projected row carries the full chain). Opening the
// new tip must front that tile, not open the same chat twice.
- setSessions([
- { _lineage_ids: ['seg-1', 'seg-2', 'seg-3'], _lineage_root_id: 'seg-1', id: 'seg-3' } as never
- ])
+ setSessions([{ _lineage_ids: ['seg-1', 'seg-2', 'seg-3'], _lineage_root_id: 'seg-1', id: 'seg-3' } as never])
openSessionTile('seg-2')
expect(focusOpenSession('seg-3')).toBe('tile')
diff --git a/apps/desktop/src/store/session.test.ts b/apps/desktop/src/store/session.test.ts
index 0a8de8e2203..95e436c4800 100644
--- a/apps/desktop/src/store/session.test.ts
+++ b/apps/desktop/src/store/session.test.ts
@@ -372,9 +372,7 @@ describe('lineageAliases across a deep compression chain', () => {
it('aliases every segment, intermediates included', () => {
// The projected row carries the full chain: a tile or route can hold a
// MIDDLE segment's id from when IT was the tip.
- const rows = [
- session({ _lineage_ids: ['root', 'mid', 'tip'], _lineage_root_id: 'root', id: 'tip' })
- ]
+ const rows = [session({ _lineage_ids: ['root', 'mid', 'tip'], _lineage_root_id: 'root', id: 'tip' })]
expect(lineageAliases('mid', rows).sort()).toEqual(['mid', 'root', 'tip'])
expect(lineageAliases('tip', rows).sort()).toEqual(['mid', 'root', 'tip'])
diff --git a/apps/desktop/src/store/windows.ts b/apps/desktop/src/store/windows.ts
index 77befcdb39b..bf24e6f0fb4 100644
--- a/apps/desktop/src/store/windows.ts
+++ b/apps/desktop/src/store/windows.ts
@@ -205,6 +205,7 @@ export async function openSessionInNewWindow(sessionId: string, opts?: { watch?:
import('./profile'),
import('./session')
])
+
const profile = normalizeProfileKey(rememberedSessionProfile($sessions.get(), sessionId, $activeGatewayProfile.get()))
await runWindowOpen(