Repository navigation
Conversation
|
The following comment was made by an LLM, it may be inaccurate: |
There was a problem hiding this comment.
I checked each addition with a script against Definitions in packages/tui/src/config/v1/keybind.ts. All 55 keys and defaults match, the JSON block still parses (206 keys), and no existing line changes. Public API is unchanged (docs only).
Two things worth looking at before this goes in:
- Which registry the page follows. On
dev,v1/keybind.tsis the legacy schema thatpackages/cli/src/config/migrate.tsuses to rename old keys. The TUI itself readspackages/tui/src/config/keybind.ts, which uses dotted command names (session.tab.next,diff.open, …) and rejects unknown keys, and v2 config lives incli.json. So the new entries document legacy names. Updating the page for v2 is a separate, bigger job and a maintainer call. But it means this PR adds 55 more names to legacy docs rather than syncing the page with what the TUI reads. - The sync is partial. Even against
v1/keybind.ts, the block still lists 24 keys that file doesn't define (which_key_*,plugin_install,plugin_manager,workspace_set,tool_details,session_child_cycle,session_child_cycle_reverse,session_toggle_timestamps,input_paste,console_org_switch, …). It also has 8 values that differ:agent_cycle(tabvsshift+tab),agent_cycle_reverse,session_child_first(<leader>downvsdown),messages_first,messages_last_user,input_buffer_home,input_buffer_end,plugins.toggle(spacevsreturn). If the goal is to match that registry, these need fixing too. Otherwise readers copying the example still get the wrong defaults.
| "command_list": "ctrl+p", | ||
| "help_show": "none", | ||
| "docs_open": "none", | ||
| "diff_open": "none", |
There was a problem hiding this comment.
These defaults match packages/tui/src/config/v1/keybind.ts. On dev that file is the legacy schema used by packages/cli/src/config/migrate.ts. The TUI reads packages/tui/src/config/keybind.ts instead, where these are diff.open, diff.close, …, session.tab.next, session.quick_switch.1, and so on, and unknown names are rejected. Maintainers should decide which names this page documents before more v1 names are added.
| "queued_prompt_delete": "ctrl+d", | ||
| "session_toggle_timestamps": "none", | ||
| "session_toggle_generic_tool_output": "none", | ||
| "session_child_first": "<leader>down", |
There was a problem hiding this comment.
This existing line doesn't match the registry this PR syncs to: session_child_first is down in v1/keybind.ts, not <leader>down. Seven other values differ the same way (agent_cycle, agent_cycle_reverse, messages_first, messages_last_user, input_buffer_home, input_buffer_end, plugins.toggle), and 24 documented keys aren't in the registry at all. For a sync, please fix or remove those too.
I compared every ID and default in `cli/keybinds.mdx` with `Definitions` in `packages/tui/src/config/keybind.ts`: 13 of the 236 active IDs were absent from the page, and no default it documents differs. They are added to the section they belong to, in registry order, with the descriptions from the registry. The five retired `diff.*` entries stay in the prose note below the diff table.
cfb155d to
91429fd
Compare
|
Both points check out, and the second one made me look in the wrong place.
This branch now makes that change instead ( |
|
Small heads-up on overlap: #57307 also edits the Composer table in this file. It adds Nothing else overlaps: the other ten ids this PR adds are in sections #57307 doesn't touch. Whoever merges second will need to rebase this table, but resolving it is just dropping the duplicate three terminal rows. Prettier widens the Description column either way because |
|
Checked the overlap: #57307 does add the same three rows — I'll rebase on top of #57307 if it merges first; if this one merges first, the same three lines are what yours drops. |
|
Thanks for the PR! #58280 added these keybinds to the reference, so I'm closing this as superseded. — from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊 |
Issue for this PR
No issue. This ports the change asked for in #53557 ("If you think this is still relevant, please port it over and open it for V2").
Type of change
What does this PR do?
The V2 keybind reference was missing 13 of the 236 keybinds the TUI accepts. This adds them to the section they belong to, in the order of
Definitionsinpackages/tui/src/config/keybind.ts, with the descriptions from the registry:location.reloadpane.focus.left,pane.focus.right,terminal.select,terminal.closesession.copy.id,session.verbosity.cyclecomposer.terminal.up,composer.terminal.down,composer.terminal.selectdialog.integration.rename,dialog.integration.delete,dialog.plugins.errorThis replaces the earlier revision of this branch, which changed the V1 docs page (
packages/web/src/content/docs/keybinds.mdx, thetui.jsonreference) instead of the V2 reference underservices/www. Nothing else on the page changes: the five retireddiff.*entries stay in the prose note below the diff table, and the four description drifts that predate this PR (app.clear,session.move,diff.switch_source,dialog.plugins.check) are left alone.How did you verify your code works?
Extracted every ID and default from the page's tables and compared them with
Definitionsinpackages/tui/src/config/keybind.ts:diff.toggle,diff.expand,diff.expand_all,diff.collapse,diff.switch_focus— still accepted, no longer registering shortcuts, and named in that sentence.From
services/www:bun run typecheck—Result (31 files): 0 errors, 0 warnings, 0 hints.bun run build— exit 0, 63 pages indexed, link validation clean.Screenshots / recordings
N/A — table rows added to one documentation page.
Checklist