xonecas.io
64875
Mc

mini-coder / commit ca4c08d

feat: ESC also interrupts to prompt

xonecas2026-02-20 ca4c08ddb01fceeb562e0f678529c8745eb3b1c8 parent 4460b8f

1 file changed

src/cli/input.ts+4−0
@@ -243,6 +243,10 @@ export async function readline(opts: {
243243 renderPrompt();
244244 continue;
245245 }
246+ if (raw === ESC) {
247+ process.stdout.write("\n");
248+ return { type: "interrupt" };
249+ }
246250 continue;
247251 }