/**
 * 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();
		},
	});
}
