feat(command-palette): add a read-only reference mode

The shortcuts help panel needs the palette's search and categories without
running an action when a binding is chosen, and it lives in a dock where input
comes from the terminal rather than the overlay protocol. Read the bindings from
a file and skip execution in that mode.
This commit is contained in:
BlackAngelTV committed 2026-11-12 12:43:46 +01:00
1 parent 8482515412
commit 45a16ea61c
3 files changed
+78 -12

No files matched your search

+9
View File
@@ -338,6 +338,15 @@ def handle_result(args: list[str], data: dict[str, Any], target_window_id: int,
help_text = 'Browse and trigger keyboard shortcuts and actions'
usage = ''
OPTIONS = r"""
--data-file
Read keybinding data from this JSON file instead of STDIN. Used by the
keyboard shortcuts help panel, so that it can run in a dock window.
--read-only
type=bool-set
Display the bindings without running the selected action on Enter. The panel
is then a reference, not a launcher.
""".format