Skyvern/skyvern/core/script_generations/run_initializer.py
Shuchang Zheng b9b7591079
Some checks are pending
Run tests and pre-commit / Run tests and pre-commit hooks (push) Waiting to run
Run tests and pre-commit / Frontend Lint and Build (push) Waiting to run
Publish Fern Docs / run (push) Waiting to run
script generation improvement (#3216)
2025-08-16 17:48:10 -07:00

11 lines
525 B
Python

from typing import Any
from skyvern.core.script_generations.script_run_context_manager import script_run_context_manager
from skyvern.core.script_generations.skyvern_page import RunContext, SkyvernPage
async def setup(parameters: dict[str, Any], run_id: str | None = None) -> tuple[SkyvernPage, RunContext]:
skyvern_page = await SkyvernPage.create()
run_context = RunContext(parameters=parameters, page=skyvern_page)
script_run_context_manager.set_run_context(run_context)
return skyvern_page, run_context