+=======
+function handleSubmit() {
+ saveData();
+ setLoading(false);
+}
+
+return (
+
+>>>>>>> REPLACE
+
+
+
+## Example 7: Requesting to make multiple focused changes in a file
+
+
+src/config.ts
+
+<<<<<<< SEARCH
+const maxRetries = 3;
+=======
+const maxRetries = 5;
+>>>>>>> REPLACE
+
+<<<<<<< SEARCH
+export const timeout = 1000;
+=======
+export const timeout = process.env.TIMEOUT || 1000;
+>>>>>>> REPLACE
+
+
+
# Tool Use Guidelines
1. In
tags, assess what information you already have and what information you need to proceed with the task.
@@ -710,7 +794,6 @@ RULES
- When presented with images, utilize your vision capabilities to thoroughly examine them and extract meaningful information. Incorporate these insights into your thought process as you accomplish the user's task.
- At the end of each user message, you will automatically receive environment_details. This information is not written by the user themselves, but is auto-generated to provide potentially relevant context about the project structure and environment. While this information can be valuable for understanding the project context, do not treat it as a direct part of the user's request or response. Use it to inform your actions and decisions, but don't assume the user is explicitly asking about or referring to this information unless they clearly do so in their message. When using environment_details, explain your actions clearly to ensure the user understands, as they may not be aware of these details.
- Before executing commands, check the "Actively Running Terminals" section in environment_details. If present, consider how these active processes might impact your task. For example, if a local development server is already running, you wouldn't need to start it again. If no active terminals are listed, proceed with command execution as normal.
-- When using the write_to_file 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. You MUST include ALL parts of the file, even if they haven't been modified. Failure to do so will result in incomplete or broken code, severely impacting the user's project.
- MCP operations should be used one at a time, similar to other tool usage. Wait for confirmation of success before proceeding with additional operations.
- It is critical you wait for the user's response after each tool use, in order to confirm the success of the tool use. For example, if asked to make a todo app, you would create a file, wait for the user's response it was created successfully, then create another file if needed, wait for the user's response it was created successfully, etc.${
supportsComputerUse
diff --git a/src/integrations/editor/DiffViewProvider.ts b/src/integrations/editor/DiffViewProvider.ts
index c4dced015c..f5ef662bd4 100644
--- a/src/integrations/editor/DiffViewProvider.ts
+++ b/src/integrations/editor/DiffViewProvider.ts
@@ -148,11 +148,15 @@ export class DiffViewProvider {
}
const absolutePath = path.resolve(this.cwd, this.relPath)
const updatedDocument = this.activeDiffEditor.document
- const editedContent = updatedDocument.getText()
+
if (updatedDocument.isDirty) {
await updatedDocument.save()
}
+ // await delay(100)
+ // Need to get text after save in case there is any auto-formatting done by the editor
+ const editedContent = updatedDocument.getText()
+
await vscode.window.showTextDocument(vscode.Uri.file(absolutePath), { preview: false })
await this.closeAllDiffViews()
diff --git a/webview-ui/src/components/chat/ChatRow.tsx b/webview-ui/src/components/chat/ChatRow.tsx
index f0b166eea5..91e51a0020 100644
--- a/webview-ui/src/components/chat/ChatRow.tsx
+++ b/webview-ui/src/components/chat/ChatRow.tsx
@@ -257,7 +257,7 @@ export const ChatRowContent = ({