Skip to content

Commit 705dc70

Browse files
Merge pull request #8674 from continuedev/dallinbriggs/8673-bash-tool-guidance
Add guidance to Bash tools to prefer edit tools over bash commands
1 parent 16f02a2 commit 705dc70

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

core/tools/definitions/runTerminalCommand.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ const RUN_COMMAND_NOTES = `The shell is not stateful and will not remember any p
2929
When a command is run in the background ALWAYS suggest using shell commands to stop it; NEVER suggest using Ctrl+C.\
3030
When suggesting subsequent shell commands ALWAYS format them in shell command blocks.\
3131
Do NOT perform actions requiring special/admin privileges.\
32+
IMPORTANT: To edit files, use Edit/MultiEdit tools instead of bash commands (sed, awk, etc).\
3233
${PLATFORM_INFO}`;
3334

3435
export const runTerminalCommandTool: Tool = {

extensions/cli/src/tools/runTerminalCommand.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ export const runTerminalCommandTool: Tool = {
3434
description: `Executes a terminal command and returns the output
3535
3636
Commands are automatically executed from the current working directory (${process.cwd()}), so there's no need to change directories with 'cd' commands.
37+
38+
IMPORTANT: To edit files, use Edit/MultiEdit tools instead of bash commands (sed, awk, etc).
3739
`,
3840
parameters: {
3941
type: "object",

0 commit comments

Comments
 (0)