From 6d6f89fe55e7301d3c84473162d2e4da8bf0dc31 Mon Sep 17 00:00:00 2001 From: Jacob Date: Mon, 9 Jun 2025 11:04:23 +0800 Subject: [PATCH] fix: Fix the issue where the chunk index might be duplicated --- core/indexing/chunk/chunk.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/indexing/chunk/chunk.ts b/core/indexing/chunk/chunk.ts index d51f368a2..c918ddac8 100644 --- a/core/indexing/chunk/chunk.ts +++ b/core/indexing/chunk/chunk.ts @@ -62,12 +62,11 @@ export async function* chunkDocument({ resolve({ ...chunkWithoutId, digest, - index, + index: index++, filepath, }); }), ); - index++; } for await (const chunk of chunkPromises) { if (!chunk) {