fix(tui): make move session command bindable (#33508)

Add the session_move TUI keybind and map it to the existing session.move command. Keep it unbound by default and document the new configuration option.

Closes #33239
This commit is contained in:
Simon Klee 2026-06-23 15:55:14 +02:00 committed by GitHub
parent ef4500d6af
commit 3cdd431794
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 9 additions and 0 deletions

View File

@ -83,6 +83,7 @@ export const Definitions = {
session_export: keybind("<leader>x", "Export session to editor"),
session_copy: keybind("none", "Copy session transcript"),
session_move: keybind("none", "Move session"),
session_new: keybind("<leader>n", "Create a new session"),
session_list: keybind("<leader>l", "List all sessions"),
session_timeline: keybind("<leader>g", "Show session timeline"),
@ -287,6 +288,7 @@ export const CommandMap = {
status_view: "opencode.status",
session_export: "session.export",
session_copy: "session.copy",
session_move: "session.move",
session_new: "session.new",
session_list: "session.list",
session_timeline: "session.timeline",

View File

@ -80,6 +80,12 @@ test("resolves overrides without mutating input", () => {
expect(input.keybinds).toEqual({ session_list: "ctrl+l" })
})
test("resolves a session move keybind", () => {
const config = resolve({ keybinds: { session_move: "ctrl+o" } }, { terminalSuspend: true })
expect(config.keybinds.get("session.move")).toMatchObject([{ key: "ctrl+o" }])
})
test("disables suspend and assigns ctrl+z to undo when unsupported", () => {
const config = resolve({}, { terminalSuspend: false })

View File

@ -34,6 +34,7 @@ OpenCode has a list of keybinds that you can customize through `tui.json`.
"session_export": "<leader>x",
"session_copy": "none",
"session_move": "none",
"session_new": "<leader>n",
"session_list": "<leader>l",
"session_timeline": "<leader>g",