JiuwenSwarm is an intelligent AI Agent built on openJiuwen. It extends the powerful capabilities of large language models directly to your fingertips through various communication apps you use daily.
Python
fix: 修复 web 流式消息不显示的问题
dourand4889de5d2c5
diff --git a/jiuwenclaw/agentserver/deep_agent/interface_deep.py b/jiuwenclaw/agentserver/deep_agent/interface_deep.pyindex 1228a37c5d..125422c885 100644--- a/jiuwenclaw/agentserver/deep_agent/interface_deep.py+++ b/jiuwenclaw/agentserver/deep_agent/interface_deep.py@@ -2585,30 +2585,17 @@ class JiuWenClawDeepAdapter:chunk_type = chunk.typeif chunk_type == "llm_reasoning":- if accumulated_text:- yield AgentResponseChunk(- request_id=rid,- channel_id=cid,- payload={"event_type": "chat.delta", "content": accumulated_text},- is_complete=False,- )- accumulated_text = ""content = ((chunk.payload.get("content", "") or chunk.payload.get("output", ""))if isinstance(chunk.payload, dict)else str(chunk.payload))- if content:- accumulated_reasoning += content- if len(accumulated_reasoning) >= _STREAM_CHAR_THRESHOLD:- yield AgentResponseChunk(- request_id=rid,- channel_id=cid,- payload={"event_type": "chat.reasoning", "content": accumulated_reasoning},- is_complete=False,- )- accumulated_reasoning = ""- continue+ yield AgentResponseChunk(+ request_id=rid,+ channel_id=cid,+ payload={"event_type": "chat.delta", "content": content},+ is_complete=False,+ )if chunk_type == "llm_output":has_streamed_content = True