import type { ExtensionAPI } from "@mariozechner/pi-coding-agent"; export default function (pi: ExtensionAPI) { pi.registerCommand("tools", { description: "List available and active tools", handler: async (_args, ctx) => { const allTools = pi.getAllTools(); const activeTools = new Set(pi.getActiveTools()); const lines = allTools .map((tool) => { const status = activeTools.has(tool.name) ? "active" : "inactive"; return `- ${tool.name} (${status})${tool.description ? `: ${tool.description}` : ""}`; }) .join("\n"); ctx.ui.notify(lines || "No tools registered.", "info"); }, }); }