MCPcopy
hub / github.com/agent0ai/agent-zero / set_active

Method set_active

plugins/_browser/helpers/runtime.py:1193–1198  ·  view source on GitHub ↗
(self, browser_id: int | str | None)

Source from the content-addressed store, hash-verified

1191 raise ValueError(f"unknown action: {action}")
1192
1193 async def set_active(self, browser_id: int | str | None) -> dict[str, Any]:
1194 await self.ensure_started()
1195 resolved_id = self._resolve_browser_id(browser_id)
1196 # Explicit focus change — bypass _maybe_promote.
1197 self.last_interacted_browser_id = int(resolved_id)
1198 return await self._state(resolved_id)
1199
1200 async def state(self, browser_id: int | str | None = None) -> dict[str, Any]:
1201 await self.ensure_started()

Callers 1

_dispatch_callMethod · 0.95

Calls 3

ensure_startedMethod · 0.95
_resolve_browser_idMethod · 0.95
_stateMethod · 0.95

Tested by

no test coverage detected