cloudaxe-opencode/packages/opencode/src/cli/cmd/scrap.ts

17 lines
493 B
TypeScript
Raw Normal View History

2025-06-06 03:42:04 +00:00
import { App } from "../../app/app"
2025-06-13 04:06:15 +00:00
import { LSP } from "../../lsp"
2025-06-06 03:42:04 +00:00
import { VERSION } from "../version"
import { cmd } from "./cmd"
export const ScrapCommand = cmd({
command: "scrap <file>",
builder: (yargs) =>
yargs.positional("file", { type: "string", demandOption: true }),
2025-06-13 04:06:15 +00:00
async handler(args) {
await App.provide({ cwd: process.cwd(), version: VERSION }, async (app) => {
2025-06-13 04:06:15 +00:00
await LSP.touchFile(args.file, true)
console.log(await LSP.diagnostics())
})
2025-06-06 03:42:04 +00:00
},
})