The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fmt(js): `npm run fix` on merge (#110837)
hermes-seaeye[bot]916ef1e02932
diff --git a/apps/desktop/src/components/assistant-ui/tool/skill-activity.ts b/apps/desktop/src/components/assistant-ui/tool/skill-activity.tsindex 88d6502753b..f5a3f5111b7 100644--- a/apps/desktop/src/components/assistant-ui/tool/skill-activity.ts+++ b/apps/desktop/src/components/assistant-ui/tool/skill-activity.ts@@ -22,9 +22,10 @@ export function skillActivityTitle(part: SkillCall, live = true): string | undefconst args = parseMaybeObject(part.args)const result = parseMaybeObject(part.result)- const failed = result.success !== true && result.ok !== true && Boolean(- part.isError || extractToolErrorMessage(part.result) || result.success === false || result.ok === false- )+ const failed =+ result.success !== true &&+ result.ok !== true &&+ Boolean(part.isError || extractToolErrorMessage(part.result) || result.success === false || result.ok === false)const pending = live && part.result === undefined && part.completedAt === undefinedconst missing = !pending && part.result === undefineddiff --git a/apps/desktop/src/lib/chat-messages/competing-contracts.test.ts b/apps/desktop/src/lib/chat-messages/competing-contracts.test.tsindex e7eb7d2c2ed..9bd3e526189 100644--- a/apps/desktop/src/lib/chat-messages/competing-contracts.test.ts+++ b/apps/desktop/src/lib/chat-messages/competing-contracts.test.ts@@ -15,11 +15,20 @@ describe('D1 competing implementation contracts', () => {expect(parts).toHaveLength(2)})it('honors explicit successful skill results over stale envelope errors', () => {- const part = { type: 'tool-call' as const, toolName: 'skill_view', args: { name: 'loaded-skill' }, result: { success: true }, isError: true }+ const part = {+ type: 'tool-call' as const,+ toolName: 'skill_view',+ args: { name: 'loaded-skill' },+ result: { success: true },+ isError: true+ }expect(summarizeToolRun([part], false)).toContain('Loaded skill')})it('does not report a failed skill as loaded in the settled summary', () => {- const summary = summarizeToolRun([{ toolName: 'skill_view', args: { name: 'missing-skill' }, result: { error: 'missing' }, isError: true }], false)+ const summary = summarizeToolRun(+ [{ toolName: 'skill_view', args: { name: 'missing-skill' }, result: { error: 'missing' }, isError: true }],+ false+ )expect(summary.toLowerCase()).toContain('failed')expect(summary).not.toContain('Loaded')})diff --git a/apps/desktop/src/lib/chat-messages/d1-consumers.test.ts b/apps/desktop/src/lib/chat-messages/d1-consumers.test.tsindex 3135ab534b0..a1c7862671f 100644--- a/apps/desktop/src/lib/chat-messages/d1-consumers.test.ts+++ b/apps/desktop/src/lib/chat-messages/d1-consumers.test.ts@@ -7,11 +7,22 @@ import { sealOpenToolParts, upsertToolPart } from '@/lib/chat-messages'import { toRuntimeMessage } from '@/lib/chat-runtime'import { todosFromMessageContent } from '@/lib/todos'-const normalize = (parts: ReturnType<typeof upsertToolPart>) => fromThreadMessageLike(toRuntimeMessage({ id: 'd1', role: 'assistant', parts }), 'd1', getAutoStatus(false, false, false, false, undefined)).content+const normalize = (parts: ReturnType<typeof upsertToolPart>) =>+ fromThreadMessageLike(+ toRuntimeMessage({ id: 'd1', role: 'assistant', parts }),+ 'd1',+ getAutoStatus(false, false, false, false, undefined)+ ).contentdescribe('D1 settlement and presentation consumers', () => {it('seals unknown outcomes without fabricating success and remains idempotent', () => {- const messages = [{ id: 'd1', role: 'assistant' as const, parts: upsertToolPart([], { name: 'terminal', tool_id: 'missing' }, 'running', 1) }]+ const messages = [+ {+ id: 'd1',+ role: 'assistant' as const,+ parts: upsertToolPart([], { name: 'terminal', tool_id: 'missing' }, 'running', 1)+ }+ ]const sealed = sealOpenToolParts(messages)const part = sealed[0].parts[0]expect('result' in part ? part.result : undefined).toBeUndefined()@@ -20,7 +31,18 @@ describe('D1 settlement and presentation consumers', () => {expect(sealOpenToolParts(sealed)).toBe(sealed)})it('keeps side-channel diffs in the changed-files consumer after normalization', () => {- const parts = upsertToolPart([], { name: 'patch', tool_id: 'patch', args: { path: '/tmp/a.ts' }, result: 'ok', inline_diff: '--- a/a.ts\n+++ b/a.ts\n@@ -1 +1 @@\n-old\n+new' }, 'complete', 2)+ const parts = upsertToolPart(+ [],+ {+ name: 'patch',+ tool_id: 'patch',+ args: { path: '/tmp/a.ts' },+ result: 'ok',+ inline_diff: '--- a/a.ts\n+++ b/a.ts\n@@ -1 +1 @@\n-old\n+new'+ },+ 'complete',+ 2+ )expect(deriveChangedFiles(normalize(parts))).toEqual([{ path: '/tmp/a.ts', name: 'a.ts', added: 1, removed: 1 }])})it('keeps envelope-only todo completion and explicit clearing after normalization', () => {diff --git a/apps/desktop/src/lib/chat-messages/tool-parts.ts b/apps/desktop/src/lib/chat-messages/tool-parts.tsindex 2ffb90642bb..228f96ef98e 100644--- a/apps/desktop/src/lib/chat-messages/tool-parts.ts+++ b/apps/desktop/src/lib/chat-messages/tool-parts.ts@@ -193,7 +193,14 @@ function findToolPartIndex() {// Interactive request IDs differ from provider call IDs and correlate by identifying arguments.const requestBacked = name === 'clarify' || name === 'setup_mcp'- if (!requestBacked && stableId && phase === 'running' && part.toolCallId && !part.toolCallId.startsWith('live-tool:')) {++ if (+ !requestBacked &&+ stableId &&+ phase === 'running' &&+ part.toolCallId &&+ !part.toolCallId.startsWith('live-tool:')+ ) {continue}