adopting new createDiff signature across repo

This commit is contained in:
adarshramiyer 2025-07-09 20:47:40 -07:00
parent 522d62ff11
commit dfdaa71032
2 changed files with 14 additions and 12 deletions

View file

@ -482,12 +482,13 @@ export class EditAggregator {
return;
}
const diff = createDiff(
beforeContent,
afterContent,
filePath,
DiffFormatType.Unified,
); // Used for checks, not for final output
const diff = createDiff({
beforeContent: beforeContent,
afterContent: afterContent,
filePath: filePath,
diffType: DiffFormatType.Unified,
contextLines: 3,
}); // Used for checks, not for final output
// Skip diffs with too many changed lines
const changedLineCount = this.countChangedLines(diff);

View file

@ -15,12 +15,13 @@ export const processSmallEdit = async (
ide: IDE,
) => {
NextEditProvider.getInstance().addDiffToContext(
createDiff(
beforeAfterdiff.beforeContent,
beforeAfterdiff.afterContent,
beforeAfterdiff.filePath,
DiffFormatType.Unified,
),
createDiff({
beforeContent: beforeAfterdiff.beforeContent,
afterContent: beforeAfterdiff.afterContent,
filePath: beforeAfterdiff.filePath,
diffType: DiffFormatType.Unified,
contextLines: 3, // NOTE: This can change depending on experiments!
}),
);
// Get the current context data from the most recent message