Files
sproutclaw/.pi/agent/extensions/exit-command/index.ts
root cf5edd6394
Some checks failed
CI / build-check-test (push) Has been cancelled
feat(sproutclaw): modularize webui, extensions, and agent config layout
Restructure local extensions into per-feature directories, split WebUI
into backend modules with slash commands and systemd support, and track
prompts/skills under .pi/agent for portable Gitea deployment.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-10 16:57:08 +08:00

18 lines
370 B
TypeScript

/**
* Exit Command Extension
*
* 添加 /exit 命令用于退出 pi Agent
*/
import type { ExtensionAPI } from "@mariozechner/pi-coding-agent";
export default function (pi: ExtensionAPI) {
pi.registerCommand("exit", {
description: "退出 pi Agent",
handler: async (_args, ctx) => {
ctx.ui.notify("正在退出...", "info");
ctx.shutdown();
},
});
}