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.
This commit is contained in:
jonathancostin 2026-03-11 16:45:50 -05:00 committed by GitHub
parent 3b9a8c1c63
commit 09c5aa33ee

View file

@ -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()