From 09c5aa33ee95745be9ad82a7f44049cc09457a60 Mon Sep 17 00:00:00 2001 From: jonathancostin <66714927+jonathancostin@users.noreply.github.com> Date: Wed, 11 Mar 2026 16:45:50 -0500 Subject: [PATCH] feat: add /exit command to kill GSD process immediately (#60) Registers /exit as a slash command that calls process.exit(0). Quick way to quit without typing /quit. --- src/resources/extensions/gsd/index.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/resources/extensions/gsd/index.ts b/src/resources/extensions/gsd/index.ts index caa3ed9bd..3cd6c8d95 100644 --- a/src/resources/extensions/gsd/index.ts +++ b/src/resources/extensions/gsd/index.ts @@ -63,6 +63,14 @@ export default function (pi: ExtensionAPI) { registerGSDCommand(pi); registerWorktreeCommand(pi); + // ── /exit — kill the process immediately ────────────────────────────── + pi.registerCommand("exit", { + description: "Exit GSD immediately", + handler: async (_ctx) => { + process.exit(0); + }, + }); + // ── Dynamic-cwd bash tool with default timeout ──────────────────────── // The built-in bash tool captures cwd at startup. This replacement uses // a spawnHook to read process.cwd() dynamically so that process.chdir()