MCPcopy Index your code
hub / github.com/continuedev/continue / countOldContentLines

Function countOldContentLines

core/nextEdit/diff/diff.ts:348–360  ·  view source on GitHub ↗

* Count the number of lines in the old content (excluding "new" lines).

(
  diffLines: DiffLine[],
  startIdx: number,
  endIdx: number,
)

Source from the content-addressed store, hash-verified

346 * Count the number of lines in the old content (excluding "new" lines).
347 */
348function countOldContentLines(
349 diffLines: DiffLine[],
350 startIdx: number,
351 endIdx: number,
352): number {
353 let count = 0;
354 for (let i = startIdx; i <= endIdx; i++) {
355 if (diffLines[i].type !== "new") {
356 count++;
357 }
358 }
359 return count;
360}
361
362/**
363 * Process a changed area with a limited group size.

Callers 2

processLimitedSizeGroupFunction · 0.85
processFlexibleSizeGroupFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected