Skip to content

The open source coding agent.

TypeScript

fix: exit aliases

Adam862141e8b22b
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 157a9c9469b..2fd4967a01b 100644
--- a/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx
+++ b/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx
@@ -410,6 +410,11 @@ export function Prompt(props: PromptProps) {
if (props.disabled) return
if (autocomplete.visible) return
if (!store.prompt.input) return
+ const trimmed = store.prompt.input.trim()
+ if (trimmed === "exit" || trimmed === "quit" || trimmed === ":q") {
+ exit()
+ return
+ }
const selectedModel = local.model.current()
if (!selectedModel) {
promptModelWarning()