allow to ask for remote host profiles and save token on first connection for later use

This commit is contained in:
2026-05-01 19:07:04 +02:00
parent 2f982fa714
commit 5ff340a6d3
11 changed files with 216 additions and 33 deletions
+5 -2
View File
@@ -54,7 +54,7 @@ class BrowserCLI:
if self._browser is not None:
return []
targets = active_browser_targets()
if len(targets) <= 1:
if len(targets) <= 1 and not any(target.remote for target in targets):
return []
return targets
@@ -62,7 +62,10 @@ class BrowserCLI:
results = []
for target in self._multi_browser_targets():
try:
data = send_command(command, args, profile=target.profile)
if target.remote:
data = send_command(command, args, profile=target.profile, remote=target.remote, token=target.token)
else:
data = send_command(command, args, profile=target.profile)
except (BrowserNotConnected, RuntimeError):
continue
results.append((target, data))