Skip to content

Commit 2717d3a

Browse files
committed
feat: add download_agent_history function to make download AgentHistory
1 parent 2eb8949 commit 2717d3a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/utils/utils.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,3 +200,11 @@ async def capture_screenshot(browser_context):
200200
return encoded
201201
except Exception as e:
202202
return None
203+
204+
def download_agent_history(save_agent_history_path):
205+
history_file = os.path.join(save_agent_history_path, "AgentHistory.json")
206+
history_file = os.path.abspath(history_file) # Convert to absolute path
207+
if os.path.exists(history_file):
208+
return history_file
209+
else:
210+
return None

0 commit comments

Comments
 (0)