feat(nav): add j/k vim-style navigation to all TUI menus#479
Open
dudeinthemirror wants to merge 1 commit into
Open
feat(nav): add j/k vim-style navigation to all TUI menus#479dudeinthemirror wants to merge 1 commit into
dudeinthemirror wants to merge 1 commit into
Conversation
Add vim-style j/k keybindings (up/down) alongside existing arrow keys and Ctrl+P/N across all interactive prompt_toolkit panels: - command_line/agent_menu.py - command_line/autosave_menu.py - command_line/colors_menu.py - command_line/judges_menu.py - command_line/mcp_binding_menu.py - command_line/model_settings_menu.py - command_line/set_menu.py (smart: types normally in search mode) - command_line/uc_menu.py - tools/common.py (arrow_select + arrow_select_async) Also fix syntax error in arrow_select() where try/asyncio.get_running_loop() was accidentally replaced with an invalid with/await block.
Owner
|
Hey @dudeinthemirror some of the menus are listening for search strings when you type. How would j/k interaction work with those? |
Collaborator
Author
yeah, I excluded those ones (like /model or / (to display a dropdown of commands)) |
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
Adds vim-style
j/kkeybindings (down/up) to every interactiveprompt_toolkitpanel, sitting alongside the existing arrow keys andCtrl+P/Ctrl+Nbindings.Panels updated
command_line/agent_menu.pycommand_line/autosave_menu.pycommand_line/colors_menu.pycommand_line/judges_menu.pycommand_line/mcp_binding_menu.pycommand_line/model_settings_menu.pycommand_line/set_menu.py/search is activecommand_line/uc_menu.pytools/common.pyarrow_select_async+arrow_select(sync)Bug fix included
Fixed a syntax error in
arrow_select()(sync) where thetry: asyncio.get_running_loop()block was accidentally replaced with an invalidwith suspended_key_listener(): await app.run_async()— mixing async into a sync function and leaving a danglingexceptwith notry.Testing
All 2190 tests pass across
tests/command_line/andtests/tools/test_common*.py.