File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
packages/opencode/src/cli/cmd/tui/routes/session Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -65,6 +65,7 @@ import { Editor } from "../../util/editor"
6565import stripAnsi from "strip-ansi"
6666import { Footer } from "./footer.tsx"
6767import { usePromptRef } from "../../context/prompt"
68+ import { useExit } from "../../context/exit"
6869import { Filesystem } from "@/util/filesystem"
6970import { PermissionPrompt } from "./permission"
7071import { DialogExportOptions } from "../../ui/dialog-export-options"
@@ -191,6 +192,15 @@ export function Session() {
191192 let prompt : PromptRef
192193 const keybind = useKeybind ( )
193194
195+ // Allow exit when in child session (prompt is hidden)
196+ const exit = useExit ( )
197+ useKeyboard ( ( evt ) => {
198+ if ( ! session ( ) ?. parentID ) return
199+ if ( keybind . match ( "app_exit" , evt ) ) {
200+ exit ( )
201+ }
202+ } )
203+
194204 // Helper: Find next visible message boundary in direction
195205 const findNextVisibleMessage = ( direction : "next" | "prev" ) : string | null => {
196206 const children = scroll . getChildren ( )
You can’t perform that action at this time.
0 commit comments