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:
parent
ef4500d6af
commit
3cdd431794
@ -83,6 +83,7 @@ export const Definitions = {
|
|||||||
|
|
||||||
session_export: keybind("<leader>x", "Export session to editor"),
|
session_export: keybind("<leader>x", "Export session to editor"),
|
||||||
session_copy: keybind("none", "Copy session transcript"),
|
session_copy: keybind("none", "Copy session transcript"),
|
||||||
|
session_move: keybind("none", "Move session"),
|
||||||
session_new: keybind("<leader>n", "Create a new session"),
|
session_new: keybind("<leader>n", "Create a new session"),
|
||||||
session_list: keybind("<leader>l", "List all sessions"),
|
session_list: keybind("<leader>l", "List all sessions"),
|
||||||
session_timeline: keybind("<leader>g", "Show session timeline"),
|
session_timeline: keybind("<leader>g", "Show session timeline"),
|
||||||
@ -287,6 +288,7 @@ export const CommandMap = {
|
|||||||
status_view: "opencode.status",
|
status_view: "opencode.status",
|
||||||
session_export: "session.export",
|
session_export: "session.export",
|
||||||
session_copy: "session.copy",
|
session_copy: "session.copy",
|
||||||
|
session_move: "session.move",
|
||||||
session_new: "session.new",
|
session_new: "session.new",
|
||||||
session_list: "session.list",
|
session_list: "session.list",
|
||||||
session_timeline: "session.timeline",
|
session_timeline: "session.timeline",
|
||||||
|
|||||||
@ -80,6 +80,12 @@ test("resolves overrides without mutating input", () => {
|
|||||||
expect(input.keybinds).toEqual({ session_list: "ctrl+l" })
|
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", () => {
|
test("disables suspend and assigns ctrl+z to undo when unsupported", () => {
|
||||||
const config = resolve({}, { terminalSuspend: false })
|
const config = resolve({}, { terminalSuspend: false })
|
||||||
|
|
||||||
|
|||||||
@ -34,6 +34,7 @@ OpenCode has a list of keybinds that you can customize through `tui.json`.
|
|||||||
|
|
||||||
"session_export": "<leader>x",
|
"session_export": "<leader>x",
|
||||||
"session_copy": "none",
|
"session_copy": "none",
|
||||||
|
"session_move": "none",
|
||||||
"session_new": "<leader>n",
|
"session_new": "<leader>n",
|
||||||
"session_list": "<leader>l",
|
"session_list": "<leader>l",
|
||||||
"session_timeline": "<leader>g",
|
"session_timeline": "<leader>g",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user