Skip to content

Commit 6eadda2

Browse files
committed
fix: focus documentation improvements on prepend_to_file tool only
1 parent 583cb1a commit 6eadda2

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

src/core/prompts/sections/rules.ts

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,7 @@ function getEditingInstructions(diffStrategy?: DiffStrategy, experiments?: Recor
3131
instructions.push(
3232
`- For editing files, you have access to these tools: ${availableTools.join(", ")}.`,
3333
"- The append_to_file tool adds content to the end of files, such as appending new log entries or adding new data records. This tool will always add the content at the end of the file.",
34-
"- The prepend_to_file tool adds content to the beginning of files, such as adding license headers, import statements, or configuration headers. This tool will always add the content at the beginning of the file, before any existing content.",
35-
)
36-
37-
// Enhanced tool selection guidance
38-
instructions.push(
39-
"- When deciding which tool to use for modifying existing files:",
40-
" * Use write_to_file for complete file rewrites or when creating new files from scratch",
41-
" * Use prepend_to_file when adding content that logically belongs at the top of a file (license headers, import/include statements, file-level documentation)",
42-
" * Use append_to_file when adding content that logically belongs at the end (new entries, log records, additional data points)",
43-
" * Use apply_diff or insert_content for targeted changes within the middle of a file",
44-
" * Use search_and_replace for pattern-based text replacements across the file",
34+
"- The prepend_to_file tool adds content to the beginning of files, such as adding license headers, import statements, or configuration headers. This tool will always add the content at the beginning of the file, before any existing content. Use this tool when adding content that logically belongs at the top of a file.",
4535
)
4636
}
4737

0 commit comments

Comments
 (0)