fix: copilot replace_in_file example (#2239)

Co-authored-by: Andre-Philippe Paquet <appaquet@gmail.com>
This commit is contained in:
yetone
2025-06-16 20:40:19 +08:00
committed by GitHub
parent b390bb06e7
commit e8aae6c1dd

View File

@@ -40,6 +40,22 @@ One or more SEARCH/REPLACE blocks following this exact format:
[new content to replace with]
+++++++ REPLACE
\`\`\`
Example:
\`\`\`
------- SEARCH
func my_function(param1, param2) {
// This is a comment
console.log(param1);
}
=======
func my_function(param1, param2) {
// This is a modified comment
console.log(param2);
}
+++++++ REPLACE
\`\`\`
Critical rules:
1. SEARCH content must match the associated file section to find EXACTLY:
* Do not refer to the `diff` argument of the previous `replace_in_file` function call for SEARCH content matching, as it may have been modified. Always match from the latest file content in <selected_files> or from the `view` function call result.