From de8a7798c3f753d0beb93e85bd81f6b60942f69d Mon Sep 17 00:00:00 2001 From: Zac Gaetano Date: Sun, 5 Apr 2026 11:45:43 -0400 Subject: [PATCH] fix: remove assistant event handler to prevent duplicate messages --- frontend/src/App.jsx | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/frontend/src/App.jsx b/frontend/src/App.jsx index b134944..6f2d0b2 100644 --- a/frontend/src/App.jsx +++ b/frontend/src/App.jsx @@ -171,20 +171,9 @@ const App = () => { } // Claude stream-json events - if (type === 'assistant') { - // Full assistant message (not streaming) - const content = data.message?.content; - let text = ''; - if (Array.isArray(content)) { - text = content.filter(b => b.type === 'text').map(b => b.text).join(''); - } else if (typeof content === 'string') { - text = content; - } - if (text) { - pendingAssistantRef.current += text; - upsertStreamingMessage(pendingAssistantRef.current, false); - } - } + // NOTE: We intentionally skip the 'assistant' event type. + // It contains the full message text that was ALREADY streamed via + // content_block_delta events, so handling it would create a duplicate bubble. if (type === 'content_block_delta') { const delta = data.delta;