mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
I've refined the descriptions of some of my capabilities.
Based on feedback, this change revisits the descriptions for how I write to files, apply differences, insert content, and perform search and replace operations. It removes sentences that explicitly compared one capability to another. The aim is to ensure each capability's description clearly defines its own purpose and strengths without directly mentioning others, which can lead to unintended behavior. The previous updates to how my functions are described are retained.
This commit is contained in:
parent
b8aa4b473e
commit
9e9f6e8a78
3 changed files with 6 additions and 8 deletions
|
|
@ -89,10 +89,8 @@ export class MultiSearchReplaceDiffStrategy implements DiffStrategy {
|
|||
|
||||
getToolDescription(args: { cwd: string; toolOptions?: { [key: string]: string } }): string {
|
||||
return `## apply_diff
|
||||
Description: Request to replace existing code using a search and replace block.
|
||||
This tool allows for precise, surgical replaces to files by specifying exactly what content to search for and what to replace it with.
|
||||
The tool will maintain proper indentation and formatting while making changes.
|
||||
Only a single operation is allowed per tool use.
|
||||
Description: Request to apply targeted modifications to an existing file by searching for specific sections of content and replacing them. This tool is ideal for precise, surgical edits when you know the exact content to change. It helps maintain proper indentation and formatting.
|
||||
You can perform multiple distinct search and replace operations within a single \`apply_diff\` call by providing multiple SEARCH/REPLACE blocks in the \`diff\` parameter. This is the preferred way to make several targeted changes to one file efficiently.
|
||||
The SEARCH section must exactly match existing content including whitespace and indentation.
|
||||
If you're not confident in the exact content to search for, use the read_file tool first to get the exact content.
|
||||
When applying the diffs, be extra careful to remember to change any closing brackets or other syntax that may be affected by the diff farther down in the file.
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@ import { ToolArgs } from "./types"
|
|||
|
||||
export function getWriteToFileDescription(args: ToolArgs): string {
|
||||
return `## write_to_file
|
||||
Description: Request to write full content to a file at the specified path. If the file exists, it will be overwritten with the provided content. If the file doesn't exist, it will be created. This tool will automatically create any directories needed to write the 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.
|
||||
Parameters:
|
||||
- path: (required) The path of the file to write to (relative to the current workspace directory ${args.cwd})
|
||||
- content: (required) The content to write to the file. ALWAYS provide the COMPLETE intended content of the file, without any truncation or omissions. You MUST include ALL parts of the file, even if they haven't been modified. Do NOT include the line numbers in the content though, just the actual content of the file.
|
||||
- content: (required) The content to write to the file. When performing a full rewrite of an existing file or creating a new one, ALWAYS provide the COMPLETE intended content of the file, without any truncation or omissions. You MUST include ALL parts of the file, even if they haven't been modified. Do NOT include the line numbers in the content though, just the actual content of the file.
|
||||
- line_count: (required) The number of lines in the file. Make sure to compute this based on the actual content of the file, not the number of lines in the content you're providing.
|
||||
Usage:
|
||||
<write_to_file>
|
||||
|
|
|
|||
|
|
@ -167,8 +167,8 @@ export const TOOL_DISPLAY_NAMES: Record<ToolName, string> = {
|
|||
execute_command: "run commands",
|
||||
read_file: "read files",
|
||||
fetch_instructions: "fetch instructions",
|
||||
write_to_file: "write files",
|
||||
apply_diff: "apply changes",
|
||||
write_to_file: "create or fully rewrite files",
|
||||
apply_diff: "apply targeted file edits",
|
||||
search_files: "search files",
|
||||
list_files: "list files",
|
||||
list_code_definition_names: "list definitions",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue