fix(tui): preserve shell after Ctrl+C (#5502)

This commit is contained in:
chengyongru
2026-08-24 14:32:48 +08:00
committed by GitHub
parent 09d3bd76c9
commit 7f288a49fc
2 changed files with 8 additions and 3 deletions
+4 -1
View File
@@ -1653,7 +1653,10 @@ export class NanobotTui {
this.clearComposer()
this.status.content = this.readyStatus()
} else {
this.quit()
// Finish dispatching the raw ETX before destroy() restores terminal input.
// Releasing the terminal from inside this callback can leak the same Ctrl+C
// to the parent shell on Windows terminals.
setTimeout(() => this.quit(), 0)
}
return
}