feat: Add configurable maximum search results setting for codebase indexing #5153
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR implements a configurable maximum search results setting for codebase indexing, addressing issue #5149.
Changes Made
Backend Configuration System
searchMaxResultsproperty toCodeIndexConfiginterface with default value of 50CodeIndexConfigManagerto handle the new setting with getter methodcodebaseIndexSearchMaxResultsschema in types packageSearch Implementation Updates
VectorStore.search()interface to accept configurablemaxResultsparameterQdrantClient.search()implementation to use configurable limit instead of hardcodedMAX_SEARCH_RESULTSconstantSearchService.search()to pass the configured maximum results to vector storeUser Interface
CodeIndexSettingscomponent allowing users to adjust maximum search results from 1 to 500Test Coverage
searchMaxResultsfieldKey Features
✅ Configurable Limit: Users can now set maximum search results from 1 to 500 (default: 50)
✅ Persistent Settings: Configuration is saved and restored across VSCode sessions
✅ Backward Compatibility: Existing installations will use the default value of 50
✅ Type Safety: Full TypeScript support with proper interfaces and validation
✅ Test Coverage: All existing tests pass with updated expectations
Testing
Fixes #5149
Important
Add configurable
searchMaxResultssetting for codebase indexing, updating backend, search implementation, UI, and tests.searchMaxResultstoCodeIndexConfigwith default 50 incodebase-index.ts.CodeIndexConfigManagerto handlesearchMaxResultswith a getter.VectorStore.search()to acceptmaxResults.QdrantClient.search()to usemaxResultsinstead ofMAX_SEARCH_RESULTS.SearchService.search()to passmaxResults.CodeIndexSettings.tsxto adjustsearchMaxResults(1-500).settings.json.config-manager.spec.tsto includesearchMaxResults.This description was created by
for fd65135. You can customize this summary. It will automatically update as commits are pushed.