fix(cli): wire /indicator slash command to a handler - #27627
Closed
luyao618 wants to merge 1 commit into
Closed
Conversation
Collaborator
The /indicator command was declared in hermes_cli/commands.py
COMMAND_REGISTRY (with subcommands kaomoji/emoji/unicode/ascii)
but HermesCLI.process_command() had no matching elif branch, so
typing '/indicator unicode' produced 'Unknown command' even though
the command appeared in the help/autocomplete.
Add _handle_indicator_command modeled on _handle_busy_command:
- /indicator (or /indicator status) prints the current style
- /indicator <style> validates against {kaomoji, emoji, unicode,
ascii} and persists display.tui_status_indicator via
save_config_value
- unknown styles are rejected with a usage hint
Add tests/hermes_cli/test_indicator_command.py covering registry
presence, dispatch wiring, save-on-valid-style, and reject-on-bogus.
Fixes NousResearch#27603
luyao618
force-pushed
the
fix/issue-27603-indicator-command-handler
branch
from
May 18, 2026 05:00
e050ce6 to
41a1460
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #27603. The
/indicatorslash command was declared inhermes_cli/commands.pyCOMMAND_REGISTRY(with subcommandskaomoji|emoji|unicode|ascii) and shows up in autocomplete/help, butHermesCLI.process_command()incli.pyhad no matchingelif canonical == "indicator"branch. As a result, typing/indicator unicodefell through to the"Unknown command"path even though the command is documented and the underlying config key (display.tui_status_indicator) is fully supported by the TUI gateway and ui-tui consumers.What changed
cli.pyprocess_command()now dispatchescanonical == "indicator"to a new handler, placed next to the existing/skinand/busyhandlers._handle_indicator_command()mirrors the style of_handle_busy_command():/indicatoror/indicator status→ prints the current style (read fromload_cli_config()→display.tui_status_indicator, defaulting tokaomoji) and usage hint./indicator <kaomoji|emoji|unicode|ascii>→ validates the arg, callssave_config_value("display.tui_status_indicator", arg), and prints a confirmation. Unknown args get a usage hint and no write.tests/hermes_cli/test_indicator_command.py(new)indicatoris present inCOMMAND_REGISTRYand resolves viaresolve_command().HermesCLI._handle_indicator_commandexists and thatprocess_command()source contains the dispatch branch (regression guard for the original bug).save_config_valueis invoked with the right key/value.Verification
display.tui_status_indicatorconfig key already exists (hermes_cli/config.py:1006, defaultkaomoji) and is consumed bytui_gateway/server.pyandui-tui/src/app/useConfigSync.ts, so this change just exposes the existing knob via the slash command users were already trying to type.display.busy_indicator_style; verified the real key in this repo isdisplay.tui_status_indicatorand used that.pytest tests/hermes_cli/test_indicator_command.py -x -q→4 passed.Risk
Very low. Pure additive change:
elifbranch in command dispatch — does not affect other commands.HermesCLI.No changes to behavior of any other slash command or to the config-key semantics.