From a7a696ba59e0838a81351859abb39fb8484d4973 Mon Sep 17 00:00:00 2001 From: "hermes-seaeye[bot]" <307254004+hermes-seaeye[bot]@users.noreply.github.com> Date: Fri, 24 Jul 2026 01:58:39 +0000 Subject: [PATCH] fmt(js): `npm run fix` on merge (#70455) Co-authored-by: github-actions[bot] --- .../src/app/session/hooks/use-message-stream/gateway-event.ts | 3 +++ .../hooks/use-message-stream/moa-reference-event.test.tsx | 1 + ui-tui/src/__tests__/messageLine.test.ts | 1 + 3 files changed, 5 insertions(+) diff --git a/apps/desktop/src/app/session/hooks/use-message-stream/gateway-event.ts b/apps/desktop/src/app/session/hooks/use-message-stream/gateway-event.ts index dcb0ddaa2..32f8eb173 100644 --- a/apps/desktop/src/app/session/hooks/use-message-stream/gateway-event.ts +++ b/apps/desktop/src/app/session/hooks/use-message-stream/gateway-event.ts @@ -527,6 +527,7 @@ export function useGatewayEventHandler(deps: GatewayEventDeps) { const header = idx && cnt ? `◇ Reference ${idx}/${cnt} — ${label}` : `◇ Reference — ${label}` const body = coerceThinkingText(payload?.text) const text = `${header}\n${body}\n\n` + if (idx === undefined || idx <= 1) { // First reference: clear any stale reasoning left over from // before this turn's references start, same as before. @@ -564,9 +565,11 @@ export function useGatewayEventHandler(deps: GatewayEventDeps) { // block, so the progress trail is self-cleaning. if (sessionId && typeof payload?.refs_done === 'number' && typeof payload?.refs_total === 'number') { const label = coerceGatewayText(payload?.label) + const line = label ? `◇ MoA refs ${payload.refs_done}/${payload.refs_total} — ${label}\n` : `◇ MoA refs ${payload.refs_done}/${payload.refs_total}\n` + appendReasoningDelta(sessionId, line, payload.refs_done <= 1) flushQueuedDeltas(sessionId) } diff --git a/apps/desktop/src/app/session/hooks/use-message-stream/moa-reference-event.test.tsx b/apps/desktop/src/app/session/hooks/use-message-stream/moa-reference-event.test.tsx index b8237e09d..ce3afeef6 100644 --- a/apps/desktop/src/app/session/hooks/use-message-stream/moa-reference-event.test.tsx +++ b/apps/desktop/src/app/session/hooks/use-message-stream/moa-reference-event.test.tsx @@ -102,6 +102,7 @@ describe('useMessageStream moa.reference accumulation (#64658)', () => { emit('moa.reference', { count: 3, index: 3, label: 'model-c', text: 'advice-c' }) const text = reasoningText() + const orderOk = text.indexOf('advice-a') < text.indexOf('advice-b') && text.indexOf('advice-b') < text.indexOf('advice-c') diff --git a/ui-tui/src/__tests__/messageLine.test.ts b/ui-tui/src/__tests__/messageLine.test.ts index 75e5d27b6..9ca72e371 100644 --- a/ui-tui/src/__tests__/messageLine.test.ts +++ b/ui-tui/src/__tests__/messageLine.test.ts @@ -38,6 +38,7 @@ describe('shouldShowThinkingTrail', () => { thinking: '◇ Reference 1/2 — model-a\nadvice-a', isMoaReference: true } as const + expect(shouldShowThinkingTrail(msg, 'hidden', 'hidden', 'hidden')).toBe(true) }) })