Replace inquire with rustyline for interactive CLI input#33
Merged
v3g42 merged 7 commits intofix/distrifrom Mar 27, 2026
Merged
Replace inquire with rustyline for interactive CLI input#33v3g42 merged 7 commits intofix/distrifrom
v3g42 merged 7 commits intofix/distrifrom
Conversation
Switches the interactive chat input from inquire::Text to rustyline with bracket paste mode enabled, so pasted multi-line text stays as a single message instead of being split on each newline. Adds slash-command tab completion via rustyline's Completer trait and a placeholder hint via Hinter. History is now managed natively by rustyline with arrow-key navigation. https://claude.ai/code/session_017YeCUYbAKZqsGV4599Rrso
…5r' into fix/distri
…sion
- Replace "assistant:" label with "◆ agent_name:" using the current agent's
display name instead of a generic role label
- Add /tools slash command to toggle tool call output on/off, letting users
hide noisy tool blocks and focus on agent responses
- Suppress internal probe calls (load_skill("?"), discovery GET requests)
from non-verbose output since they're agent internals
- Show thread ID in welcome header and on exit so users can easily resume
sessions with /resume last or /resume <id>
- Show short thread ID when context is cleared via /clear
https://claude.ai/code/session_017YeCUYbAKZqsGV4599Rrso
Use rustyline's ConditionalEventHandler to bind Ctrl+O as a toggle for tool output visibility. The hint text updates to show "[tools hidden · Ctrl+O]" when tools are hidden. Shared state via Arc<AtomicBool> between the helper (for hints) and the handler (for toggling). Help message now has a dedicated KEYBOARD SHORTCUTS section. https://claude.ai/code/session_017YeCUYbAKZqsGV4599Rrso
- Add --resume <id|last> flag to both `tui` and `run` commands so users can resume a thread directly from the CLI without entering interactive mode first - Implement double Ctrl+C to exit: first press shows a hint, second press within 2 seconds exits. Ctrl+D still exits immediately - Print thread message history when resuming (via --resume flag or /resume command), showing user prompts and assistant responses in a compact gray format so the user has context - Add get_thread_messages() to the Distri client for fetching thread message history from the server https://claude.ai/code/session_017YeCUYbAKZqsGV4599Rrso
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
Migrated the interactive chat input handling from the
inquirecrate torustylinefor improved terminal interaction and history management.Key Changes
inquire::Texttorustyline::Editorfor readline-style input handlingDistriAutocompletetoDistriHelperto align with rustyline's trait-based architectureCompleter,Hinter,Validator,Highlighter,Helper)load_history()andsave_history()$HOMEor$USERPROFILE)inquire::InquireErrorvariants withrustyline::error::ReadlineErrorImplementation Details
DistriHelperstruct now implements rustyline'sCompletertrait, returningPairobjects with display and replacement textauto_add_history(true)configurationhttps://claude.ai/code/session_017YeCUYbAKZqsGV4599Rrso