import { CommandOutputHelper } from "./utils/command-output.js";
const documentationCommands = [
  {
    name: "docs",
    description: "Open Dexto documentation in browser",
    usage: "/docs",
    category: "Documentation",
    aliases: ["doc"],
    handler: async (_args, _agent, _ctx) => {
      const docsUrl = "https://docs.dexto.ai/docs/category/getting-started";
      try {
        const { spawn } = await import("child_process");
        const command = process.platform === "darwin" ? "open" : process.platform === "win32" ? "start" : "xdg-open";
        spawn(command, [docsUrl], { detached: true, stdio: "ignore" });
        return true;
      } catch {
        return CommandOutputHelper.error(
          new Error(`Could not open browser. Visit: ${docsUrl}`),
          "Failed to open documentation"
        );
      }
    }
  }
];
export {
  documentationCommands
};
