修复历史记录查看接口

This commit is contained in:
zcr
2026-03-23 17:40:47 +08:00
parent 7c23d16ea6
commit 0ec38e2623
2 changed files with 4 additions and 2 deletions

View File

@@ -373,7 +373,9 @@ async def get_chat_history(thread_id: str):
"""
config = {"configurable": {"thread_id": thread_id}, }
history_data = []
main_agent = build_main_agent(False)
workspace_dir = os.path.join(PROJECT_ROOT, f"agent_workspace/{thread_id}")
main_agent = build_main_agent(False, workspace_dir, enable_thinking=False)
async for state in main_agent.aget_state_history(config):
msg_content = "Initial"
if state.values and "messages" in state.values: