fix(cli): dispatch /indicator to set the busy-indicator style (#50618) - #75874
Merged
Conversation
The /indicator command was registered in COMMAND_REGISTRY, listed in /help, offered by tab-completion, recommended by the tips system, and even documented in config.py — but it had no actual handler. Running /indicator in the CLI produced "Unknown command: indicator". Add _handle_indicator_command to CLICommandsMixin that: - Shows the current indicator style when called with no args or "status" - Validates the requested style against the shared INDICATOR_STYLES allowlist (ascii | emoji | kaomoji | unicode) - Persists the choice to display.tui_status_indicator in config.yaml via the existing save_config_value helper - Falls back to session-only when config save fails The indicator-style allowlist is defined once in hermes_constants as INDICATOR_STYLES + DEFAULT_INDICATOR_STYLE and imported by all three consumers (CLI handler, command registry, TUI gateway config handler), preventing drift between the TUI and CLI validation. Also adds tests/cli/test_indicator_command.py covering dispatch, validation, persistence, and registry integration. Signed-off-by: dongjiang <dongjiang1989@126.com>
Contributor
૮ >ﻌ< ა ci reviewran on 86d2dbc ℹ️ InfoDesktop E2E visual evidence · View test artifacts · View job3 visual diffs. inline evidence upload failed. Failed to upload diff-1508682a2ae8-boot-ready-diff.png with gh image (exit code 1): Error uploading /home/runner/work/_temp/e2e-evidence/diff-1508682a2ae8-boot-ready-diff.png: step 0 (get upload token): uploadToken not found on repo page — do you have write access to NousResearch/hermes-agent? (or, if NousResearch enforces SAML SSO, authorize at https://github.com/orgs/NousResearch/sso) |
The salvaged commit renamed server.py's private _INDICATOR_STYLES/_INDICATOR_DEFAULT to the shared hermes_constants imports, but methods_config.py (extracted after the original PR was authored) still referenced the old private names through the server-globals rebinding. Import the shared constants directly.
This was referenced Aug 1, 2026
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
/indicatornow actually works in the classic CLI (#50618): it was registered inCOMMAND_REGISTRY(so it appeared in/helpand tab-completion) butprocess_command()had no dispatch branch — typing it hit "Unknown command". Only the TUI gateway path handled it.The fix adds the dispatch branch and
_handle_indicator_command(writesdisplay.tui_status_indicator, the exact key the TUI reads), and extractsINDICATOR_STYLES/DEFAULT_INDICATOR_STYLEintohermes_constants.pyas the single source of truth for the classic CLI, TUI gateway, and command registry.Salvaged from #51178 by @DongJiang with authorship preserved (1 commit cherry-picked onto current main; applied clean, wiring verified — registry, TUI server, and CLI mixin all import the shared constants).
Changes
cli.py/hermes_cli/cli_commands_mixin.py: dispatch branch + handler (mirrors_handle_busy_command).hermes_constants.py:INDICATOR_STYLES/DEFAULT_INDICATOR_STYLEextracted.tui_gateway/server.py,hermes_cli/commands.py: consume the shared constants.tests/cli/test_indicator_command.py: 8 tests.Validation
/indicator kaomojiin classic CLIInfographic