Skip to content

Conversation

@p12tic
Copy link
Contributor

@p12tic p12tic commented Apr 4, 2025

Context

Currently search_files will produce up to 300 results (an arbitrary number). In cortain cases this is too large number because only first few occurrences are wanted. Unfortunately if too generic search pattern is selected, lots of results will be returned to the LLM and this will reduce remaining context significantly and require more time to process than would be otherwise necessary.

Implementation

To address this, an explicit optional max_results parameter has been added to the search_files tool. Its explanation is simple and it does not increase the Roo Code prompt size too much.

If the max_results parameter is not supplied, code works exactly as before.

Screenshots

Not applicable.

How to Test

Unfortunately there are no existing unit or integration tests for this functionality. The change has been tested manually.

Currently search_files will produce up to 300 results (an arbitrary
number). In cortain cases this is too large number because only first
few occurrences are wanted. Unfortunately if too generic search pattern
is selected, lots of results will be returned to the LLM and this will
reduce remaining context significantly and require more time to process
than needed.

To address this, an explicit optional max_results parameter has been
added to the search_files tool. Its explanation is simple and it does
not increase the Roo Code prompt size too much.

If the max_results parameter is not supplied, code works exactly as
before.
@changeset-bot
Copy link

changeset-bot bot commented Apr 4, 2025

⚠️ No Changeset found

Latest commit: 4c0add7

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. enhancement New feature or request labels Apr 4, 2025
@hannesrudolph hannesrudolph moved this from New to PR [Pre Approval Review] in Roo Code Roadmap Apr 6, 2025
Copy link
Collaborator

@mrubens mrubens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of having the LLM choose this, I think it might be more consistent to make this a setting in the Context Management section of the settings screen.

@hannesrudolph hannesrudolph moved this from New to PR [Pre Approval Review] in Roo Code Roadmap May 20, 2025
@hannesrudolph hannesrudolph moved this from PR [Needs Review] to TEMP in Roo Code Roadmap May 26, 2025
@daniel-lxs
Copy link
Member

Hey @p12tic,
Thank you for your contribution, We noticed this PR is stale and will be closed. If you plan to revisit this, please create an issue first as required by our issue-first approach before opening a new PR.

@daniel-lxs daniel-lxs closed this May 26, 2025
@github-project-automation github-project-automation bot moved this from PR [Pre Approval Review] to Done in Roo Code Roadmap May 26, 2025
@github-project-automation github-project-automation bot moved this from TEMP to Done in Roo Code Roadmap May 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request 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.

3 participants