Remove a copy / pasta section that duplicated the work done in ChunkCodebaseIndexer (#1834)

This cuts the amount of time spent in this section of indexing in half

Co-authored-by: Rob Leidle <rleidle@tesla.com>
This commit is contained in:
Rob Leidle 2024-07-25 15:35:49 -07:00 • committed by GitHub
parent d5976c23b6
commit b961b4e03e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -114,24 +114,6 @@ export class ChunkCodebaseIndex implements CodebaseIndex {
handleChunk(chunk);
}
accumulatedProgress =
(i / results.compute.length) * (1 - progressReservedForTagging);
yield {
progress: accumulatedProgress,
desc: `Chunking ${getBasename(item.path)}`,
status: "indexing",
};
markComplete([item], IndexResultType.Compute);
// Insert chunks
for await (const chunk of chunkDocument(
item.path,
contents[i],
this.maxChunkSize,
item.cacheKey,
)) {
handleChunk(chunk);
}
accumulatedProgress =
(i / results.compute.length) * (1 - progressReservedForTagging);
yield {