mirror of
https://github.com/pacnpal/Roo-Code.git
synced 2025-12-20 20:31:37 -05:00
Update response to write_to_file
This commit is contained in:
@@ -893,12 +893,14 @@ export class ClaudeDev {
|
|||||||
diff: this.createPrettyPatch(relPath, newContent, editedContent),
|
diff: this.createPrettyPatch(relPath, newContent, editedContent),
|
||||||
} as ClaudeSayTool)
|
} as ClaudeSayTool)
|
||||||
)
|
)
|
||||||
return `${
|
return `The user accepted but made the following changes to your content:\n\n${userDiff}\n\nFinal result ${
|
||||||
fileExists ? "Changes applied" : "New file written"
|
fileExists ? "applied to" : "written as new file"
|
||||||
} to ${relPath}:\n${diffResult}, the user applied these changes:\n${userDiff}`
|
} ${relPath}:\n\n${diffResult}`
|
||||||
} else {
|
} else {
|
||||||
const diffResult = diff.createPatch(relPath, originalContent, newContent)
|
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) {
|
} catch (error) {
|
||||||
const errorString = `Error writing file: ${JSON.stringify(serializeError(error))}`
|
const errorString = `Error writing file: ${JSON.stringify(serializeError(error))}`
|
||||||
|
|||||||
Reference in New Issue
Block a user