mirror of
https://github.com/aljazceru/opencode.git
synced 2025-12-23 02:34:21 +01:00
16 lines
435 B
TypeScript
16 lines
435 B
TypeScript
import { App } from "../../app/app"
|
|
import { LSP } from "../../lsp"
|
|
import { cmd } from "./cmd"
|
|
|
|
export const ScrapCommand = cmd({
|
|
command: "scrap <file>",
|
|
builder: (yargs) =>
|
|
yargs.positional("file", { type: "string", demandOption: true }),
|
|
async handler(args) {
|
|
await App.provide({ cwd: process.cwd() }, async () => {
|
|
await LSP.touchFile(args.file, true)
|
|
console.log(await LSP.diagnostics())
|
|
})
|
|
},
|
|
})
|