Skip to content

fix(cli): add loading indicators for slow slash commands#882

Merged
teknium1 merged 1 commit into
mainfrom
hermes/hermes-ecb374ec
Mar 11, 2026
Merged

fix(cli): add loading indicators for slow slash commands#882
teknium1 merged 1 commit into
mainfrom
hermes/hermes-ecb374ec

Conversation

@teknium1

Copy link
Copy Markdown
Contributor

Summary

Cherry-pick and rebase of PR #714 by @vilkasdev onto current main. Shows loading indicators for slow slash commands so the CLI doesn't appear frozen.

What it does

  • Wraps /skills search|browse|inspect|install and /reload-mcp with a _busy_command() context manager
  • Shows an immediate ⏳ Searching skills... (etc.) status message
  • Adds a braille spinner in the prompt while the command runs
  • Makes input read-only during command execution
  • Shows "command in progress · input temporarily disabled" hint text
  • Background spinner thread refreshes UI at 100ms intervals

Changes from original PR

  • Resolved 4 merge conflicts (260 commits behind)
  • Fixed bug: get_hint_text() had a duplicate return block inside the _clarify_freetext branch that made the "↑/↓ to select" hint unreachable for multi-choice clarify prompts
  • Preserved all new code from HEAD (_normalize_model_for_provider, _on_thinking, /rollback, /skin commands)

UX pitfalls verified

  • No \033[K ANSI escapes (would leak as ?[K under prompt_toolkit's patch_stdout)
  • Spinner uses prompt_toolkit's native FormattedText, not raw ANSI
  • _invalidate() uses the existing throttled repaint mechanism

Fixes #636

Tests

  • 2 new tests from the contributor + full suite: 2871 passed, 0 failures

Co-authored-by: vilkasdev vilkasdev@users.noreply.github.com

Replaces head-only stdout capture with a two-buffer approach (40% head,
60% tail rolling window) so scripts that print() their final results
at the end never lose them. Adds truncation notice between sections.

Cherry-picked from PR #755, conflict resolved (test file additions).

3 new tests for short output, head+tail preservation, and notice format.
@teknium1 teknium1 force-pushed the hermes/hermes-ecb374ec branch from 97db1cf to a9241f3 Compare March 11, 2026 07:26
@teknium1 teknium1 merged commit 359352b into main Mar 11, 2026
1 check passed
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.

[UX]: Async slash commands (/skills search, etc.) need a loading indicator

1 participant