Skip to content

Conversation

@cte
Copy link
Collaborator

@cte cte commented Dec 15, 2025

The isToolAllowedForMode function doesn't need to be shared since it's not used by the webview, and if we want to extend the implementation for custom tools then it needs to be solely in the extension host.


Important

Relocate isToolAllowedForMode to core/tools/validateToolUse and update references and tests accordingly.

  • Function Relocation:
    • Move isToolAllowedForMode from shared/modes to core/tools/validateToolUse.
    • Update all references to isToolAllowedForMode in presentAssistantMessage.ts, getEnvironmentDetails.spec.ts, filter-tools-for-mode.ts, index.ts, native-tools-filtering.spec.ts, validateToolUse.spec.ts, and modes.spec.ts.
  • Testing:
    • Update tests in getEnvironmentDetails.spec.ts, native-tools-filtering.spec.ts, validateToolUse.spec.ts, and modes.spec.ts to reflect the new location of isToolAllowedForMode.
  • Miscellaneous:
    • Remove isToolAllowedForMode from shared/modes.ts and adjust imports accordingly.

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

@cte cte requested review from jr and mrubens as code owners December 15, 2025 10:17
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Dec 15, 2025
@roomote
Copy link
Contributor

roomote bot commented Dec 15, 2025

Rooviewer Clock   See task on Roo Cloud

Review complete. No issues found.

This PR cleanly moves isToolAllowedForMode from shared/modes.ts to core/tools/validateToolUse.ts, which is appropriate since the function is not needed by the webview and co-locating it with related validation logic enables future extensibility for custom tools.

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.

@cte cte merged commit c713916 into main Dec 15, 2025
13 checks passed
@cte cte deleted the cte/move-is-tool-allowed-for-mode branch December 15, 2025 10:18
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Dec 15, 2025
@github-project-automation github-project-automation bot moved this from Triage to Done in Roo Code Roadmap Dec 15, 2025
@roomote roomote bot mentioned this pull request Dec 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

2 participants