fix(coding-agent): handle ctrl+z on windows closes #3191
This commit is contained in:
@@ -52,7 +52,10 @@ export const KEYBINDINGS = {
|
||||
"app.interrupt": { defaultKeys: "escape", description: "Cancel or abort" },
|
||||
"app.clear": { defaultKeys: "ctrl+c", description: "Clear editor" },
|
||||
"app.exit": { defaultKeys: "ctrl+d", description: "Exit when editor is empty" },
|
||||
"app.suspend": { defaultKeys: "ctrl+z", description: "Suspend to background" },
|
||||
"app.suspend": {
|
||||
defaultKeys: process.platform === "win32" ? [] : "ctrl+z",
|
||||
description: "Suspend to background",
|
||||
},
|
||||
"app.thinking.cycle": {
|
||||
defaultKeys: "shift+tab",
|
||||
description: "Cycle thinking level",
|
||||
|
||||
@@ -2958,6 +2958,11 @@ export class InteractiveMode {
|
||||
}
|
||||
|
||||
private handleCtrlZ(): void {
|
||||
if (process.platform === "win32") {
|
||||
this.showStatus("Suspend to background is not supported on Windows");
|
||||
return;
|
||||
}
|
||||
|
||||
// Keep the event loop alive while suspended. Without this, stopping the TUI
|
||||
// can leave Node with no ref'ed handles, causing the process to exit on fg
|
||||
// before the SIGCONT handler gets a chance to restore the terminal.
|
||||
|
||||
Reference in New Issue
Block a user