@@ -147,7 +147,7 @@ export class DiffModel {
147147
148148 if ( ! diffContents . trim ( ) ) {
149149 getLogger ( ) . error ( `CodeTransformation: diff.patch file is empty` )
150- throw new Error ( 'No changes were made as a part of this transformation.' )
150+ throw new Error ( CodeWhispererConstants . noChangesMadeMessage )
151151 }
152152
153153 const changedFiles = parsePatch ( diffContents )
@@ -378,25 +378,6 @@ export class ProposedTransformationExplorer {
378378 pathContainingArchive = path . dirname ( pathToArchive )
379379 const zip = new AdmZip ( pathToArchive )
380380 zip . extractAllTo ( pathContainingArchive )
381-
382- // TODO: below only needed if the backend cannot fix the "b/" diff.patch issue
383- const diffPatch = fs . readFileSync (
384- path . join ( pathContainingArchive , ExportResultArchiveStructure . PathToDiffPatch ) ,
385- 'utf-8'
386- )
387- const lines = diffPatch . split ( '\n' )
388- const newLines = lines . map ( ( line ) => {
389- if ( line . trim ( ) . startsWith ( 'diff' ) || line . trim ( ) . startsWith ( '+++' ) ) {
390- return line . replace ( 'b' , 'b/' )
391- }
392- return line
393- } )
394- const newDiffPatch = newLines . join ( '\n' )
395- fs . writeFileSync (
396- path . join ( pathContainingArchive , ExportResultArchiveStructure . PathToDiffPatch ) ,
397- newDiffPatch
398- )
399-
400381 diffModel . parseDiff (
401382 path . join ( pathContainingArchive , ExportResultArchiveStructure . PathToDiffPatch ) ,
402383 transformByQState . getProjectPath ( )
0 commit comments