fix(cli): add loading indicators for slow slash commands#882
Merged
Conversation
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.
97db1cf to
a9241f3
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
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
/skills search|browse|inspect|installand/reload-mcpwith a_busy_command()context manager⏳ Searching skills...(etc.) status messageChanges from original PR
get_hint_text()had a duplicate return block inside the_clarify_freetextbranch that made the "↑/↓ to select" hint unreachable for multi-choice clarify prompts_normalize_model_for_provider,_on_thinking,/rollback,/skincommands)UX pitfalls verified
\033[KANSI escapes (would leak as?[Kunder prompt_toolkit's patch_stdout)_invalidate()uses the existing throttled repaint mechanismFixes #636
Tests
Co-authored-by: vilkasdev vilkasdev@users.noreply.github.com