mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-09 22:31:08 +00:00
releasing memory in apply diff (#4193)
This commit is contained in:
parent
d079cb11ff
commit
eb9c4aa03d
1 changed files with 4 additions and 1 deletions
|
|
@ -86,7 +86,7 @@ export async function applyDiffTool(
|
|||
return
|
||||
}
|
||||
|
||||
const originalContent = await fs.readFile(absolutePath, "utf-8")
|
||||
let originalContent: string | null = await fs.readFile(absolutePath, "utf-8")
|
||||
|
||||
// Apply the diff to the original content
|
||||
const diffResult = (await cline.diffStrategy?.applyDiff(
|
||||
|
|
@ -98,6 +98,9 @@ export async function applyDiffTool(
|
|||
error: "No diff strategy available",
|
||||
}
|
||||
|
||||
// Release the original content from memory as it's no longer needed
|
||||
originalContent = null
|
||||
|
||||
if (!diffResult.success) {
|
||||
cline.consecutiveMistakeCount++
|
||||
const currentCount = (cline.consecutiveMistakeCountForApplyDiff.get(relPath) || 0) + 1
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue