The open source coding agent.
TypeScript
tab to accept autocomplete
Dax Raad5565f14ef5f6
diff --git a/packages/opencode/src/cli/cmd/tui/component/dialog-command.tsx b/packages/opencode/src/cli/cmd/tui/component/dialog-command.tsxindex ce9bcde4230..4b648e9d940 100644--- a/packages/opencode/src/cli/cmd/tui/component/dialog-command.tsx+++ b/packages/opencode/src/cli/cmd/tui/component/dialog-command.tsx@@ -28,7 +28,9 @@ function init() {return registrations().flatMap((x) => x())})+ let keybinds = trueuseKeyboard((evt) => {+ if (!keybinds) returnfor (const option of options()) {if (option.keybind && keybind.match(option.keybind, evt)) {evt.preventDefault()@@ -47,6 +49,9 @@ function init() {}}},+ keybinds(enabled: boolean) {+ keybinds = enabled+ },show() {dialog.replace(() => <DialogCommand options={options()} />)},diff --git a/packages/opencode/src/cli/cmd/tui/component/prompt/autocomplete.tsx b/packages/opencode/src/cli/cmd/tui/component/prompt/autocomplete.tsxindex e455f99bd0f..4f97d7885af 100644--- a/packages/opencode/src/cli/cmd/tui/component/prompt/autocomplete.tsx+++ b/packages/opencode/src/cli/cmd/tui/component/prompt/autocomplete.tsx@@ -321,6 +321,7 @@ export function Autocomplete(props: {}function show(mode: "@" | "/") {+ command.keybinds(false)setStore({visible: mode,index: props.input().visualCursor.offset,@@ -338,6 +339,7 @@ export function Autocomplete(props: {const cursor = props.input().logicalCursorprops.input().deleteRange(0, 0, cursor.row, cursor.col)}+ command.keybinds(true)setStore("visible", false)}