Skip to content

Conversation

@mrubens
Copy link
Collaborator

@mrubens mrubens commented Jun 13, 2025

Important

searchFilesTool now restricts searches to within the workspace, blocking and logging errors for paths outside.

  • Behavior:
    • searchFilesTool in searchFilesTool.ts now checks if the search path is outside the workspace using isPathOutsideWorkspace.
    • If outside, increments consecutiveMistakeCount, records error, and sends error message to user and tool result.
  • Tests:
    • Added tests in searchFilesTool.spec.ts to verify behavior for paths inside and outside the workspace.
    • Tests for missing parameters and partial blocks remain unchanged.
  • Localization:
    • Added workspaceBoundaryError message to tools.json in multiple locales.

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

@mrubens mrubens requested review from cte and jr as code owners June 13, 2025 12:38
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. enhancement New feature or request labels Jun 13, 2025
@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Jun 13, 2025
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jun 13, 2025
@daniel-lxs
Copy link
Member

daniel-lxs commented Jun 13, 2025

Should the error also be shown to the user?
image
Some models might get confused and try over and over (although this is rare with SOTA models).
I noticed the consecutive mistake count is increased, so the model will eventually be interrupted, but I think it makes sense to show the error as well.

@mrubens mrubens merged commit ca0338a into main Jun 13, 2025
10 checks passed
@mrubens mrubens deleted the limit_search_files_to_workspace branch June 13, 2025 16:10
@github-project-automation github-project-automation bot moved this from Triage to Done in Roo Code Roadmap Jun 13, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Jun 13, 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 Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

6 participants