mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
Merge c6d1852e1a into b867ec9145
This commit is contained in:
commit
7b661d175d
2 changed files with 5 additions and 1 deletions
|
|
@ -2,6 +2,8 @@ import type OpenAI from "openai"
|
|||
|
||||
const EXECUTE_COMMAND_DESCRIPTION = `Request to execute a CLI command on the system. Use this when you need to perform system operations or run specific commands to accomplish any step in the user's task. You must tailor your command to the user's system and provide a clear explanation of what the command does. For command chaining, use the appropriate chaining syntax for the user's shell. Prefer to execute complex CLI commands over creating executable scripts, as they are more flexible and easier to run. Prefer relative commands and paths that avoid location sensitivity for terminal consistency.
|
||||
|
||||
**Important:** Do not use this tool to modify file contents (e.g., via sed, echo, cat, printf, tee, or shell scripts). Use the dedicated file editing tools (apply_diff, edit, or write_to_file) instead.
|
||||
|
||||
Parameters:
|
||||
- command: (required) The CLI command to execute. This should be valid for the current operating system. Ensure the command is properly formatted and does not contain any harmful instructions.
|
||||
- cwd: (optional) The working directory to execute the command in
|
||||
|
|
|
|||
|
|
@ -2,7 +2,9 @@ import type OpenAI from "openai"
|
|||
|
||||
const WRITE_TO_FILE_DESCRIPTION = `Request to write content to a file. This tool is primarily used for creating new files or for scenarios where a complete rewrite of an existing file is intentionally required. If the file exists, it will be overwritten. If it doesn't exist, it will be created. This tool will automatically create any directories needed to write the file.
|
||||
|
||||
**Important:** You should prefer using other editing tools over write_to_file when making changes to existing files, since write_to_file is slower and cannot handle large files. Use write_to_file primarily for new file creation.
|
||||
**Important:** You should prefer using the apply_diff or edit tools over write_to_file when making changes to existing files, since write_to_file is slower and cannot handle large files. Use write_to_file primarily for new file creation.
|
||||
|
||||
**Critical:** Never use execute_command to write shell scripts or run shell commands (like sed, echo, cat, printf, tee, etc.) as a workaround for modifying file contents. Always use the dedicated file editing tools (apply_diff, edit, or write_to_file) instead.
|
||||
|
||||
When using this tool, use it directly with the desired content. You do not need to display the content before using the tool. ALWAYS provide the COMPLETE file content in your response. This is NON-NEGOTIABLE. Partial updates or placeholders like '// rest of code unchanged' are STRICTLY FORBIDDEN. Failure to do so will result in incomplete or broken code.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue