From 71bf8cf50d5da230b9489f109f189659cb6846c0 Mon Sep 17 00:00:00 2001 From: cthomas Date: Mon, 15 Dec 2025 17:07:58 -0800 Subject: [PATCH] feat: alias exit input to /exit (#221) --- src/cli/App.tsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/cli/App.tsx b/src/cli/App.tsx index 54b3075..0ab649d 100644 --- a/src/cli/App.tsx +++ b/src/cli/App.tsx @@ -1457,9 +1457,14 @@ export default function App({ // This ensures that after an interrupt, new messages can be sent userCancelledRef.current = false; + let aliasedMsg = msg; + if (msg === "exit") { + aliasedMsg = "/exit"; + } + // Handle commands (messages starting with "/") - if (msg.startsWith("/")) { - const trimmed = msg.trim(); + if (aliasedMsg.startsWith("/")) { + const trimmed = aliasedMsg.trim(); // Special handling for /model command - opens selector if (trimmed === "/model") {