diff options
| author | Dax Raad <[email protected]> | 2025-11-26 20:13:20 -0500 |
|---|---|---|
| committer | Dax Raad <[email protected]> | 2025-11-26 20:13:20 -0500 |
| commit | 9c237f0bfb9335c8ce6c793c4eee0e17ef4d775e (patch) | |
| tree | 7e7cef8a33c5c83e17dd64fa9494b6f87cbb69e1 | |
| parent | 63bfe767200f4caf9a6c808af085e293f9816e99 (diff) | |
| download | opencode-9c237f0bfb9335c8ce6c793c4eee0e17ef4d775e.tar.gz opencode-9c237f0bfb9335c8ce6c793c4eee0e17ef4d775e.zip | |
temporarily restrict codesearch and websearch to opencode zen users. need to figure out how to opt out for enterprise users who do not want this
| -rw-r--r-- | packages/opencode/src/tool/registry.ts | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/packages/opencode/src/tool/registry.ts b/packages/opencode/src/tool/registry.ts index adeab43f6..9c8dab17b 100644 --- a/packages/opencode/src/tool/registry.ts +++ b/packages/opencode/src/tool/registry.ts @@ -108,13 +108,18 @@ export namespace ToolRegistry { return all().then((x) => x.map((t) => t.id)) } - export async function tools(_providerID: string, _modelID: string) { + export async function tools(providerID: string, _modelID: string) { const tools = await all() const result = await Promise.all( - tools.map(async (t) => ({ - id: t.id, - ...(await t.init()), - })), + tools + .filter((t) => { + if (t.id === "codesearch" || t.id === "websearch") return providerID === "opencode" + return true + }) + .map(async (t) => ({ + id: t.id, + ...(await t.init()), + })), ) return result } |
