navigation with arrow keys for slash commands with highlighting#578
Open
rakshith1928 wants to merge 2 commits into
Open
navigation with arrow keys for slash commands with highlighting#578rakshith1928 wants to merge 2 commits into
rakshith1928 wants to merge 2 commits into
Conversation
…olors.indo for Custom commands for now
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.
Description
Add keyboard navigation (up/down arrows) and Enter selection to the slash command completion menu, matching modern CLI UX .
Closes #575 (maybe create a new issue for mouse click feature in future)
Changes:
/→ completions appear with first item auto-selected (▸ /command)↑/↓→ navigate completionsEnter→ selects highlighted command → fills/commandin input, clears placeholdersTab→ no-op when completions visible (This avoids conflict with file autocomplete (which uses Tab to select))->Use Enter to selectEsc→ clears input, hides completions, resets selectionAlso The Completion type is defined in source/types/components.ts (line 18), not in types/index.ts. The original code had a wrong import that would fail type-checking.
Files changed:
Type of Change
Demo Video
Screen.Recording.2026-06-17.035138.mp4
Future upgarde maybe adding mouse click option .
Check issue #575
Testing
pnpm test:format
pnpm test:types
pnpm test:lint
pnpm test:ava
pnpm test:knip
pnpm test:audit
source/hooks/useUIState.spec.ts - new state tests
source/components/user-input.spec.tsx - render tests
Automated Tests
.spec.ts/tsxfilespnpm test:allcompletes successfully)Manual Testing
Checklist