mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-03-31 22:32:28 +00:00
feat: home dir in app info
This commit is contained in:
20
packages/opencode/src/cli/cmd/debug/app.ts
Normal file
20
packages/opencode/src/cli/cmd/debug/app.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import { App } from "../../../app/app"
|
||||
import { bootstrap } from "../../bootstrap"
|
||||
import { cmd } from "../cmd"
|
||||
|
||||
const AppInfoCommand = cmd({
|
||||
command: "info",
|
||||
builder: (yargs) => yargs,
|
||||
async handler() {
|
||||
await bootstrap({ cwd: process.cwd() }, async () => {
|
||||
const app = App.info()
|
||||
console.log(JSON.stringify(app, null, 2))
|
||||
})
|
||||
},
|
||||
})
|
||||
|
||||
export const AppCommand = cmd({
|
||||
command: "app",
|
||||
builder: (yargs) => yargs.command(AppInfoCommand).demandCommand(),
|
||||
async handler() {},
|
||||
})
|
||||
@@ -1,6 +1,7 @@
|
||||
import { Global } from "../../../global"
|
||||
import { bootstrap } from "../../bootstrap"
|
||||
import { cmd } from "../cmd"
|
||||
import { AppCommand } from "./app"
|
||||
import { FileCommand } from "./file"
|
||||
import { LSPCommand } from "./lsp"
|
||||
import { RipgrepCommand } from "./ripgrep"
|
||||
@@ -11,6 +12,7 @@ export const DebugCommand = cmd({
|
||||
command: "debug",
|
||||
builder: (yargs) =>
|
||||
yargs
|
||||
.command(AppCommand)
|
||||
.command(LSPCommand)
|
||||
.command(RipgrepCommand)
|
||||
.command(FileCommand)
|
||||
|
||||
Reference in New Issue
Block a user