Просмотр исходного кода

Add stricter prompt to prevent file edit during browser session

Saoud Rizwan 1 год назад
Родитель
Сommit
4658e5cead
3 измененных файлов с 6 добавлено и 2 удалено
  1. 4 0
      CHANGELOG.md
  2. 1 1
      package.json
  3. 1 1
      src/core/Cline.ts

+ 4 - 0
CHANGELOG.md

@@ -1,5 +1,9 @@
 # Change Log
 
+## [2.1.1]
+
+- Add stricter prompt to prevent Cline from editing files during a browser session without first closing the browser
+
 ## [2.1.0]
 
 - Cline now uses Anthropic's new "Computer Use" feature to launch a browser, click, type, and scroll. This gives him more autonomy in runtime debugging, end-to-end testing, and even general web use. Try asking "Look up the weather in Colorado" to see it in action! (Available with Claude 3.5 Sonnet v2)

+ 1 - 1
package.json

@@ -2,7 +2,7 @@
   "name": "claude-dev",
   "displayName": "Cline (prev. Claude Dev)",
   "description": "Autonomous coding agent right in your IDE, capable of creating/editing files, running commands, using the browser, and more with your permission every step of the way.",
-  "version": "2.1.0",
+  "version": "2.1.1",
   "icon": "assets/icons/icon.png",
   "galleryBanner": {
     "color": "#617A91",

+ 1 - 1
src/core/Cline.ts

@@ -1467,7 +1467,7 @@ export class Cline {
 											formatResponse.toolResult(
 												`The browser action has been executed. The console logs and screenshot have been captured for your analysis.\n\nConsole logs:\n${
 													browserActionResult.logs || "(No new logs)"
-												}\n\n(REMEMBER: if you need to proceed to using non-\`browser_action\` tools or launch a new browser, you MUST first close this browser.)`,
+												}\n\n(REMEMBER: if you need to proceed to using non-\`browser_action\` tools or launch a new browser, you MUST first close this browser. For example, if after analyzing the logs and screenshot you need to edit a file, you must first close the browser before you can use the write_to_file tool.)`,
 												browserActionResult.screenshot ? [browserActionResult.screenshot] : []
 											)
 										)