Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/opencode/test/config/tui.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,7 @@ it.instance("resolves keybind lookup from canonical keybinds", () =>
keybinds: {
leader: { key: { name: "g", ctrl: true } },
command_list: "alt+p",
diff_open: "ctrl+j",
which_key_toggle: "alt+k",
editor_open: "ctrl+e",
"prompt.autocomplete.next": "ctrl+j",
Expand All @@ -487,6 +488,7 @@ it.instance("resolves keybind lookup from canonical keybinds", () =>
expect(config.keybinds.get("leader")?.[0]?.key).toEqual({ name: "g", ctrl: true })
expect(config.leader_timeout).toBe(1234)
expect(config.keybinds.get("command.palette.show")?.[0]?.key).toBe("alt+p")
expect(config.keybinds.get("diff.open")?.[0]?.key).toBe("ctrl+j")
expect(config.keybinds.get("session.new")?.[0]?.key).toBe("<leader>n")
expect(config.keybinds.get("which-key.toggle")?.[0]?.key).toBe("alt+k")
expect(config.keybinds.get("which-key.layout.toggle")?.[0]?.key).toBe("ctrl+alt+shift+k")
Expand Down
1 change: 1 addition & 0 deletions packages/tui/src/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ const appBindingCommands = [
"theme.mode.lock",
"help.show",
"docs.open",
"diff.open",
"workspace.list",
"app.debug",
"app.console",
Expand Down
2 changes: 2 additions & 0 deletions packages/tui/src/config/keybind.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ export const Definitions = {
command_list: keybind("ctrl+p", "List available commands"),
help_show: keybind("none", "Open help dialog"),
docs_open: keybind("none", "Open documentation"),
diff_open: keybind("none", "Open diff viewer"),
diff_close: keybind("escape,q", "Close diff viewer"),
diff_toggle: keybind("enter,space", "Toggle diff viewer item"),
diff_expand: keybind("right", "Expand diff viewer item"),
Expand Down Expand Up @@ -263,6 +264,7 @@ export const CommandMap = {
command_list: "command.palette.show",
help_show: "help.show",
docs_open: "docs.open",
diff_open: "diff.open",
diff_close: "diff.close",
diff_toggle: "diff.toggle",
diff_expand: "diff.expand",
Expand Down
Loading