summaryrefslogtreecommitdiffhomepage
path: root/packages
diff options
context:
space:
mode:
authoropencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>2026-05-02 23:20:15 +0000
committeropencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>2026-05-02 23:20:15 +0000
commit9d03d4419e4fada267dc522c0ae55b488ab85d3b (patch)
treea45d5457618e04f7a7c2d014645fa2c6256e12c4 /packages
parent7ab1c1c74a93162b3ca6fb60b2739be7a029365d (diff)
downloadopencode-9d03d4419e4fada267dc522c0ae55b488ab85d3b.tar.gz
opencode-9d03d4419e4fada267dc522c0ae55b488ab85d3b.zip
chore: generate
Diffstat (limited to 'packages')
-rw-r--r--packages/opencode/src/tool/shell.ts15
-rw-r--r--packages/opencode/src/tool/shell/prompt.ts6
-rw-r--r--packages/opencode/test/tool/shell.test.ts4
3 files changed, 17 insertions, 8 deletions
diff --git a/packages/opencode/src/tool/shell.ts b/packages/opencode/src/tool/shell.ts
index bb2e4e58d..d3ca54268 100644
--- a/packages/opencode/src/tool/shell.ts
+++ b/packages/opencode/src/tool/shell.ts
@@ -50,7 +50,20 @@ const FILES = new Set([
"new-item",
"rename-item",
])
-const CMD_FILES = new Set(["copy", "del", "dir", "erase", "md", "mkdir", "move", "rd", "ren", "rename", "rmdir", "type"])
+const CMD_FILES = new Set([
+ "copy",
+ "del",
+ "dir",
+ "erase",
+ "md",
+ "mkdir",
+ "move",
+ "rd",
+ "ren",
+ "rename",
+ "rmdir",
+ "type",
+])
const FLAGS = new Set(["-destination", "-literalpath", "-path"])
const SWITCHES = new Set(["-confirm", "-debug", "-force", "-nonewline", "-recurse", "-verbose", "-whatif"])
diff --git a/packages/opencode/src/tool/shell/prompt.ts b/packages/opencode/src/tool/shell/prompt.ts
index 77d0f4b5e..45c637863 100644
--- a/packages/opencode/src/tool/shell/prompt.ts
+++ b/packages/opencode/src/tool/shell/prompt.ts
@@ -8,12 +8,10 @@ const PS = new Set(["powershell", "pwsh"])
const CMD = new Set(["cmd"])
const descriptions = {
- bash:
- "Clear, concise description of what this command does in 5-10 words. Examples:\nInput: ls\nOutput: Lists files in current directory\n\nInput: git status\nOutput: Shows working tree status\n\nInput: npm install\nOutput: Installs package dependencies\n\nInput: mkdir foo\nOutput: Creates directory 'foo'",
+ bash: "Clear, concise description of what this command does in 5-10 words. Examples:\nInput: ls\nOutput: Lists files in current directory\n\nInput: git status\nOutput: Shows working tree status\n\nInput: npm install\nOutput: Installs package dependencies\n\nInput: mkdir foo\nOutput: Creates directory 'foo'",
powershell:
'Clear, concise description of what this command does in 5-10 words. Examples:\nInput: Get-ChildItem -LiteralPath "."\nOutput: Lists current directory\n\nInput: git status\nOutput: Shows working tree status\n\nInput: npm install\nOutput: Installs package dependencies\n\nInput: New-Item -ItemType Directory -Path "tmp"\nOutput: Creates directory tmp',
- cmd:
- 'Clear, concise description of what this command does in 5-10 words. Examples:\nInput: dir\nOutput: Lists current directory\n\nInput: if exist "package.json" type "package.json"\nOutput: Prints package.json when it exists\n\nInput: mkdir tmp\nOutput: Creates directory tmp',
+ cmd: 'Clear, concise description of what this command does in 5-10 words. Examples:\nInput: dir\nOutput: Lists current directory\n\nInput: if exist "package.json" type "package.json"\nOutput: Prints package.json when it exists\n\nInput: mkdir tmp\nOutput: Creates directory tmp',
}
export type Limits = {
diff --git a/packages/opencode/test/tool/shell.test.ts b/packages/opencode/test/tool/shell.test.ts
index 43295e2d5..e68d16ba8 100644
--- a/packages/opencode/test/tool/shell.test.ts
+++ b/packages/opencode/test/tool/shell.test.ts
@@ -757,9 +757,7 @@ describe("tool.shell permissions", () => {
)
const extDirReq = requests.find((r) => r.permission === "external_directory")
expect(extDirReq).toBeDefined()
- expect(extDirReq!.patterns).toContain(
- Filesystem.normalizePathPattern(path.join(process.env.WINDIR!, "*")),
- )
+ expect(extDirReq!.patterns).toContain(Filesystem.normalizePathPattern(path.join(process.env.WINDIR!, "*")))
},
})
}),