run formatter

This commit is contained in:
Dax Raad
2025-05-31 14:41:00 -04:00
parent 6df19f1828
commit 3b746162d2
52 changed files with 1376 additions and 1390 deletions

View File

@@ -1,8 +1,8 @@
import { z } from "zod";
import { Tool } from "./tool";
import path from "path";
import { LSP } from "../lsp";
import { App } from "../app/app";
import { z } from "zod"
import { Tool } from "./tool"
import path from "path"
import { LSP } from "../lsp"
import { App } from "../app/app"
export const LspDiagnosticTool = Tool.define({
name: "opencode.lsp_diagnostic",
@@ -34,13 +34,13 @@ TIPS:
path: z.string().describe("The path to the file to get diagnostics."),
}),
execute: async (args) => {
const app = await App.use();
const app = await App.use()
const normalized = path.isAbsolute(args.path)
? args.path
: path.join(app.root, args.path);
await LSP.file(normalized);
const diagnostics = await LSP.diagnostics();
const file = diagnostics[normalized];
: path.join(app.root, args.path)
await LSP.file(normalized)
const diagnostics = await LSP.diagnostics()
const file = diagnostics[normalized]
return {
metadata: {
diagnostics,
@@ -48,6 +48,6 @@ TIPS:
output: file?.length
? file.map(LSP.Diagnostic.pretty).join("\n")
: "No errors found",
};
}
},
});
})