fix: add /browser to COMMAND_REGISTRY so it shows in help and autocomplete
The /browser command handler existed in cli.py but was never added to COMMAND_REGISTRY after the centralized command registry refactor. This meant: - /browser didn't appear in /help - No tab-completion or subcommand suggestions - Dispatch used _base_word fallback instead of canonical resolution Added CommandDef with connect/disconnect/status subcommands and switched dispatch to use canonical instead of _base_word.
This commit is contained in:
parent
588962d24e
commit
a71e3f4d98
2 changed files with 4 additions and 1 deletions
2
cli.py
2
cli.py
|
|
@ -3560,7 +3560,7 @@ class HermesCLI:
|
||||||
elif canonical == "reload-mcp":
|
elif canonical == "reload-mcp":
|
||||||
with self._busy_command(self._slow_command_status(cmd_original)):
|
with self._busy_command(self._slow_command_status(cmd_original)):
|
||||||
self._reload_mcp()
|
self._reload_mcp()
|
||||||
elif _base_word == "browser":
|
elif canonical == "browser":
|
||||||
self._handle_browser_command(cmd_original)
|
self._handle_browser_command(cmd_original)
|
||||||
elif canonical == "plugins":
|
elif canonical == "plugins":
|
||||||
try:
|
try:
|
||||||
|
|
|
||||||
|
|
@ -104,6 +104,9 @@ COMMAND_REGISTRY: list[CommandDef] = [
|
||||||
subcommands=("list", "add", "create", "edit", "pause", "resume", "run", "remove")),
|
subcommands=("list", "add", "create", "edit", "pause", "resume", "run", "remove")),
|
||||||
CommandDef("reload-mcp", "Reload MCP servers from config", "Tools & Skills",
|
CommandDef("reload-mcp", "Reload MCP servers from config", "Tools & Skills",
|
||||||
aliases=("reload_mcp",)),
|
aliases=("reload_mcp",)),
|
||||||
|
CommandDef("browser", "Connect browser tools to your live Chrome via CDP", "Tools & Skills",
|
||||||
|
cli_only=True, args_hint="[connect|disconnect|status]",
|
||||||
|
subcommands=("connect", "disconnect", "status")),
|
||||||
CommandDef("plugins", "List installed plugins and their status",
|
CommandDef("plugins", "List installed plugins and their status",
|
||||||
"Tools & Skills", cli_only=True),
|
"Tools & Skills", cli_only=True),
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue