tui: skip abort on mini session close (#39067)

This commit is contained in:
Simon Klee 2026-07-27 10:42:37 +02:00 committed by GitHub
commit f14d78afeb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 26 additions and 2 deletions

View file

@ -75,7 +75,8 @@ export async function runPromptQueue(input: QueueInput): Promise<void> {
state.closed = true
state.queue.length = 0
state.ctrl?.abort()
// Ordinary turn signals map to session.interrupt; exiting should only detach the TUI.
if (state.active?.mode === "shell") state.ctrl?.abort()
admissionController.abort()
stop.resolve({ type: "closed" })
finish()
@ -198,7 +199,6 @@ export async function runPromptQueue(input: QueueInput): Promise<void> {
const next = await Promise.race([task, stop.promise])
if (next.type === "closed") {
ctrl.abort()
break
}