index.ts 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. import { Global } from "../../../global"
  2. import { bootstrap } from "../../bootstrap"
  3. import { cmd } from "../cmd"
  4. import { ConfigCommand } from "./config"
  5. import { FileCommand } from "./file"
  6. import { LSPCommand } from "./lsp"
  7. import { RipgrepCommand } from "./ripgrep"
  8. import { ScrapCommand } from "./scrap"
  9. import { SkillCommand } from "./skill"
  10. import { SnapshotCommand } from "./snapshot"
  11. import { AgentCommand } from "./agent"
  12. export const DebugCommand = cmd({
  13. command: "debug",
  14. builder: (yargs) =>
  15. yargs
  16. .command(ConfigCommand)
  17. .command(LSPCommand)
  18. .command(RipgrepCommand)
  19. .command(FileCommand)
  20. .command(ScrapCommand)
  21. .command(SkillCommand)
  22. .command(SnapshotCommand)
  23. .command(AgentCommand)
  24. .command(PathsCommand)
  25. .command({
  26. command: "wait",
  27. async handler() {
  28. await bootstrap(process.cwd(), async () => {
  29. await new Promise((resolve) => setTimeout(resolve, 1_000 * 60 * 60 * 24))
  30. })
  31. },
  32. })
  33. .demandCommand(),
  34. async handler() {},
  35. })
  36. const PathsCommand = cmd({
  37. command: "paths",
  38. handler() {
  39. for (const [key, value] of Object.entries(Global.Path)) {
  40. console.log(key.padEnd(10), value)
  41. }
  42. },
  43. })