diff options
Diffstat (limited to 'packages')
| -rw-r--r-- | packages/opencode/package.json | 3 | ||||
| -rw-r--r-- | packages/opencode/src/tool/bash.ts | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/packages/opencode/package.json b/packages/opencode/package.json index c8c502ed6..7e1775d16 100644 --- a/packages/opencode/package.json +++ b/packages/opencode/package.json @@ -46,11 +46,12 @@ "hono-openapi": "0.4.8", "isomorphic-git": "1.32.1", "jsonc-parser": "3.3.1", + "minimatch": "10.0.3", "open": "10.1.2", "remeda": "catalog:", - "turndown": "7.2.0", "tree-sitter": "0.22.4", "tree-sitter-bash": "0.23.3", + "turndown": "7.2.0", "vscode-jsonrpc": "8.2.1", "xdg-basedir": "5.1.0", "yargs": "18.0.0", diff --git a/packages/opencode/src/tool/bash.ts b/packages/opencode/src/tool/bash.ts index 673018cbc..0e18525d7 100644 --- a/packages/opencode/src/tool/bash.ts +++ b/packages/opencode/src/tool/bash.ts @@ -7,6 +7,7 @@ import { Config } from "../config/config" import { Filesystem } from "../util/filesystem" import path from "path" import { lazy } from "../util/lazy" +import { minimatch } from "minimatch" const MAX_OUTPUT_LENGTH = 30000 const DEFAULT_TIMEOUT = 1 * 60 * 1000 @@ -84,7 +85,7 @@ export const BashTool = Tool.define("bash", { if (!needsAsk && command[0] !== "cd") { const ask = (() => { for (const [pattern, value] of Object.entries(permissions)) { - if (new Bun.Glob(pattern).match(node.text)) { + if (minimatch(node.text, pattern)) { return value } } |
