From 1c8a9491d8b29e9daaad7bc6e5c8bca572ba89bf Mon Sep 17 00:00:00 2001 From: majiayu000 <1835304752@qq.com> Date: Fri, 26 Dec 2025 19:11:22 +0800 Subject: [PATCH] fix(web): use isFirstMessage instead of hardcoded false for invalid data MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The onData callback's second parameter is isFirstMessage, not isError. When encountering invalid response data (null or non-object), we should preserve the current isFirstMessage state rather than hardcoding false. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- web/service/base.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/service/base.ts b/web/service/base.ts index 0d3d15c77cc..2ab115f96c4 100644 --- a/web/service/base.ts +++ b/web/service/base.ts @@ -218,7 +218,7 @@ export const handleStream = ( return } if (!bufferObj || typeof bufferObj !== 'object') { - onData('', false, { + onData('', isFirstMessage, { conversationId: undefined, messageId: '', errorMessage: 'Invalid response data',