From fdb8df5aa67d72bcb9f2921da3f6a5b7a8adbfaa Mon Sep 17 00:00:00 2001 From: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com> Date: Sat, 31 Aug 2024 06:57:26 -0400 Subject: [PATCH] Update response to write_to_file --- src/ClaudeDev.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/ClaudeDev.ts b/src/ClaudeDev.ts index 1dbe925..0c6cf10 100644 --- a/src/ClaudeDev.ts +++ b/src/ClaudeDev.ts @@ -893,12 +893,14 @@ export class ClaudeDev { diff: this.createPrettyPatch(relPath, newContent, editedContent), } as ClaudeSayTool) ) - return `${ - fileExists ? "Changes applied" : "New file written" - } to ${relPath}:\n${diffResult}, the user applied these changes:\n${userDiff}` + return `The user accepted but made the following changes to your content:\n\n${userDiff}\n\nFinal result ${ + fileExists ? "applied to" : "written as new file" + } ${relPath}:\n\n${diffResult}` } else { const diffResult = diff.createPatch(relPath, originalContent, newContent) - return `${fileExists ? "Changes applied" : "New file written"} to ${relPath}:\n${diffResult}` + return `${ + fileExists ? `Changes applied to ${relPath}:\n\n${diffResult}` : `New file written to ${relPath}` + }` } } catch (error) { const errorString = `Error writing file: ${JSON.stringify(serializeError(error))}`