|
@@ -22,7 +22,6 @@ import { Plugin } from "../plugin"
|
|
|
import { Provider } from "@/provider/provider"
|
|
import { Provider } from "@/provider/provider"
|
|
|
import { ProviderID, type ModelID } from "../provider/schema"
|
|
import { ProviderID, type ModelID } from "../provider/schema"
|
|
|
import { WebSearchTool } from "./websearch"
|
|
import { WebSearchTool } from "./websearch"
|
|
|
-import { CodeSearchTool } from "./codesearch"
|
|
|
|
|
import { Flag } from "@opencode-ai/core/flag/flag"
|
|
import { Flag } from "@opencode-ai/core/flag/flag"
|
|
|
import * as Log from "@opencode-ai/core/util/log"
|
|
import * as Log from "@opencode-ai/core/util/log"
|
|
|
import { LspTool } from "./lsp"
|
|
import { LspTool } from "./lsp"
|
|
@@ -108,7 +107,6 @@ export const layer: Layer.Layer<
|
|
|
const webfetch = yield* WebFetchTool
|
|
const webfetch = yield* WebFetchTool
|
|
|
const websearch = yield* WebSearchTool
|
|
const websearch = yield* WebSearchTool
|
|
|
const bash = yield* BashTool
|
|
const bash = yield* BashTool
|
|
|
- const codesearch = yield* CodeSearchTool
|
|
|
|
|
const globtool = yield* GlobTool
|
|
const globtool = yield* GlobTool
|
|
|
const writetool = yield* WriteTool
|
|
const writetool = yield* WriteTool
|
|
|
const edit = yield* EditTool
|
|
const edit = yield* EditTool
|
|
@@ -198,7 +196,6 @@ export const layer: Layer.Layer<
|
|
|
fetch: Tool.init(webfetch),
|
|
fetch: Tool.init(webfetch),
|
|
|
todo: Tool.init(todo),
|
|
todo: Tool.init(todo),
|
|
|
search: Tool.init(websearch),
|
|
search: Tool.init(websearch),
|
|
|
- code: Tool.init(codesearch),
|
|
|
|
|
skill: Tool.init(skilltool),
|
|
skill: Tool.init(skilltool),
|
|
|
patch: Tool.init(patchtool),
|
|
patch: Tool.init(patchtool),
|
|
|
question: Tool.init(question),
|
|
question: Tool.init(question),
|
|
@@ -221,7 +218,6 @@ export const layer: Layer.Layer<
|
|
|
tool.fetch,
|
|
tool.fetch,
|
|
|
tool.todo,
|
|
tool.todo,
|
|
|
tool.search,
|
|
tool.search,
|
|
|
- tool.code,
|
|
|
|
|
tool.skill,
|
|
tool.skill,
|
|
|
tool.patch,
|
|
tool.patch,
|
|
|
...(Flag.OPENCODE_EXPERIMENTAL_LSP_TOOL ? [tool.lsp] : []),
|
|
...(Flag.OPENCODE_EXPERIMENTAL_LSP_TOOL ? [tool.lsp] : []),
|
|
@@ -278,7 +274,7 @@ export const layer: Layer.Layer<
|
|
|
|
|
|
|
|
const tools: Interface["tools"] = Effect.fn("ToolRegistry.tools")(function* (input) {
|
|
const tools: Interface["tools"] = Effect.fn("ToolRegistry.tools")(function* (input) {
|
|
|
const filtered = (yield* all()).filter((tool) => {
|
|
const filtered = (yield* all()).filter((tool) => {
|
|
|
- if (tool.id === CodeSearchTool.id || tool.id === WebSearchTool.id) {
|
|
|
|
|
|
|
+ if (tool.id === WebSearchTool.id) {
|
|
|
return input.providerID === ProviderID.opencode || Flag.OPENCODE_ENABLE_EXA
|
|
return input.providerID === ProviderID.opencode || Flag.OPENCODE_ENABLE_EXA
|
|
|
}
|
|
}
|
|
|
|
|
|