xonecas.io
64875
Mc

mini-coder / commit 4a79343

fix: ctrl+c cancels LLM turn, ctrl+d exits (unix convention)

Swap the key bindings in input.ts: Ctrl+C now returns { type: 'interrupt' }
(goes back to prompt / aborts in-flight LLM via SIGINT) and Ctrl+D returns
{ type: 'eof' } (exits). The help text and welcome screen already described
this behaviour correctly; the code just had the keys backwards.

Update mini-coder-idea.md to clarify the intended interaction.

xonecas2026-02-21 4a79343c69a6abba22bd8da34378f4fb91654468 parent 4aee40f

2 files changed

mini-coder-idea.md+1−1
@@ -24,7 +24,7 @@ conventions and not introduce more specs. (skills.sh installs to `.agents,AGENTS
2424 - Session management and command to create new/resume/list with local sqlite file.
2525 - Seamless shell integration with aliases and completions with `!` in prompt input.
2626 - Reference files, skills, agents from the working directory and global community configs with `@` in prompt input
27-- Cancel LLM request (interrupt the llm CTRL+d) and `/undo` last LLM turn
27+- Gracefully cancel an in-flight LLM request with `ctrl+c` (returns to prompt) and exit with `ctrl+d`. `/undo` last LLM turn.
2828 - `glob`, `grep`, `read`, `replace`,`insert`, `create`, `shell`, and `subagent` tools for LLMs
2929 - tool hooks support (do command automatically after certain tools)
3030 - Commands in CLI prompt:
src/cli/input.ts+2−2
@@ -256,12 +256,12 @@ export async function readline(opts: {
256256 // ── Control keys ──────────────────────────────────────────────────────
257257 if (raw === CTRL_C) {
258258 process.stdout.write("\n");
259- return { type: "eof" };
259+ return { type: "interrupt" };
260260 }
261261
262262 if (raw === CTRL_D) {
263263 process.stdout.write("\n");
264- return { type: "interrupt" };
264+ return { type: "eof" };
265265 }
266266
267267 if (raw === CTRL_A) {