-
Notifications
You must be signed in to change notification settings - Fork 6.7k
feat: add keybindings reference dialog to TUI #3888
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
772b621 to
eb855e1
Compare
aec9e87 to
59eeaa5
Compare
|
Updated to latest dev branch |
f1dc981 to
3e15a39
Compare
f8ee907 to
6a9856d
Compare
|
@agentic-ai-forge Thanks for mentioning, forgot about that PR. Let me work that out. |
9a40c91 to
eb74d64
Compare
|
Updated to latest dev + fixed some stuff:
btw, I don't really understand why these 3 tests fail (patch/revert/diff with worktrees) - seems like a CI thing? Our changes only touch dialog-keybindings.tsx and auto-generated types. @thdxr you've been working on the snapshot/worktree stuff lately, maybe you can take a quick look and explain what's wrong? ^^ Ready for another look ✌️ |
eb74d64 to
4c9ce6d
Compare
|
Hola, First of all: The failures were because the branch was missing recent worktree infrastructure commits (0b4af95 and 5944443 from yesterday). The snapshot tests need those to properly handle worktree contexts. Rebased cleanly since this PR only touches UI components - no conflicts. Second, Said that, the question remains, it involves UX. Currently the command pallete already shows shortcuts so that could be seens as a duplicate. Depends on the taste of the opencode community. Personally, I still have to look up shortcuts ^-^ Thanks for the great work, its a joy to see the project grow in that fast pacing space 😁 Happy new year everyone and best regards, *Edit: Rushed thruh my head, the keybindings are currently static, thats maybe not optimal. |
Added a searchable keybindings dialog accessible via <leader>? that displays all 88 keybindings with their descriptions. Features: - Accessible via ctrl+x then ? or command palette - Shows all keybindings in alphabetical order - Searchable and filterable using DialogSelect - Descriptions dynamically extracted from config schema Implementation: - Created dialog-keybindings.tsx component - Added keybindings_list config option (default: <leader>?) - Registered in command palette under "System" category - Uses zodToJsonSchema to extract descriptions at runtime This ensures descriptions stay in sync with schema definitions automatically - single source of truth, zero maintenance. Fixes anomalyco#3886
4c9ce6d to
45fdcf4
Compare
|
Fixed the static descriptions issue from my edit above ^^ Now using Also squashed everything into one clean commit and rebased onto latest dev for nice history. |


Problem
When using the TUI, there's no easy way to discover what keybindings are available. Users have to check documentation or dig through config files to find out what shortcuts they can use.
Solution
Added a searchable keybindings dialog accessible via
<leader>?that displays all 88 keybindings with their descriptions.What Changed
dialog-keybindings.tsxusing the existingDialogSelectcomponentkeybindings_listconfig option (default:<leader>?= ctrl+x + ?)zodToJsonSchemaHow to Use
Via Keybinding: Press
ctrl+xthen?Via Command Palette: Press
ctrl+p, type "keybindings"Implementation
Follows existing patterns:
DialogSelectcomponent (same as model/theme lists)useKeybind()hookFixes #3886