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

Function collectDiffs

core/diff/streamDiff.vitest.ts:21–34  ·  view source on GitHub ↗
(
  oldLines: string[],
  newLines: string[],
)

Source from the content-addressed store, hash-verified

19};
20
21async function collectDiffs(
22 oldLines: string[],
23 newLines: string[],
24): Promise<{ streamDiffs: DiffLine[]; myersDiffs: any }> {
25 const streamDiffs: DiffLine[] = [];
26
27 for await (const diffLine of streamDiff(oldLines, generateLines(newLines))) {
28 streamDiffs.push(diffLine);
29 }
30
31 const myersDiffs = myersDiff(oldLines.join("\n"), newLines.join("\n"));
32
33 return { streamDiffs, myersDiffs };
34}
35
36function getMyersDiffType(diff: any): MyersDiffTypes | undefined {
37 if (changed(diff.rhs) && !changed(diff.lhs)) {

Callers 2

expectDiffFunction · 0.70

Calls 4

streamDiffFunction · 0.85
generateLinesFunction · 0.85
myersDiffFunction · 0.85
pushMethod · 0.65

Tested by

no test coverage detected