feat: Add searchable autocomplete prompts for selection args - #601
Merged
Conversation
razor-x
force-pushed
the
claude/interactive-input-nav-lfgrrm
branch
from
August 4, 2026 19:28
aeff1c7 to
1606bfa
Compare
Both were the only lists that could not be searched, while selecting a device or a command already could. Searching matches any part of a name rather than only what it starts with, which is all a list of servers sharing a scheme could be found by. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NgxWoYAQLVsGsNGLBdDYHi
razor-x
force-pushed
the
claude/interactive-input-nav-lfgrrm
branch
from
August 4, 2026 19:31
1606bfa to
6d94c7f
Compare
razor-x
marked this pull request as ready for review
August 4, 2026 21:28
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
Enhanced the CLI's interactive prompts to support searchable autocomplete lists with keyboard navigation using Ctrl+p/n (in addition to arrow keys). This improves usability when selecting from long lists of workspaces or servers.
Key Changes
prompt-keys.ts): Translates Ctrl+p and Ctrl+n keypresses to arrow key escape sequences, allowing prompts to recognize these common navigation chordsprompt.ts): AddedsearchChoicesfunction that filters choices by any whitespace-separated term, matching case-insensitively against both title and description fieldsprompt()to use a custom input stream that translates arrow key chords and applies the search function to autocomplete promptsselecttoautocompletetype to enable searching through potentially long listsNotable Implementation Details
createPromptInputfunction wraps stdin to intercept keypresses and translate Ctrl+p/n before the prompt library sees them, avoiding the need to modify the underlying prompt libraryhttps://claude.ai/code/session_01NgxWoYAQLVsGsNGLBdDYHi