mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-01 01:51:44 +00:00
fix(browser): avoid bogus Chrome launch fallback
Detect an actual Chrome/Chromium executable before printing a manual CDP launch command, including common WSL-mounted Windows browser paths, so /browser connect does not suggest google-chrome when it is unavailable.
This commit is contained in:
parent
f10a3df632
commit
69ff114ee2
5 changed files with 69 additions and 24 deletions
|
|
@ -4762,10 +4762,18 @@ def _is_default_local_cdp(parsed) -> bool:
|
|||
def _browser_connect_error(url: str, port: int) -> str:
|
||||
from hermes_cli.browser_connect import manual_chrome_debug_command
|
||||
|
||||
command = manual_chrome_debug_command(port)
|
||||
if not command:
|
||||
return (
|
||||
f"Chrome is not reachable at {url}. "
|
||||
"No Chrome/Chromium executable was found in this environment; "
|
||||
f"install one or start Chrome with --remote-debugging-port={port}, then retry /browser connect."
|
||||
)
|
||||
|
||||
return (
|
||||
f"Chrome is not reachable at {url}. "
|
||||
"Start Chrome with remote debugging, then retry /browser connect:\n"
|
||||
f"{manual_chrome_debug_command(port)}"
|
||||
f"{command}"
|
||||
)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue