diff options
| author | Aiden Cline <[email protected]> | 2025-12-11 14:58:44 -0600 |
|---|---|---|
| committer | Aiden Cline <[email protected]> | 2025-12-11 14:58:46 -0600 |
| commit | 4e92f54415c914a5ff73c3d682edc322e2151ef2 (patch) | |
| tree | a35ce2ebaeac57bfc934f8c35d3a838e0927a194 | |
| parent | f8dc740c61558d69e668d10d610296b563fedada (diff) | |
| download | opencode-4e92f54415c914a5ff73c3d682edc322e2151ef2.tar.gz opencode-4e92f54415c914a5ff73c3d682edc322e2151ef2.zip | |
tweak: bash tool, try to prevent the cd spam
| -rw-r--r-- | packages/opencode/src/tool/bash.ts | 2 | ||||
| -rw-r--r-- | packages/opencode/src/tool/bash.txt | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/packages/opencode/src/tool/bash.ts b/packages/opencode/src/tool/bash.ts index cd1b3b982..0c099fe80 100644 --- a/packages/opencode/src/tool/bash.ts +++ b/packages/opencode/src/tool/bash.ts @@ -82,7 +82,7 @@ export const BashTool = Tool.define("bash", async () => { log.info("bash tool using shell", { shell }) return { - description: DESCRIPTION, + description: DESCRIPTION.replaceAll("${directory}", Instance.directory), parameters: z.object({ command: z.string().describe("The command to execute"), timeout: z.number().describe("Optional timeout in milliseconds").optional(), diff --git a/packages/opencode/src/tool/bash.txt b/packages/opencode/src/tool/bash.txt index 8eadc500b..eff52b1d3 100644 --- a/packages/opencode/src/tool/bash.txt +++ b/packages/opencode/src/tool/bash.txt @@ -1,5 +1,7 @@ Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures. +All commands run in ${directory} by default. Use the `workdir` parameter if you need to run a command in a different directory. + Before executing the command, please follow these steps: 1. Directory Verification: |
