Skip to content

Commit 977fa26

Browse files
authored
Batch code segments when using ollama to report progress (#3968)
fix: batch code segments when using ollama
1 parent 78b7455 commit 977fa26

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/services/code-index/processors/scanner.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -145,11 +145,8 @@ export class DirectoryScanner implements IDirectoryScanner {
145145
})
146146
}
147147

148-
// Check if batch threshold is met and not for Ollama
149-
if (
150-
currentBatchBlocks.length >= BATCH_SEGMENT_THRESHOLD &&
151-
this.embedder.embedderInfo.name !== "ollama"
152-
) {
148+
// Check if batch threshold is met
149+
if (currentBatchBlocks.length >= BATCH_SEGMENT_THRESHOLD) {
153150
// Copy current batch data and clear accumulators
154151
const batchBlocks = [...currentBatchBlocks]
155152
const batchTexts = [...currentBatchTexts]

0 commit comments

Comments
 (0)