feat(cli): add vim-style j/k navigation to list selectors#2673
Merged
cpacker merged 1 commit intoJun 7, 2026
Conversation
Bind "j"/"k" as aliases for the down/up arrows in the shared list pickers (SingleSelectPicker, MultiSelectPicker) and the conversation resume picker (ConversationSelector), matching the convention already used in PinDialog. These are pure-list selectors with no inline text field, so binding bare letters cannot clash with typing. Filter-based selectors such as AgentSelector and ProviderSelector are intentionally left untouched — they accept free-text search where "j"/"k" must remain typeable (see agent-selector-shortcuts.test.ts), and the typing-while-open autocomplete dropdowns are excluded for the same reason. Closes letta-ai#2063
cpacker
approved these changes
Jun 7, 2026
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
Closes #2063.
Adds vim-style
j/kas aliases for the down/up arrow keys in CLI list selectors, so users with vim muscle memory (orset -o vishells) can navigate without reaching for the arrow keys.This follows the convention already present in the codebase —
PinDialogalready bindsj/kto down/up (input === "j" || key.downArrow). This change extends the same pattern to the shared pickers and the/resumeconversation selector.Changes
SingleSelectPicker— the shared single-select base picker (used byPersonalitySelector,CompactionSelector,WorktreeDiffSelector,SystemPromptSelector). Also updated its default footer hint to↑↓/jk navigate.MultiSelectPicker— the shared multi-select base picker.ConversationSelector— the/resumeconversation picker (explicitly called out in the issue).In all three,
kmoves the cursor up andjmoves it down, matching vim semantics.Scope / why these components
The bindings are added only to pure-list selectors that have no inline text field, so a bare
j/kkeypress can never clash with typing.Deliberately not changed:
AgentSelector,ProviderSelector,ModelSelector,SleeptimeSelector, etc.) accept free-text search input. Binding bare letters there would swallow legitimate typing —agent-selector-shortcuts.test.tsdocuments this exact constraint (delete isShift+Dprecisely so lowercasedstays typeable).useAutocompleteNavigation) are active while the user is typing in the prompt, soj/kmust remain literal characters there.This keeps the change small, safe, and free of typing regressions. The remaining typing-free selectors can be migrated in follow-ups using the same pattern.
Tests
Added
src/cli/components/vim-navigation.test.ts, which asserts thej/k→ down/up bindings are wired in the three pure-list pickers (source-assertion style, matching the existingagent-selector-shortcuts.test.ts).Also verified locally:
bun run typecheck, biome lint, layer-boundary / exported-function / filename-casing checks, and the existingconversation-selector+agent-selector-shortcutssuites all pass.