添加长期存储,流式检查
Some checks failed
构建并部署 AI Agent 服务 / deploy (push) Has been cancelled

This commit is contained in:
2026-04-17 01:26:05 +08:00
parent 602d551fd1
commit 404efde282
37 changed files with 794 additions and 2095 deletions

View File

@@ -25,10 +25,10 @@ def log_state_change(node_name: str, state: dict, prefix: str = "进入"):
if last_msg:
# 兼容 dict 和对象两种格式
if isinstance(last_msg, dict):
content_preview = str(last_msg.get("content", ""))[:100].replace("\n", " ")
content_preview = str(last_msg.get("content", ""))[:10].replace("\n", " ")
msg_type = last_msg.get("type", "unknown")
else:
content_preview = str(last_msg.content)[:100].replace("\n", " ")
content_preview = str(last_msg.content)[:10].replace("\n", " ")
msg_type = getattr(last_msg, 'type', 'unknown')
last_info = f"{msg_type.upper()}: {content_preview}"
info(f"🔄 [{node_name}] {prefix} | 消息数:{msg_count} | 最后一条:{last_info}")