Browse Source

Search/replace prompt hotfix for Gemini

Matt Rubens 1 year ago
parent
commit
0c08c0fe96
4 changed files with 8 additions and 3 deletions
  1. 4 0
      CHANGELOG.md
  2. 2 2
      package-lock.json
  3. 1 1
      package.json
  4. 1 0
      src/core/diff/strategies/search-replace.ts

+ 4 - 0
CHANGELOG.md

@@ -1,5 +1,9 @@
 # Roo Cline Changelog
 
+## [2.2.9]
+
+-   Fix a bug where Gemini was including line numbers in the search/replace content
+
 ## [2.2.8]
 
 -   More work on diff editing (better matching, indentation, logging)

+ 2 - 2
package-lock.json

@@ -1,12 +1,12 @@
 {
   "name": "roo-cline",
-  "version": "2.2.8",
+  "version": "2.2.9",
   "lockfileVersion": 3,
   "requires": true,
   "packages": {
     "": {
       "name": "roo-cline",
-      "version": "2.2.8",
+      "version": "2.2.9",
       "dependencies": {
         "@anthropic-ai/bedrock-sdk": "^0.10.2",
         "@anthropic-ai/sdk": "^0.26.0",

+ 1 - 1
package.json

@@ -3,7 +3,7 @@
   "displayName": "Roo Cline",
   "description": "A fork of Cline, an autonomous coding agent, with some added experimental configuration and automation features.",
   "publisher": "RooVeterinaryInc",
-  "version": "2.2.8",
+  "version": "2.2.9",
   "icon": "assets/icons/rocket.png",
   "galleryBanner": {
     "color": "#617A91",

+ 1 - 0
src/core/diff/strategies/search-replace.ts

@@ -62,6 +62,7 @@ The tool will maintain proper indentation and formatting while making changes.
 Only a single operation is allowed per tool use.
 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.
+IMPORTANT: The read_file tool returns the file content with line numbers prepended to each line. However, DO NOT include line numbers in the SEARCH and REPLACE sections of the diff content.
 
 Parameters:
 - path: (required) The path of the file to modify (relative to the current working directory ${cwd})