fix task v2 download issue (#3220)

This commit is contained in:
LawyZheng
2025-08-18 14:24:18 +08:00
committed by GitHub
parent 35313508d0
commit 4617d2b5ca
10 changed files with 79 additions and 52 deletions

View File

@@ -131,7 +131,9 @@ def set_download_file_listener(browser_context: BrowserContext, **kwargs: Any) -
def initialize_download_dir() -> str:
context = ensure_context()
return get_download_dir(context.workflow_run_id, context.task_id)
return get_download_dir(
context.run_id if context and context.run_id else context.workflow_run_id or context.task_id
)
class BrowserContextCreator(Protocol):