From a3ecebd2aa0c801c0b8e6c08ab810693fccdc5f7 Mon Sep 17 00:00:00 2001 From: Soulter <37870767+Soulter@users.noreply.github.com> Date: Tue, 16 Dec 2025 19:35:41 +0800 Subject: [PATCH] fix: correct text accumulation logic in webchat (#4066) --- astrbot/dashboard/routes/chat.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/astrbot/dashboard/routes/chat.py b/astrbot/dashboard/routes/chat.py index cfb750803..f2439c058 100644 --- a/astrbot/dashboard/routes/chat.py +++ b/astrbot/dashboard/routes/chat.py @@ -338,8 +338,10 @@ class ChatRoute(Route): chain_type = result.get("chain_type", "normal") if chain_type == "reasoning": accumulated_reasoning += result_text - else: + elif streaming: accumulated_text += result_text + else: + accumulated_text = result_text elif msg_type == "image": filename = result_text.replace("[IMAGE]", "") part = await self._create_attachment_from_file(