From 2436bc2437e67ee7c45176b4a1b1b159e216a6bf Mon Sep 17 00:00:00 2001 From: Patrick Erichsen Date: Mon, 14 Apr 2025 11:05:44 -0700 Subject: [PATCH] Update applyCodeBlock.ts --- core/edit/lazy/applyCodeBlock.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/edit/lazy/applyCodeBlock.ts b/core/edit/lazy/applyCodeBlock.ts index c533b34e6..8ca9a8154 100644 --- a/core/edit/lazy/applyCodeBlock.ts +++ b/core/edit/lazy/applyCodeBlock.ts @@ -37,9 +37,9 @@ export async function applyCodeBlock( } // If the code block is a diff - if (isUnifiedDiffFormat(newFile)) { + if (isUnifiedDiffFormat(newLazyFile)) { try { - const diffLines = applyUnifiedDiff(oldFile, newFile); + const diffLines = applyUnifiedDiff(oldFile, newLazyFile); return { isInstantApply: true, diffLinesGenerator: generateLines(diffLines!), @@ -51,6 +51,6 @@ export async function applyCodeBlock( return { isInstantApply: false, - diffLinesGenerator: streamLazyApply(oldFile, filename, newFile, llm), + diffLinesGenerator: streamLazyApply(oldFile, filename, newLazyFile, llm), }; }