mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-03-31 22:32:28 +00:00
42 lines
1.1 KiB
TypeScript
42 lines
1.1 KiB
TypeScript
import { Global } from "../../../global"
|
|
import { bootstrap } from "../../bootstrap"
|
|
import { cmd } from "../cmd"
|
|
import { ConfigCommand } from "./config"
|
|
import { FileCommand } from "./file"
|
|
import { LSPCommand } from "./lsp"
|
|
import { RipgrepCommand } from "./ripgrep"
|
|
import { ScrapCommand } from "./scrap"
|
|
import { SnapshotCommand } from "./snapshot"
|
|
|
|
export const DebugCommand = cmd({
|
|
command: "debug",
|
|
builder: (yargs) =>
|
|
yargs
|
|
.command(ConfigCommand)
|
|
.command(LSPCommand)
|
|
.command(RipgrepCommand)
|
|
.command(FileCommand)
|
|
.command(ScrapCommand)
|
|
.command(SnapshotCommand)
|
|
.command(PathsCommand)
|
|
.command({
|
|
command: "wait",
|
|
async handler() {
|
|
await bootstrap(process.cwd(), async () => {
|
|
await new Promise((resolve) => setTimeout(resolve, 1_000 * 60 * 60 * 24))
|
|
})
|
|
},
|
|
})
|
|
.demandCommand(),
|
|
async handler() {},
|
|
})
|
|
|
|
const PathsCommand = cmd({
|
|
command: "paths",
|
|
handler() {
|
|
for (const [key, value] of Object.entries(Global.Path)) {
|
|
console.log(key.padEnd(10), value)
|
|
}
|
|
},
|
|
})
|