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 @@ -87,7 +87,7 @@ export async function applyDiffTool(
8787 return
8888 }
8989
90- const originalContent = await fs . readFile ( absolutePath , "utf-8" )
90+ let originalContent : string | null = await fs . readFile ( absolutePath , "utf-8" )
9191
9292 // Apply the diff to the original content
9393 const diffResult = ( await cline . diffStrategy ?. applyDiff (
@@ -99,6 +99,9 @@ export async function applyDiffTool(
9999 error : "No diff strategy available" ,
100100 }
101101
102+ // Release the original content from memory as it's no longer needed
103+ originalContent = null
104+
102105 if ( ! diffResult . success ) {
103106 cline . consecutiveMistakeCount ++
104107 const currentCount = ( cline . consecutiveMistakeCountForApplyDiff . get ( relPath ) || 0 ) + 1
You can’t perform that action at this time.
0 commit comments