Skip to content

Commit d5ebfad

Browse files
committed
.
1 parent c16a0e0 commit d5ebfad

8 files changed

Lines changed: 15 additions & 16 deletions

File tree

packages/app/src/pages/session/composer/session-permission-dock.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@ export function SessionPermissionDock(props: {
1414

1515
const toolDescription = () => {
1616
const key = `settings.permissions.tool.${props.request.permission}.description`
17-
const fallback = props.request.permission === "shell" ? "settings.permissions.tool.bash.description" : key
1817
const value = language.t(key as Parameters<typeof language.t>[0])
19-
if (value === key) return fallback === key ? "" : language.t(fallback as Parameters<typeof language.t>[0])
18+
if (value === key) return ""
2019
return value
2120
}
2221

packages/opencode/src/agent/agent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ export const layer = Layer.effect(
166166
grep: "allow",
167167
glob: "allow",
168168
list: "allow",
169-
shell: "allow",
169+
bash: "allow",
170170
webfetch: "allow",
171171
websearch: "allow",
172172
codesearch: "allow",

packages/opencode/src/agent/prompt/explore.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ Guidelines:
99
- Use Glob for broad file pattern matching
1010
- Use Grep for searching file contents with regex
1111
- Use Read when you know the specific file path you need to read
12-
- Use Shell for file operations like copying, moving, or listing directory contents
12+
- Use Bash for file operations like copying, moving, or listing directory contents
1313
- Adapt your search approach based on the thoroughness level specified by the caller
1414
- Return file paths as absolute paths in your final response
1515
- For clear communication, avoid using emojis
16-
- Do not create any files, or run shell commands that modify the user's system state in any way
16+
- Do not create any files, or run bash commands that modify the user's system state in any way
1717

1818
Complete the user's search request efficiently and report your findings clearly.

packages/opencode/src/agent/prompt/title.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Your output must be:
1414
<rules>
1515
- you MUST use the same language as the user message you are summarizing
1616
- Title must be grammatically correct and read naturally - no word salad
17-
- Never include tool names in the title (e.g. "read tool", "shell tool", "edit tool")
17+
- Never include tool names in the title (e.g. "read tool", "bash tool", "edit tool")
1818
- Focus on the main topic or question the user needs to retrieve
1919
- Vary your phrasing - avoid repetitive patterns like always starting with "Analyzing"
2020
- When a file is mentioned, focus on WHAT the user wants to do WITH the file, not just that they shared it

packages/opencode/src/cli/cmd/github.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -879,7 +879,7 @@ export const GithubRunCommand = cmd({
879879
function subscribeSessionEvents() {
880880
const TOOL: Record<string, [string, string]> = {
881881
todowrite: ["Todo", UI.Style.TEXT_WARNING_BOLD],
882-
shell: ["Shell", UI.Style.TEXT_DANGER_BOLD],
882+
bash: ["Shell", UI.Style.TEXT_DANGER_BOLD],
883883
edit: ["Edit", UI.Style.TEXT_SUCCESS_BOLD],
884884
glob: ["Glob", UI.Style.TEXT_INFO_BOLD],
885885
grep: ["Grep", UI.Style.TEXT_INFO_BOLD],

packages/opencode/src/cli/cmd/tui/feature-plugins/home/tips-view.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ const TIPS = [
9595
"Use {highlight}$ARGUMENTS{/highlight}, {highlight}$1{/highlight}, {highlight}$2{/highlight} in custom commands for dynamic input",
9696
"Use backticks in commands to inject shell output (e.g., {highlight}`git status`{/highlight})",
9797
"Add {highlight}.md{/highlight} files to {highlight}.opencode/agent/{/highlight} for specialized AI personas",
98-
"Configure per-agent permissions for {highlight}edit{/highlight}, {highlight}shell{/highlight}, and {highlight}webfetch{/highlight} tools",
99-
'Use patterns like {highlight}"git *": "allow"{/highlight} for granular shell permissions',
98+
"Configure per-agent permissions for {highlight}edit{/highlight}, {highlight}bash{/highlight}, and {highlight}webfetch{/highlight} tools",
99+
'Use patterns like {highlight}"git *": "allow"{/highlight} for granular bash permissions',
100100
'Set {highlight}"rm -rf *": "deny"{/highlight} to block destructive commands',
101101
'Configure {highlight}"git push": "ask"{/highlight} to require approval before pushing',
102102
"OpenCode auto-formats files using prettier, gofmt, ruff, and more",
@@ -130,7 +130,7 @@ const TIPS = [
130130
"Use {highlight}instructions{/highlight} in config to load additional rules files",
131131
"Set agent {highlight}temperature{/highlight} from 0.0 (focused) to 1.0 (creative)",
132132
"Configure {highlight}steps{/highlight} to limit agentic iterations per request",
133-
'Set {highlight}"tools": {"shell": false}{/highlight} to disable specific tools',
133+
'Set {highlight}"tools": {"bash": false}{/highlight} to disable specific tools',
134134
'Set {highlight}"mcp_*": false{/highlight} to disable all tools from an MCP server',
135135
"Override global tool settings per agent configuration",
136136
'Set {highlight}"share": "auto"{/highlight} to automatically share all sessions',

packages/opencode/test/cli/tui/transcript.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ describe("transcript", () => {
183183
},
184184
}
185185
const result = formatPart(part, options)
186-
expect(result).toContain("**Tool: shell**")
186+
expect(result).toContain("**Tool: bash**")
187187
expect(result).toContain("**Input:**")
188188
expect(result).toContain('"command": "ls"')
189189
expect(result).toContain("**Output:**")
@@ -209,7 +209,7 @@ describe("transcript", () => {
209209
}
210210
const result = formatPart(part, options)
211211
// The tool header should not be inside a code block
212-
expect(result).toStartWith("**Tool: shell**\n")
212+
expect(result).toStartWith("**Tool: bash**\n")
213213
// Input and output should each be in their own code blocks
214214
expect(result).toContain("**Input:**\n```json")
215215
expect(result).toContain("**Output:**\n```\n```hello```\n```")
@@ -233,7 +233,7 @@ describe("transcript", () => {
233233
},
234234
}
235235
const result = formatPart(part, { ...options, toolDetails: false })
236-
expect(result).toContain("**Tool: shell**")
236+
expect(result).toContain("**Tool: bash**")
237237
expect(result).not.toContain("**Input:**")
238238
expect(result).not.toContain("**Output:**")
239239
})

packages/opencode/test/config/config.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1353,7 +1353,7 @@ test("migrates legacy tools config to permissions - allow", async () => {
13531353
fn: async () => {
13541354
const config = await load()
13551355
expect(config.agent?.["test"]?.permission).toEqual({
1356-
shell: "allow",
1356+
bash: "allow",
13571357
read: "allow",
13581358
})
13591359
},
@@ -1384,7 +1384,7 @@ test("migrates legacy tools config to permissions - deny", async () => {
13841384
fn: async () => {
13851385
const config = await load()
13861386
expect(config.agent?.["test"]?.permission).toEqual({
1387-
shell: "deny",
1387+
bash: "deny",
13881388
webfetch: "deny",
13891389
})
13901390
},
@@ -1582,7 +1582,7 @@ test("migrates mixed legacy tools config", async () => {
15821582
fn: async () => {
15831583
const config = await load()
15841584
expect(config.agent?.["test"]?.permission).toEqual({
1585-
shell: "allow",
1585+
bash: "allow",
15861586
edit: "allow",
15871587
read: "deny",
15881588
webfetch: "allow",

0 commit comments

Comments
 (0)