Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
2dec4c1
fix: respect user keybinding configuration for input_submit/input_new…
ariane-emory Mar 12, 2026
b8e5ee8
Merge branch 'dev' into fix/input-enter-keybindings
ariane-emory Mar 13, 2026
1b5d18f
Fix: Allow submit keybinding to work with slash command autocomplete
ariane-emory Mar 14, 2026
501905c
Merge branch 'dev' into fix/input-enter-keybindings
ariane-emory Mar 20, 2026
c2908d4
Merge branch 'dev' into fix/input-enter-keybindings
ariane-emory Mar 20, 2026
e0ddc76
Merge branch 'dev' into fix/input-enter-keybindings
ariane-emory Mar 24, 2026
ff718ca
Merge branch 'dev' into fix/input-enter-keybindings
ariane-emory Mar 24, 2026
5946c37
Merge branch 'dev' into fix/input-enter-keybindings
ariane-emory Mar 24, 2026
986fc14
Merge branch 'dev' into fix/input-enter-keybindings
ariane-emory Apr 3, 2026
918a194
Merge branch 'dev' into fix/input-enter-keybindings
ariane-emory Apr 12, 2026
53ed71c
fix: consume enter when prompt autocomplete selects
ariane-emory Apr 13, 2026
e302ba9
fix: honor configured submit key in autocomplete
ariane-emory Apr 16, 2026
0d10e9b
chore: inline autocomplete submit match
ariane-emory Apr 16, 2026
4a24601
chore: inline textarea binding checks
ariane-emory Apr 16, 2026
873773c
Merge branch 'dev' into fix/input-enter-keybindings
ariane-emory Apr 17, 2026
52da9a9
Merge branch 'dev' into fix/input-enter-keybindings
ariane-emory Apr 24, 2026
d7cc7d9
Merge branch 'dev' into fix/input-enter-keybindings
ariane-emory May 4, 2026
35a2985
Merge branch 'dev' into fix/input-enter-keybindings
ariane-emory May 11, 2026
7a0b7c5
Merge branch 'dev' into fix/autocompletion-input-enter-keybindings
ariane-emory May 18, 2026
3c122ea
Merge branch 'dev' into fix/autocompletion-input-enter-keybindings
ariane-emory May 30, 2026
b87d5c2
Merge branch 'dev' into fix/autocompletion-input-enter-keybindings
ariane-emory Jun 4, 2026
1cb96dc
fix(tui): respect input.submit keybinding in dialog prompts
ariane-emory Jun 12, 2026
8f2a817
fix(tui): respect input.submit keybinding in question panel
ariane-emory Jun 12, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -723,13 +723,19 @@ export function Autocomplete(props: {
},
},
],
bindings: tuiConfig.keybinds.gather("prompt.autocomplete", [
"prompt.autocomplete.prev",
"prompt.autocomplete.next",
"prompt.autocomplete.hide",
"prompt.autocomplete.select",
"prompt.autocomplete.complete",
]),
bindings: [
...tuiConfig.keybinds.gather("prompt.autocomplete", [
"prompt.autocomplete.prev",
"prompt.autocomplete.next",
"prompt.autocomplete.hide",
"prompt.autocomplete.complete",
]),
...tuiConfig.keybinds.get("input.submit").map((binding) => ({
...binding,
cmd: "prompt.autocomplete.select",
desc: binding.desc ?? "Select autocomplete item",
})),
],
}))

function show(mode: "@" | "/") {
Expand Down
28 changes: 22 additions & 6 deletions packages/opencode/src/cli/cmd/tui/routes/session/question.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ export function QuestionPrompt(props: { request: QuestionRequest; directory?: st
const other = createMemo(() => custom() && store.selected === options().length)
const input = createMemo(() => store.custom[store.tab] ?? "")
const multi = createMemo(() => question()?.multiple === true)
const submitKey = createMemo(() => {
const bindings = tuiConfig.keybinds.get("input.submit")
const key = bindings[0]?.key
if (!key) return "enter"
return typeof key === "string" ? key : "enter"
})
const customPicked = createMemo(() => {
const value = input()
if (!value) return false
Expand Down Expand Up @@ -158,8 +164,8 @@ export function QuestionPrompt(props: { request: QuestionRequest; directory?: st
},
},
...tuiConfig.keybinds.get("prompt.clear"),
{
key: "return",
...tuiConfig.keybinds.get("input.submit").map((binding) => ({
...binding,
desc: "Submit answer edit",
group: "Question",
cmd: () => {
Expand Down Expand Up @@ -202,7 +208,7 @@ export function QuestionPrompt(props: { request: QuestionRequest; directory?: st
pick(text, true)
setStore("editing", false)
},
},
})),
],
}))

Expand Down Expand Up @@ -249,7 +255,12 @@ export function QuestionPrompt(props: { request: QuestionRequest; directory?: st
},
...(confirm()
? [
{ key: "return", desc: "Submit answer", group: "Question", cmd: () => submit() },
...tuiConfig.keybinds.get("input.submit").map((binding) => ({
...binding,
desc: "Submit answer",
group: "Question",
cmd: () => submit(),
})),
{ key: "escape", desc: "Reject question", group: "Question", cmd: () => reject() },
...tuiConfig.keybinds.get("app.exit"),
]
Expand Down Expand Up @@ -277,7 +288,12 @@ export function QuestionPrompt(props: { request: QuestionRequest; directory?: st
},
{ key: "down", desc: "Next answer", group: "Question", cmd: () => moveTo((store.selected + 1) % total) },
{ key: "j", desc: "Next answer", group: "Question", cmd: () => moveTo((store.selected + 1) % total) },
{ key: "return", desc: "Select answer", group: "Question", cmd: () => selectOption() },
...tuiConfig.keybinds.get("input.submit").map((binding) => ({
...binding,
desc: "Select answer",
group: "Question",
cmd: () => selectOption(),
})),
{ key: "escape", desc: "Reject question", group: "Question", cmd: () => reject() },
...tuiConfig.keybinds.get("app.exit"),
]),
Expand Down Expand Up @@ -498,7 +514,7 @@ export function QuestionPrompt(props: { request: QuestionRequest; directory?: st
</text>
</Show>
<text fg={theme.text}>
enter{" "}
{submitKey()}{" "}
<span style={{ fg: theme.textMuted }}>
{confirm() ? "submit" : multi() ? "toggle" : single() ? "submit" : "confirm"}
</span>
Expand Down
6 changes: 5 additions & 1 deletion packages/opencode/src/cli/cmd/tui/ui/dialog-prompt.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,11 @@ export function DialogPrompt(props: DialogPromptProps) {
run: confirm,
},
],
bindings: tuiConfig.keybinds.gather("dialog.prompt", ["dialog.prompt.submit"]),
bindings: tuiConfig.keybinds.get("input.submit").map((binding) => ({
...binding,
cmd: "dialog.prompt.submit",
desc: binding.desc ?? "Submit dialog prompt",
})),
}))

onMount(() => {
Expand Down