This commit is contained in:
@@ -50,6 +50,9 @@ def create_execution_factories(
|
||||
timeline=timeline,
|
||||
planner=_host_agent_planner(resolved_host_agent_config),
|
||||
planner_config=_host_agent_planner_config(),
|
||||
device_platform_provider=lambda device_id: _device_platform(
|
||||
manager, device_id
|
||||
),
|
||||
)
|
||||
|
||||
def create_workflow_runner() -> WorkflowRunner:
|
||||
@@ -103,3 +106,15 @@ def _host_agent_planner(
|
||||
client=CloudProxyToolCallingClient(resolved_config),
|
||||
config=planner_config,
|
||||
)
|
||||
|
||||
|
||||
def _device_platform(manager: DeviceManager, device_id: str) -> str | None:
|
||||
for device in manager.list_devices():
|
||||
if device.id != device_id:
|
||||
continue
|
||||
if device.driver_type == "wda":
|
||||
return "ios"
|
||||
if device.driver_type == "uiautomator2":
|
||||
return "android"
|
||||
return None
|
||||
return None
|
||||
|
||||
Reference in New Issue
Block a user