Open new window

This commit is contained in:
moosecrap committed 2026-11-22 17:22:50 -08:00
1 parent 52ddc6ba9a
commit 2873da3c84
3 files changed
+38

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
import asyncio
from typing import Any, Dict
from tools.utils import ToolError
async def handle(args: Dict[str, Any], bridge: Any) -> list:
"""
Opens a new Firefox window with the specified URL.
"""
url = args.get("url")
if not url:
raise ToolError("Missing required argument: 'url'")
request_id = f"req_{asyncio.get_event_loop().time()}_{id(args)}"
await bridge.send_to_extension(request_id, "open_new_window", {"url": str(url)})
return [{"type": "text", "text": f"Opened new window with {url}."}]