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