Skip to content

Commit 9d03d44

Browse files
chore: generate
1 parent 7ab1c1c commit 9d03d44

3 files changed

Lines changed: 17 additions & 8 deletions

File tree

packages/opencode/src/tool/shell.ts

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,20 @@ const FILES = new Set([
5050
"new-item",
5151
"rename-item",
5252
])
53-
const CMD_FILES = new Set(["copy", "del", "dir", "erase", "md", "mkdir", "move", "rd", "ren", "rename", "rmdir", "type"])
53+
const CMD_FILES = new Set([
54+
"copy",
55+
"del",
56+
"dir",
57+
"erase",
58+
"md",
59+
"mkdir",
60+
"move",
61+
"rd",
62+
"ren",
63+
"rename",
64+
"rmdir",
65+
"type",
66+
])
5467
const FLAGS = new Set(["-destination", "-literalpath", "-path"])
5568
const SWITCHES = new Set(["-confirm", "-debug", "-force", "-nonewline", "-recurse", "-verbose", "-whatif"])
5669

packages/opencode/src/tool/shell/prompt.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,10 @@ const PS = new Set(["powershell", "pwsh"])
88
const CMD = new Set(["cmd"])
99

1010
const descriptions = {
11-
bash:
12-
"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'",
11+
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'",
1312
powershell:
1413
'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',
15-
cmd:
16-
'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',
14+
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',
1715
}
1816

1917
export type Limits = {

packages/opencode/test/tool/shell.test.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -757,9 +757,7 @@ describe("tool.shell permissions", () => {
757757
)
758758
const extDirReq = requests.find((r) => r.permission === "external_directory")
759759
expect(extDirReq).toBeDefined()
760-
expect(extDirReq!.patterns).toContain(
761-
Filesystem.normalizePathPattern(path.join(process.env.WINDIR!, "*")),
762-
)
760+
expect(extDirReq!.patterns).toContain(Filesystem.normalizePathPattern(path.join(process.env.WINDIR!, "*")))
763761
},
764762
})
765763
}),

0 commit comments

Comments
 (0)