fix(web): use isFirstMessage instead of hardcoded false for invalid data

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 <noreply@anthropic.com>
This commit is contained in:
majiayu000 2025-12-26 19:11:22 +08:00
parent e1854b657e
commit 1c8a9491d8
1 changed files with 1 additions and 1 deletions

View File

@ -218,7 +218,7 @@ export const handleStream = (
return
}
if (!bufferObj || typeof bufferObj !== 'object') {
onData('', false, {
onData('', isFirstMessage, {
conversationId: undefined,
messageId: '',
errorMessage: 'Invalid response data',