make it easyer to connect to a remove browser allow it with --browser ip alias too
Testing / test (push) Failing after 13m59s

This commit is contained in:
2026-05-01 19:55:02 +02:00
parent f836844791
commit 647867d05e
7 changed files with 196 additions and 33 deletions
+6 -2
View File
@@ -1,5 +1,5 @@
import click
from browser_cli.client import BrowserNotConnected, active_browser_targets, send_command
from browser_cli.client import BrowserNotConnected, active_browser_targets, remote_browser_targets, send_command
from rich.console import Console
from rich.table import Table
@@ -30,7 +30,11 @@ def _multi_browser_targets():
root = click.get_current_context().find_root()
if root.obj.get("browser_explicit"):
return []
targets = active_browser_targets()
remote = root.obj.get("remote")
if remote:
targets = remote_browser_targets(remote, root.obj.get("token"))
else:
targets = active_browser_targets()
if len(targets) <= 1 and not any(target.remote for target in targets):
return []
return targets
+6 -2
View File
@@ -1,5 +1,5 @@
import click
from browser_cli.client import active_browser_targets, send_command, BrowserNotConnected
from browser_cli.client import active_browser_targets, remote_browser_targets, send_command, BrowserNotConnected
from rich.console import Console
console = Console()
@@ -29,7 +29,11 @@ def _multi_browser_targets():
root = click.get_current_context().find_root()
if root.obj.get("browser_explicit"):
return []
targets = active_browser_targets()
remote = root.obj.get("remote")
if remote:
targets = remote_browser_targets(remote, root.obj.get("token"))
else:
targets = active_browser_targets()
if len(targets) <= 1 and not any(target.remote for target in targets):
return []
return targets
+6 -2
View File
@@ -1,6 +1,6 @@
import base64
import click
from browser_cli.client import BrowserNotConnected, active_browser_targets, send_command
from browser_cli.client import BrowserNotConnected, active_browser_targets, remote_browser_targets, send_command
from rich.console import Console
from rich.table import Table
@@ -31,7 +31,11 @@ def _multi_browser_targets():
root = click.get_current_context().find_root()
if root.obj.get("browser_explicit"):
return []
targets = active_browser_targets()
remote = root.obj.get("remote")
if remote:
targets = remote_browser_targets(remote, root.obj.get("token"))
else:
targets = active_browser_targets()
if len(targets) <= 1 and not any(target.remote for target in targets):
return []
return targets
+6 -2
View File
@@ -1,5 +1,5 @@
import click
from browser_cli.client import BrowserNotConnected, active_browser_targets, send_command
from browser_cli.client import BrowserNotConnected, active_browser_targets, remote_browser_targets, send_command
from rich.console import Console
from rich.table import Table
@@ -30,7 +30,11 @@ def _multi_browser_targets():
root = click.get_current_context().find_root()
if root.obj.get("browser_explicit"):
return []
targets = active_browser_targets()
remote = root.obj.get("remote")
if remote:
targets = remote_browser_targets(remote, root.obj.get("token"))
else:
targets = active_browser_targets()
if len(targets) <= 1 and not any(target.remote for target in targets):
return []
return targets