fix(ui): stabilize long reply hold during streaming

This commit is contained in:
Shantur Rathore
2026-04-19 19:56:48 +01:00
parent b00aa7ef84
commit 623a09fd7e
3 changed files with 47 additions and 44 deletions

View File

@@ -397,7 +397,8 @@ function handleMessageUpdate(instanceId: string, event: MessageUpdateEvent | Mes
const role: MessageRole = info.role === "user" ? "user" : "assistant"
const hasError = Boolean((info as any).error)
const status: MessageStatus = hasError ? "error" : "complete"
const hasEnded = typeof timeInfo.end === "number" && timeInfo.end > 0
const status: MessageStatus = hasError ? "error" : hasEnded ? "complete" : "streaming"
let record = store.getMessage(messageId)
if (!record) {