Add stricter prompt to prevent file edit during browser session

This commit is contained in:
Saoud Rizwan
2024-10-28 15:10:49 -04:00
parent 87d10c36d1
commit 4658e5cead
3 changed files with 6 additions and 2 deletions

View File

@@ -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] : []
)
)