Skip to content

Conversation

@roomote
Copy link
Collaborator

@roomote roomote commented Jun 26, 2025

Summary

This PR implements a configurable maximum search results setting for codebase indexing, addressing issue #5149.

Changes Made

Backend Configuration System

  • Added searchMaxResults property to CodeIndexConfig interface with default value of 50
  • Updated CodeIndexConfigManager to handle the new setting with getter method
  • Modified codebaseIndexSearchMaxResults schema in types package

Search Implementation Updates

  • Updated VectorStore.search() interface to accept configurable maxResults parameter
  • Modified QdrantClient.search() implementation to use configurable limit instead of hardcoded MAX_SEARCH_RESULTS constant
  • Updated SearchService.search() to pass the configured maximum results to vector store

User Interface

  • Added slider control in CodeIndexSettings component allowing users to adjust maximum search results from 1 to 500
  • Added localization keys for the new setting

Test Coverage

  • Updated all test expectations to include the new searchMaxResults field

Key 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

  • All existing tests pass
  • New configuration properly flows from UI → Config Manager → Search Service → Vector Store
  • Backward compatibility maintained for existing installations

Fixes #5149


Important

Add configurable searchMaxResults setting for codebase indexing, updating backend, search implementation, UI, and tests.

  • Backend Configuration:
    • Added searchMaxResults to CodeIndexConfig with default 50 in codebase-index.ts.
    • Updated CodeIndexConfigManager to handle searchMaxResults with a getter.
  • Search Implementation:
    • Updated VectorStore.search() to accept maxResults.
    • Modified QdrantClient.search() to use maxResults instead of MAX_SEARCH_RESULTS.
    • Updated SearchService.search() to pass maxResults.
  • User Interface:
    • Added slider in CodeIndexSettings.tsx to adjust searchMaxResults (1-500).
    • Added localization keys for new setting in settings.json.
  • Testing:
    • Updated tests in config-manager.spec.ts to include searchMaxResults.

This description was created by Ellipsis for fd65135. You can customize this summary. It will automatically update as commits are pushed.

cte added 2 commits June 26, 2025 12:34
…dexing

- Add searchMaxResults property to CodeIndexConfig with default value of 50
- Update VectorStore interface to accept configurable maxResults parameter
- Modify QdrantClient to use configurable limit instead of hardcoded MAX_SEARCH_RESULTS
- Add slider control in CodeIndexSettings UI (range: 1-500)
- Add localization keys for the new setting
- Update all tests to include new configuration field

Fixes #5149
@delve-auditor
Copy link

delve-auditor bot commented Jun 26, 2025

We have finished reviewing your PR. We have found no vulnerabilities.

Reply to this PR with @delve-auditor followed by a description of what change you want and we'll auto-submit a change to this PR to implement it.

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Jun 26, 2025
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. enhancement New feature or request labels Jun 26, 2025
@daniel-lxs daniel-lxs moved this from Triage to PR [Needs Prelim Review] in Roo Code Roadmap Jun 26, 2025
@hannesrudolph hannesrudolph added PR - Needs Preliminary Review and removed Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. labels Jun 26, 2025
@daniel-lxs daniel-lxs moved this from PR [Needs Prelim Review] to Triage in Roo Code Roadmap Jun 30, 2025
@hannesrudolph hannesrudolph added Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. and removed PR - Needs Preliminary Review labels Jun 30, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Jul 4, 2025
@github-project-automation github-project-automation bot moved this from Triage to Done in Roo Code Roadmap Jul 4, 2025
@cte cte deleted the fix-5149 branch July 31, 2025 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. size:M This PR changes 30-99 lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Add configurable maximum search results setting for codebase indexing

4 participants