Skip to content

Commit db83c9c

Browse files
rekram1-nodee-n-0
authored andcommitted
tweak: adjust bash tool description to increase cache hit rates between projects (anomalyco#19487)
1 parent c5b466a commit db83c9c

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

packages/opencode/src/tool/bash.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,7 @@ export const BashTool = Tool.define("bash", async () => {
6767
log.info("bash tool using shell", { shell })
6868

6969
return {
70-
description: DESCRIPTION.replaceAll("${directory}", Instance.directory)
71-
.replaceAll("${maxLines}", String(Truncate.MAX_LINES))
70+
description: DESCRIPTION.replaceAll("${maxLines}", String(Truncate.MAX_LINES))
7271
.replaceAll("${maxBytes}", String(Truncate.MAX_BYTES))
7372
.replaceAll(
7473
"${unsandboxed}",

packages/opencode/src/tool/bash.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.
22

3-
All commands run in ${directory} by default. Use the `workdir` parameter if you need to run a command in a different directory. AVOID using `cd <directory> && <command>` patterns - use `workdir` instead.
3+
All commands run in current working directory by default. Use the `workdir` parameter if you need to run a command in a different directory. AVOID using `cd <directory> && <command>` patterns - use `workdir` instead.
44

55
IMPORTANT: This tool is for terminal operations like git, npm, docker, etc. DO NOT use it for file operations (reading, writing, editing, searching, finding files) - use the specialized tools for this instead.
66

0 commit comments

Comments
 (0)