fix: remove the first two lines generated by createDiff

This commit is contained in:
Jacob Kim 2025-08-02 18:52:16 -07:00
parent f404a4d5ff
commit 1579375550

View file

@ -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(