continue-custom/core/context/retrieval/util.ts
Nate Sesti 8fed0cb985
Convert core/ to NodeNext (#1877)
* convert to nodenext in core

* experimental vm modules

* use imports

* a few ts-ignores

---------

Co-authored-by: Patrick Erichsen <patrick.a.erichsen@gmail.com>
2024-07-30 19:04:30 -07:00

12 lines
335 B
TypeScript

import { Chunk } from "../../index.js";
import { deduplicateArray } from "../../util/index.js";
export function deduplicateChunks(chunks: Chunk[]): Chunk[] {
return deduplicateArray(chunks, (a, b) => {
return (
a.filepath === b.filepath &&
a.startLine === b.startLine &&
a.endLine === b.endLine
);
});
}