-
Notifications
You must be signed in to change notification settings - Fork 0
release/v4.210.1 #25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
release/v4.210.1 #25
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -41,22 +41,9 @@ export class DirectoryScanner implements IDirectoryScanner { | |||||||||||||||||||||||||||||||||||||||||
| private readonly codeParser: ICodeParser, | ||||||||||||||||||||||||||||||||||||||||||
| private readonly cacheManager: CacheManager, | ||||||||||||||||||||||||||||||||||||||||||
| private readonly ignoreInstance: Ignore, | ||||||||||||||||||||||||||||||||||||||||||
| batchSegmentThreshold?: number, | ||||||||||||||||||||||||||||||||||||||||||
| _batchSegmentThreshold?: number, | ||||||||||||||||||||||||||||||||||||||||||
| ) { | ||||||||||||||||||||||||||||||||||||||||||
| // Get the configurable batch size from VSCode settings, fallback to default | ||||||||||||||||||||||||||||||||||||||||||
| // If not provided in constructor, try to get from VSCode settings | ||||||||||||||||||||||||||||||||||||||||||
| if (batchSegmentThreshold !== undefined) { | ||||||||||||||||||||||||||||||||||||||||||
| this.batchSegmentThreshold = batchSegmentThreshold | ||||||||||||||||||||||||||||||||||||||||||
| } else { | ||||||||||||||||||||||||||||||||||||||||||
| try { | ||||||||||||||||||||||||||||||||||||||||||
| this.batchSegmentThreshold = vscode.workspace | ||||||||||||||||||||||||||||||||||||||||||
| .getConfiguration(Package.name) | ||||||||||||||||||||||||||||||||||||||||||
| .get<number>("codeIndex.embeddingBatchSize", BATCH_SEGMENT_THRESHOLD) | ||||||||||||||||||||||||||||||||||||||||||
| } catch { | ||||||||||||||||||||||||||||||||||||||||||
| // In test environment, vscode.workspace might not be available | ||||||||||||||||||||||||||||||||||||||||||
| this.batchSegmentThreshold = BATCH_SEGMENT_THRESHOLD | ||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||
| this.batchSegmentThreshold = BATCH_SEGMENT_THRESHOLD | ||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+44
to
+46
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 Code Quality Issue: The constructor accepts Fix: Use the passed parameter if available, falling back to the constant. Remove the Impact: Improves code correctness and testability
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| // kilocode_change start | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟡 Code Quality
Issue: The constructor accepts
_batchSegmentThresholdbut ignores it, hardcodingthis.batchSegmentThresholdto the constant. This prevents configuration overrides (e.g., for testing) and makes the parameter misleading.Fix: Use the passed parameter if available, falling back to the constant. Remove the
_prefix to indicate it is used.Impact: Improves code correctness and testability