Batch code segments when using ollama to report progress (#3968)

fix: batch code segments when using ollama
This commit is contained in:
Daniel 2025-05-25 16:11:01 -05:00 committed by GitHub
parent 78b7455a05
commit 977fa26e01
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -145,11 +145,8 @@ export class DirectoryScanner implements IDirectoryScanner {
})
}
// Check if batch threshold is met and not for Ollama
if (
currentBatchBlocks.length >= BATCH_SEGMENT_THRESHOLD &&
this.embedder.embedderInfo.name !== "ollama"
) {
// Check if batch threshold is met
if (currentBatchBlocks.length >= BATCH_SEGMENT_THRESHOLD) {
// Copy current batch data and clear accumulators
const batchBlocks = [...currentBatchBlocks]
const batchTexts = [...currentBatchTexts]