-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Feat/issue 5149 configurable max search results #5402
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
Merged
mrubens
merged 8 commits into
RooCodeInc:main
from
MuriloFP:feat/issue-5149-configurable-max-search-results
Jul 5, 2025
Merged
Feat/issue 5149 configurable max search results #5402
mrubens
merged 8 commits into
RooCodeInc:main
from
MuriloFP:feat/issue-5149-configurable-max-search-results
Jul 5, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 tasks
…odeInc#5149) - Add codebaseIndexSearchMaxResults to configuration schema with validation (10-1000) - Update Qdrant client to accept maxResults parameter in search method - Add UI slider in Experimental Settings to configure max search results - Rename constants to DEFAULT_MAX_SEARCH_RESULTS and DEFAULT_SEARCH_MIN_SCORE for clarity - Add translations for new setting across all 17 supported languages - Add comprehensive test coverage for config manager, Qdrant client, and UI components fix: settings persistence for codebase index configuration - Add new updateCodebaseIndexConfig message type to properly merge config updates - Update SettingsView to send entire codebaseIndexConfig object instead of just enabled flag - Add backend handler to merge configuration updates instead of overwriting - Add tests for the new message handler functionality This ensures the max search results setting persists correctly when saved.
The frontend was sending 'config' but the backend expects 'codebaseIndexConfig'. This mismatch was preventing the max search results setting from persisting.
fda1594 to
b836def
Compare
…esults into saveCodeIndexSettingsAtomic - Removed updateCodebaseIndexConfig message type and handler as per PR feedback - Added codebaseIndexSearchMaxResults to codeIndexSettings type in WebviewMessage.ts - Updated saveCodeIndexSettingsAtomic to save codebaseIndexSearchMaxResults - Fixed SettingsView.tsx to use codebaseIndexEnabled message instead of updateCodebaseIndexConfig
daniel-lxs
approved these changes
Jul 5, 2025
Member
daniel-lxs
left a comment
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.
LGTM
mrubens
approved these changes
Jul 5, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
documentation
Improvements or additions to documentation
enhancement
New feature or request
lgtm
This PR has been approved by a maintainer
PR - Needs Preliminary Review
size:L
This PR changes 100-499 lines, ignoring generated files.
UI/UX
UI/UX related or focused
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.
Related GitHub Issue
Closes: #5149
Roo Code Task Context (Optional)
Description
This PR reimplements the functionality from the outdated PR #5343 to add a configurable maximum number of codebase search results. The implementation adds a slider control in the Experimental Settings section that allows users to adjust the maximum number of search results returned by the codebase indexing feature (range: 10-1000).
Key implementation details:
maxSearchResultsfield to the codebase index configuration schema with proper validationupdateCodebaseIndexConfigmessage handler to properly merge configuration updatesconfigvscodebaseIndexConfig) prevented settings from savingDesign choices:
Test Procedure
Automated Testing:
updateCodebaseIndexConfiginconfig-manager.spec.tscd src && npx vitest services/code-index/__tests__/config-manager.spec.tsManual Testing Steps:
Verification of i18n:
Pre-Submission Checklist
Screenshots / Videos
Before: No configurable option for maximum search results
After: New slider control in Experimental Settings

Documentation Updates
Additional Notes
This PR addresses a long-standing feature request to make the codebase search results limit configurable. The original PR #5343 became outdated due to significant codebase changes. This reimplementation maintains the same functionality while adapting to the current codebase structure.
The persistence bug fix was critical - without it, the setting would reset on every VS Code restart. The issue was traced to a property name mismatch in the message payload between frontend and backend.
Get in Touch
Discord: @MuriloFP
Credits to @SannidhyaSah for the original PR and implementation.
Important
This PR adds a configurable maximum search results feature to the codebase indexing settings, with UI updates, backend handling, and internationalization support.
codebaseIndexSearchMaxResultstocodebaseIndexConfigSchemaincodebase-index.tswith validation for range 10-200.updateCodebaseIndexConfighandler inwebviewMessageHandler.tsto merge configuration updates.search()inqdrant-client.tsto usemaxResultsparameter.ExperimentalSettings.tsxwith real-time updates.updateCodebaseIndexConfiginwebviewMessageHandler.spec.tsandconfig-manager.spec.ts.ExperimentalSettings.spec.tsx.This description was created by
for fda1594202d43d42b75cd80af8209bd8eb358ec3. You can customize this summary. It will automatically update as commits are pushed.