feat: add download_agent_history function to make download AgentHistory

This commit is contained in:
meshkatshb
2025-01-13 22:38:51 +03:30
parent 2eb894993e
commit 2717d3a21c

View File

@@ -200,3 +200,11 @@ async def capture_screenshot(browser_context):
return encoded
except Exception as e:
return None
def download_agent_history(save_agent_history_path):
history_file = os.path.join(save_agent_history_path, "AgentHistory.json")
history_file = os.path.abspath(history_file) # Convert to absolute path
if os.path.exists(history_file):
return history_file
else:
return None