diff --git a/core/nextEdit/templating/mercuryCoderNextEdit.ts b/core/nextEdit/templating/mercuryCoderNextEdit.ts index 616700b17..d87923969 100644 --- a/core/nextEdit/templating/mercuryCoderNextEdit.ts +++ b/core/nextEdit/templating/mercuryCoderNextEdit.ts @@ -48,7 +48,10 @@ export function currentFileContentBlock( export function editHistoryBlock( editDiffHistory: string, // could be a singe large unified diff ) { - return editDiffHistory; + // diffHistory is made from createDiff. + // This uses createPatch from npm diff library, which includes an index line and a separator. + // We get rid of these first two lines. + return editDiffHistory.split("\n").slice(2).join("\n"); } function mercuryNextEditTemplateBuilder(