File tree Expand file tree Collapse file tree 1 file changed +4
-10
lines changed
Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -1573,11 +1573,7 @@ export class Cline {
15731573 await delay ( 200 )
15741574 }
15751575
1576- const diff = formatResponse . createPrettyPatch (
1577- relPath ,
1578- this . diffViewProvider . originalContent ,
1579- updatedContent ,
1580- )
1576+ const diff = formatResponse . createPrettyPatch ( relPath , fileContent , updatedContent )
15811577
15821578 if ( ! diff ) {
15831579 pushToolResult ( `No changes needed for '${ relPath } '` )
@@ -1707,6 +1703,8 @@ export class Cline {
17071703
17081704 // Read the original file content
17091705 const fileContent = await fs . readFile ( absolutePath , "utf-8" )
1706+ this . diffViewProvider . editType = "modify"
1707+ this . diffViewProvider . originalContent = fileContent
17101708 let lines = fileContent . split ( "\n" )
17111709
17121710 for ( const op of parsedOperations ) {
@@ -1745,11 +1743,7 @@ export class Cline {
17451743 this . consecutiveMistakeCount = 0
17461744
17471745 // Show diff preview
1748- const diff = formatResponse . createPrettyPatch (
1749- relPath ,
1750- this . diffViewProvider . originalContent ,
1751- newContent ,
1752- )
1746+ const diff = formatResponse . createPrettyPatch ( relPath , fileContent , newContent )
17531747
17541748 if ( ! diff ) {
17551749 pushToolResult ( `No changes needed for '${ relPath } '` )
You can’t perform that action at this time.
0 commit comments