fix(cli): make classic CLI /indicator command branch aware - #34133
Conversation
|
Duplicate of the |
teknium1
left a comment
There was a problem hiding this comment.
Thanks for tracing the registry-to-dispatch gap: the bug remains on current main. hermes_cli/commands.py:163 registers /indicator, while cli.py:8915-8921 goes from the /skin branch directly to /voice and ultimately to the unknown-command fallback at cli.py:9083.
Problems
- The proposed handler location is stale. Current
HermesCLIinheritsCLICommandsMixin(cli.py:3677), and the extraction boundary explicitly puts_handle_*_commandmethods inhermes_cli/cli_commands_mixin.py:1-5;/skinnow lives there athermes_cli/cli_commands_mixin.py:2250. Adding the new handler back tocli.pywould conflict with that organization.
Suggested changes
- Keep the dispatch branch in
cli.py, but place_handle_indicator_commandand its validation beside the other command handlers inhermes_cli/cli_commands_mixin.py. - Preserve the PR's dispatch and config-validation tests. The target config path is correct:
tui_gateway/server.py:10700-10712already validates these four styles and writesdisplay.tui_status_indicator.
Automated hermes-sweeper review.
| @@ -9535,6 +9547,40 @@ def _handle_skin_command(self, cmd: str): | |||
| if self._apply_tui_skin_style(): | |||
| print(" Prompt + TUI colors updated.") | |||
There was a problem hiding this comment.
Current main extracted _handle_*_command methods into hermes_cli/cli_commands_mixin.py (_handle_skin_command is now there at line 2250). Please move this handler and its local validation support into that mixin; keep only the dispatch branch in cli.py.
Summary
Fixes a classic CLI dispatch regression by binding the registered
/indicatorslash command to a dedicated execution branch within the main handler pipeline, ensuring user configuration state synchronization matches the TUI paradigm.Why
A parity gap existed within the command terminal routing framework. While
/indicatorwas actively present inside the autocomplete registries and/helpmanifest definitions, the legacy command parser withincli.pylacked a matching execution leg. Running the command triggered an erroneous fallback outputtingUnknown commandto the operator. This patch plucks the missing route out of limbo, routes parameters directly into a proper status handler, and aligns state mutations cleanly withdisplay.tui_status_indicatorconfiguration schemas.Scope of Changes
/indicatorparsing steps intoHermesCLI.process_command()and implemented a lightweight terminal indicator configuration interface./indicatorpayloads resolve straight to designated command blocks instead of getting dropped into structural missing-route blocks.Verified Test Suites
Targeted command-parsing structures and state change validation blocks finished with absolute success:
tests/cli/test_cli_init.pytests/cli/test_indicator_command.pytests/test_tui_gateway_server.py