Give playwright access to CodeBlock (#588)

This commit is contained in:
Kerem Yilmaz
2024-07-11 09:35:07 -07:00
committed by GitHub
parent 48ba239080
commit 87d6e71768
2 changed files with 30 additions and 2 deletions

View File

@@ -85,6 +85,11 @@ class BrowserManager:
self.pages[workflow_run.workflow_run_id] = browser_state
return browser_state
async def get_for_workflow_run(self, workflow_run_id: str) -> BrowserState | None:
if workflow_run_id in self.pages:
return self.pages[workflow_run_id]
return None
def set_video_artifact_for_task(self, task: Task, artifact_id: str) -> None:
if task.workflow_run_id and task.workflow_run_id in self.pages:
if self.pages[task.workflow_run_id].browser_artifacts.video_artifact_id: