You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/opencode/src/tool/shell/prompt.ts
+24-12Lines changed: 24 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -83,7 +83,7 @@ function chainGuidance(name: string) {
83
83
return"If the commands depend on each other and must run sequentially, use a single Bash call with '&&' to chain them together (e.g., `git add . && git commit -m \"message\" && git push`). For instance, if one operation must complete before another starts (like mkdir before cp, Write before Bash for git operations, or git add before git commit), run these operations sequentially instead."
return`Before executing the command, please follow these steps:
88
88
89
89
1. Directory Verification:
@@ -102,7 +102,7 @@ function bashCommandSection(chain: string, limits: Limits) {
102
102
103
103
Usage notes:
104
104
- The command argument is required.
105
-
- You can specify an optional timeout in milliseconds. If not specified, commands will time out after 120000ms (2 minutes).
105
+
- You can specify an optional timeout in milliseconds. If not specified, commands will time out after ${defaultTimeoutMs}ms.
106
106
- It is very helpful if you write a clear, concise description of what this command does in 5-10 words.
107
107
- If the output exceeds ${limits.maxLines} lines or ${limits.maxBytes} bytes, it will be truncated and the full output will be written to a file. You can use Read with offset/limit to read specific sections or Grep to search the full content. Do NOT use \`head\`, \`tail\`, or other truncation commands to limit output; the full output will already be captured to a file for more precise searching.
Before executing the command, please follow these steps:
@@ -148,7 +154,7 @@ Before executing the command, please follow these steps:
148
154
149
155
Usage notes:
150
156
- The command argument is required.
151
-
- You can specify an optional timeout in milliseconds. If not specified, commands will time out after 120000ms (2 minutes).
157
+
- You can specify an optional timeout in milliseconds. If not specified, commands will time out after ${defaultTimeoutMs}ms.
152
158
- It is very helpful if you write a clear, concise description of what this command does in 5-10 words.
153
159
- If the output exceeds ${limits.maxLines} lines or ${limits.maxBytes} bytes, it will be truncated and the full output will be written to a file. You can use Read with offset/limit to read specific sections or Grep to search the full content. Do NOT use \`Select-Object -First\`, \`Select-Object -Last\`, or other truncation commands to limit output; the full output will already be captured to a file for more precise searching.
@@ -198,7 +204,7 @@ Before executing the command, please follow these steps:
198
204
199
205
Usage notes:
200
206
- The command argument is required.
201
-
- You can specify an optional timeout in milliseconds. If not specified, commands will time out after 120000ms (2 minutes).
207
+
- You can specify an optional timeout in milliseconds. If not specified, commands will time out after ${defaultTimeoutMs}ms.
202
208
- It is very helpful if you write a clear, concise description of what this command does in 5-10 words.
203
209
- If the output exceeds ${limits.maxLines} lines or ${limits.maxBytes} bytes, it will be truncated and the full output will be written to a file. You can use Read with offset/limit to read specific sections or Grep to search the full content. Do NOT use \`more\` or other pagination commands to limit output; the full output will already be captured to a file for more precise searching.
intro: `Executes a given ${shellDisplayName(name)} command with optional timeout, ensuring proper handling and security measures.`,
232
238
workdirSection:
233
239
"All commands run in the current working directory by default. Use the `workdir` parameter if you need to run a command in a different directory. AVOID changing directories inside the command - use `workdir` instead.",
intro: `Executes a given ${shellDisplayName(name)} command with optional timeout, ensuring proper handling and security measures.`,
245
251
workdirSection:
246
252
"All commands run in the current working directory by default. Use the `workdir` parameter if you need to run a command in a different directory. AVOID changing directories inside the command - use `workdir` instead.",
"Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.",
261
273
workdirSection:
262
274
"All commands run in the 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.",
0 commit comments