remove the --profile flag on windows open and add opening a new window with a url

This commit is contained in:
2026-04-10 13:06:53 +02:00
parent 61b774a7a4
commit 362b53a384
8 changed files with 40 additions and 14 deletions
+4 -4
View File
@@ -100,9 +100,9 @@ def windows_close(window_id):
@windows_group.command("open")
@click.option("--profile", default=None, help="Open with a specific Chrome profile name")
def windows_open(profile):
@click.argument("url", required=False)
def windows_open(url):
"""Open a new browser window."""
result = _handle("windows.open", {"profile": profile})
result = _handle("windows.open", {"url": url})
wid = result.get("id") if isinstance(result, dict) else result
console.print(f"[green]Opened new window[/green] (id: {wid})" + (f" with profile '{profile}'" if profile else ""))
console.print(f"[green]Opened new window[/green] (id: {wid})" + (f" with {url}" if url else ""))