MCPcopy
hub / github.com/continuedev/continue / collectDiffs

Function collectDiffs

core/edit/lazy/deterministic.test.ts:17–35  ·  view source on GitHub ↗
(
  oldFile: string,
  newFile: string,
  filename: string,
)

Source from the content-addressed store, hash-verified

15};
16
17async function collectDiffs(
18 oldFile: string,
19 newFile: string,
20 filename: string,
21): Promise<{ ourDiffs: DiffLine[]; myersDiffs: any }> {
22 const ourDiffs: DiffLine[] = [];
23
24 for (const diffLine of (await deterministicApplyLazyEdit({
25 oldFile,
26 newLazyFile: newFile,
27 filename,
28 })) ?? []) {
29 ourDiffs.push(diffLine);
30 }
31
32 const myersDiffs = myersDiff(oldFile, newFile);
33
34 return { ourDiffs, myersDiffs };
35}
36
37function displayDiff(diff: DiffLine[]) {
38 return diff

Callers 2

expectDiffFunction · 0.70

Calls 3

myersDiffFunction · 0.90
pushMethod · 0.65

Tested by

no test coverage detected