The open source coding agent.
TypeScript
only exit app when prompt is empty, otherwise fallthrough, fix #5457
Sebastian Herrlinger43202f2820d6
diff --git a/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx b/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsxindex 669ed189795..1ea701c83d7 100644--- a/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx+++ b/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx@@ -732,8 +732,12 @@ export function Prompt(props: PromptProps) {return}if (keybind.match("app_exit", e)) {- await exit()- return+ if (store.prompt.input === "") {+ await exit()+ // Don't preventDefault - let textarea potentially handle the event+ e.preventDefault()+ return+ }}if (e.name === "!" && input.visualCursor.offset === 0) {setStore("mode", "shell")