From 63fbff523fa5d5d41f2324f36ebed3f7fab5874d Mon Sep 17 00:00:00 2001 From: Dax Raad Date: Wed, 29 Oct 2025 11:01:29 -0400 Subject: [PATCH] tui: remove deprecated and unused keybinds to simplify configuration Users no longer see confusing deprecated keybind options in config that were never implemented (switch_mode, file operations, etc). Keybinds now use consistent Zod schema defaults instead of hardcoded fallbacks, making configuration more predictable. Session interruption (esc) now works consistently through keybind system. --- .../cli/cmd/tui/component/prompt/index.tsx | 37 +++- .../src/cli/cmd/tui/context/keybind.tsx | 46 +--- .../src/cli/cmd/tui/routes/session/index.tsx | 129 ++++++++--- packages/opencode/src/config/config.ts | 203 +++++++++++------- packages/opencode/src/util/keybind.ts | 1 + packages/sdk/js/src/gen/sdk.gen.ts | 53 ++++- packages/sdk/js/src/gen/types.gen.ts | 40 ++++ 7 files changed, 346 insertions(+), 163 deletions(-) diff --git a/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx b/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx index 8c24dcb51..7915607fe 100644 --- a/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx +++ b/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx @@ -316,7 +316,9 @@ export function Prompt(props: PromptProps) { // Expand pasted text inline before submitting const allExtmarks = input.extmarks.getAllForTypeId(promptPartTypeId) - const sortedExtmarks = allExtmarks.sort((a: { start: number }, b: { start: number }) => b.start - a.start) + const sortedExtmarks = allExtmarks.sort( + (a: { start: number }, b: { start: number }) => b.start - a.start, + ) for (const extmark of sortedExtmarks) { const partIndex = store.extmarkToPartIndex.get(extmark.id) @@ -472,15 +474,28 @@ export function Prompt(props: PromptProps) { - + {store.mode === "normal" ? ">" : "!"} - +