Skip to content

fix(cli): dispatch /indicator to set the busy-indicator style (#50618) - #75874

Merged
teknium1 merged 3 commits into
mainfrom
salvage/pr51178-indicator-dispatch
Aug 1, 2026
Merged

fix(cli): dispatch /indicator to set the busy-indicator style (#50618)#75874
teknium1 merged 3 commits into
mainfrom
salvage/pr51178-indicator-dispatch

Conversation

@teknium1

@teknium1 teknium1 commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Summary

/indicator now actually works in the classic CLI (#50618): it was registered in COMMAND_REGISTRY (so it appeared in /help and tab-completion) but process_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 (writes display.tui_status_indicator, the exact key the TUI reads), and extracts INDICATOR_STYLES/DEFAULT_INDICATOR_STYLE into hermes_constants.py as 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_STYLE extracted.
  • tui_gateway/server.py, hermes_cli/commands.py: consume the shared constants.
  • tests/cli/test_indicator_command.py: 8 tests.

Validation

Before After
/indicator kaomoji in classic CLI Unknown command style set + persisted
Style list drift CLI vs TUI two copies one constants source
tests/cli/test_indicator_command.py 8/8 pass

Infographic

/indicator now answers

dongjiang1989 and others added 2 commits July 31, 2026 22:08
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>
@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

૮ >ﻌ< ა ci review

ran on 86d2dbc

ℹ️ Info

Desktop E2E visual evidence · View test artifacts · View job

3 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.
@teknium1
teknium1 merged commit 484e451 into main Aug 1, 2026
38 checks passed
@teknium1
teknium1 deleted the salvage/pr51178-indicator-dispatch branch August 1, 2026 05:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants