From 4f6b9c096ae5bac1eb3996f5c34d7fe8627c996f Mon Sep 17 00:00:00 2001 From: root <953994191@qq.com> Date: Fri, 1 May 2026 13:13:15 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E6=9B=B4=E8=AF=A6?= =?UTF-8?q?=E7=BB=86=E7=9A=84chunk=E6=97=A5=E5=BF=97=EF=BC=8C=E5=88=86?= =?UTF-8?q?=E6=9E=90=E6=B5=B7=E9=87=8Fchunk=E7=9A=84=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app/agent/agent_service.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/backend/app/agent/agent_service.py b/backend/app/agent/agent_service.py index e5127b9..8984536 100644 --- a/backend/app/agent/agent_service.py +++ b/backend/app/agent/agent_service.py @@ -177,6 +177,14 @@ class AIAgentService: message_chunk, metadata = chunk["data"] node_name = metadata.get("langgraph_node", "unknown") info(f"📨 处理消息chunk, node: {node_name}") + # 详细记录消息内容,看看这些 chunk 到底是什么 + if hasattr(message_chunk, "content"): + content_preview = str(message_chunk.content)[:200] + info(f"📄 消息内容预览 ({len(content_preview)} chars): {repr(content_preview)}") + if hasattr(message_chunk, "type"): + info(f"📋 消息类型: {message_chunk.type}") + if hasattr(message_chunk, "tool_calls"): + info(f"🔧 包含工具调用: {message_chunk.tool_calls}") # 检测节点变化,发送节点开始事件 if node_name != current_node: