Skip to content

Commit 0bf40fa

Browse files
committed
core: prevent codesearch and websearch tools when webfetch permission is denied
1 parent c90987c commit 0bf40fa

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/opencode/src/tool/registry.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,8 @@ export namespace ToolRegistry {
140140
}
141141
if (agent.permission.webfetch === "deny") {
142142
result["webfetch"] = false
143+
result["codesearch"] = false
144+
result["websearch"] = false
143145
}
144146

145147
return result

0 commit comments

Comments
 (0)