File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ export async function applyDiffTool(
8686 return
8787 }
8888
89- const originalContent = await fs . readFile ( absolutePath , "utf-8" )
89+ let originalContent : string | null = await fs . readFile ( absolutePath , "utf-8" )
9090
9191 // Apply the diff to the original content
9292 const diffResult = ( await cline . diffStrategy ?. applyDiff (
@@ -98,6 +98,9 @@ export async function applyDiffTool(
9898 error : "No diff strategy available" ,
9999 }
100100
101+ // Release the original content from memory as it's no longer needed
102+ originalContent = null
103+
101104 if ( ! diffResult . success ) {
102105 cline . consecutiveMistakeCount ++
103106 const currentCount = ( cline . consecutiveMistakeCountForApplyDiff . get ( relPath ) || 0 ) + 1
You can’t perform that action at this time.
0 commit comments