Skip to content

Commit 796bedb

Browse files
authored
fix: referencing wrong edit tool with no string_replace (#547)
No model actually uses this config currently, but fix the instructions nevertheless Closes microsoft/vscode#258888
1 parent e48f179 commit 796bedb

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/extension/prompts/node/agent/agentInstructions.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -149,14 +149,14 @@ export class DefaultAgentPrompt extends PromptElement<DefaultAgentPromptProps> {
149149
{isGpt5 && <>Make the smallest set of edits needed and avoid reformatting or moving unrelated code. Preserve existing style and conventions, and keep imports, exports, and public APIs stable unless the task requires changes. Prefer completing all edits for a file within a single message when practical.<br /></>}
150150
NEVER show the changes to the user, just call the tool, and the edits will be applied and shown to the user.<br />
151151
NEVER print a codeblock that represents a change to a file, use {ToolName.ReplaceString} or {ToolName.EditFile} instead.<br />
152-
For each file, give a short description of what needs to be changed, then use the {ToolName.ReplaceString} or {ToolName.EditFile} tools. You can use any tool multiple times in a response, and you can keep writing text after using a tool.<br /></> :
153-
<>
152+
For each file, give a short description of what needs to be changed, then use the {ToolName.ReplaceString} or {ToolName.EditFile} tools. You can use any tool multiple times in a response, and you can keep writing text after using a tool.<br /></>
153+
: <>
154154
Don't try to edit an existing file without reading it first, so you can make changes properly.<br />
155-
Use the {ToolName.ReplaceString} tool to edit files. When editing files, group your changes by file.<br />
155+
Use the {ToolName.EditFile} tool to edit files. When editing files, group your changes by file.<br />
156156
{isGpt5 && <>Make the smallest set of edits needed and avoid reformatting or moving unrelated code. Preserve existing style and conventions, and keep imports, exports, and public APIs stable unless the task requires changes. Prefer completing all edits for a file within a single message when practical.<br /></>}
157157
NEVER show the changes to the user, just call the tool, and the edits will be applied and shown to the user.<br />
158-
NEVER print a codeblock that represents a change to a file, use {ToolName.ReplaceString} instead.<br />
159-
For each file, give a short description of what needs to be changed, then use the {ToolName.ReplaceString} tool. You can use any tool multiple times in a response, and you can keep writing text after using a tool.<br />
158+
NEVER print a codeblock that represents a change to a file, use {ToolName.EditFile} instead.<br />
159+
For each file, give a short description of what needs to be changed, then use the {ToolName.EditFile} tool. You can use any tool multiple times in a response, and you can keep writing text after using a tool.<br />
160160
</>}
161161
<GenericEditingTips {...this.props} />
162162
The {ToolName.EditFile} tool is very smart and can understand how to apply your edits to the user's files, you just need to provide minimal hints.<br />

0 commit comments

Comments
 (0)