fix: Fix the issue where the chunk index might be duplicated

This commit is contained in:
Jacob 2025-06-09 11:04:23 +08:00 • committed by GitHub
parent 0dc5c42315
commit 6d6f89fe55
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -62,12 +62,11 @@ export async function* chunkDocument({
resolve({
...chunkWithoutId,
digest,
index,
index: index++,
filepath,
});
}),
);
index++;
}
for await (const chunk of chunkPromises) {
if (!chunk) {