The open source coding agent.
TypeScript
remove input_forward_delete special handling
Sebastian Herrlingerbaed581a7cb7
diff --git a/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx b/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsxindex 2fd4967a01b..868be296fcb 100644--- a/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx+++ b/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx@@ -688,17 +688,6 @@ export function Prompt(props: PromptProps) {setStore("extmarkToPartIndex", new Map())return}- if (keybind.match("input_forward_delete", e) && store.prompt.input !== "") {- const cursorOffset = input.cursorOffset- if (cursorOffset < input.plainText.length) {- const text = input.plainText- const newText = text.slice(0, cursorOffset) + text.slice(cursorOffset + 1)- input.setText(newText)- input.cursorOffset = cursorOffset- }- e.preventDefault()- return- }if (keybind.match("app_exit", e)) {await exit()returndiff --git a/packages/opencode/src/config/config.ts b/packages/opencode/src/config/config.tsindex 267278b747e..34e3eea7923 100644--- a/packages/opencode/src/config/config.ts+++ b/packages/opencode/src/config/config.ts@@ -464,7 +464,6 @@ export namespace Config {agent_cycle: z.string().optional().default("tab").describe("Next agent"),agent_cycle_reverse: z.string().optional().default("shift+tab").describe("Previous agent"),input_clear: z.string().optional().default("ctrl+c").describe("Clear input field"),- input_forward_delete: z.string().optional().default("ctrl+d").describe("Forward delete"),input_paste: z.string().optional().default("ctrl+v").describe("Paste from clipboard"),input_submit: z.string().optional().default("return").describe("Submit input"),input_newline: z.string().optional().default("shift+return,ctrl+j").describe("Insert newline in input"),diff --git a/packages/web/src/content/docs/keybinds.mdx b/packages/web/src/content/docs/keybinds.mdxindex a32756e18c8..36b51c68d16 100644--- a/packages/web/src/content/docs/keybinds.mdx+++ b/packages/web/src/content/docs/keybinds.mdx@@ -45,7 +45,6 @@ OpenCode has a list of keybinds that you can customize through the OpenCode conf"agent_cycle": "tab","agent_cycle_reverse": "shift+tab","input_clear": "ctrl+c",- "input_forward_delete": "ctrl+d","input_paste": "ctrl+v","input_submit": "enter","input_newline": "shift+enter,ctrl+j",