summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAiden Cline <[email protected]>2025-12-26 14:31:22 -0600
committerAiden Cline <[email protected]>2025-12-26 14:31:22 -0600
commit1e2ef07c9789b8f156cc8ad366111149b8fba255 (patch)
tree97c353d85f632a79e2ddebe7d937214f55f7b16a
parent664e6bf2d06fee041ec71ac8af84b031c5333ea1 (diff)
downloadopencode-1e2ef07c9789b8f156cc8ad366111149b8fba255.tar.gz
opencode-1e2ef07c9789b8f156cc8ad366111149b8fba255.zip
chore: kill some unused tools
-rw-r--r--packages/opencode/src/tool/lsp-diagnostics.ts26
-rw-r--r--packages/opencode/src/tool/lsp-diagnostics.txt1
-rw-r--r--packages/opencode/src/tool/lsp-hover.ts31
-rw-r--r--packages/opencode/src/tool/lsp-hover.txt1
4 files changed, 0 insertions, 59 deletions
diff --git a/packages/opencode/src/tool/lsp-diagnostics.ts b/packages/opencode/src/tool/lsp-diagnostics.ts
deleted file mode 100644
index 18a6868b6..000000000
--- a/packages/opencode/src/tool/lsp-diagnostics.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-import z from "zod"
-import { Tool } from "./tool"
-import path from "path"
-import { LSP } from "../lsp"
-import DESCRIPTION from "./lsp-diagnostics.txt"
-import { Instance } from "../project/instance"
-
-export const LspDiagnosticTool = Tool.define("lsp_diagnostics", {
- description: DESCRIPTION,
- parameters: z.object({
- path: z.string().describe("The path to the file to get diagnostics."),
- }),
- execute: async (args) => {
- const normalized = path.isAbsolute(args.path) ? args.path : path.join(Instance.directory, args.path)
- await LSP.touchFile(normalized, true)
- const diagnostics = await LSP.diagnostics()
- const file = diagnostics[normalized]
- return {
- title: path.relative(Instance.worktree, normalized),
- metadata: {
- diagnostics,
- },
- output: file?.length ? file.map(LSP.Diagnostic.pretty).join("\n") : "No errors found",
- }
- },
-})
diff --git a/packages/opencode/src/tool/lsp-diagnostics.txt b/packages/opencode/src/tool/lsp-diagnostics.txt
deleted file mode 100644
index 88a50f634..000000000
--- a/packages/opencode/src/tool/lsp-diagnostics.txt
+++ /dev/null
@@ -1 +0,0 @@
-do not use
diff --git a/packages/opencode/src/tool/lsp-hover.ts b/packages/opencode/src/tool/lsp-hover.ts
deleted file mode 100644
index 7ef856cc5..000000000
--- a/packages/opencode/src/tool/lsp-hover.ts
+++ /dev/null
@@ -1,31 +0,0 @@
-import z from "zod"
-import { Tool } from "./tool"
-import path from "path"
-import { LSP } from "../lsp"
-import DESCRIPTION from "./lsp-hover.txt"
-import { Instance } from "../project/instance"
-
-export const LspHoverTool = Tool.define("lsp_hover", {
- description: DESCRIPTION,
- parameters: z.object({
- file: z.string().describe("The path to the file to get diagnostics."),
- line: z.number().describe("The line number to get diagnostics."),
- character: z.number().describe("The character number to get diagnostics."),
- }),
- execute: async (args) => {
- const file = path.isAbsolute(args.file) ? args.file : path.join(Instance.directory, args.file)
- await LSP.touchFile(file, true)
- const result = await LSP.hover({
- ...args,
- file,
- })
-
- return {
- title: path.relative(Instance.worktree, file) + ":" + args.line + ":" + args.character,
- metadata: {
- result,
- },
- output: JSON.stringify(result, null, 2),
- }
- },
-})
diff --git a/packages/opencode/src/tool/lsp-hover.txt b/packages/opencode/src/tool/lsp-hover.txt
deleted file mode 100644
index 88a50f634..000000000
--- a/packages/opencode/src/tool/lsp-hover.txt
+++ /dev/null
@@ -1 +0,0 @@
-do not use