feat: alias exit input to /exit (#221)

This commit is contained in:
cthomas
2025-12-15 17:07:58 -08:00
committed by GitHub
parent 2a5d8dacb1
commit 71bf8cf50d

View File

@@ -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") {