-
Notifications
You must be signed in to change notification settings - Fork 2.6k
vscode extension tool interface #2851
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
Conversation
|
|
This pull request is quite large, with 37 files changed and over 1000 lines added. It includes a variety of changes such as documentation updates, new features, tests, and UI components. To improve the review process, it might be beneficial to split this pull request into smaller, more focused ones. Here are some suggestions on how to split the changes:
This approach will make it easier to review and test each part independently, ensuring a smoother integration process. |
src/core/prompts/responses.ts
Outdated
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.
This error message formatter duplicates the existing invalidMcpToolArgumentError. Consider consolidating these into a single function.
- function
invalidMcpToolArgumentError(responses.ts)
This comment was generated because it violated a code review rule: mrule_fYE6mUdYYxZL58YF.
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.
Consider using a stricter type than Record<string, any> for the properties field in the inputSchema. Using unknown or a well-defined interface for tool parameters can improve type checking and reduce potential runtime errors.
| properties?: Record<string, any> | |
| properties?: Record<string, unknown> |
This comment was generated because it violated a code review rule: mrule_QkEwsCio7v34DaCF.
mrubens
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.
This is really cool - thank you for the contribution!
The main thing I'm thinking about is how to make this available without confusing people who aren't interested in it. For instance could we get by without having an auto-approve toggle for this? It seems like we might want the auto-approve to be at the tool level anyway (and we should probably clean up MCP on this front as well).
Let me sleep on this and get back to you. Impressive work overall!
Great you are interested! I should thank you for Roo in the first place!
Yes, I feel MCP auto approval is already some coarse-grained than ideal, at least it implemented per-tool approval, while this PR is approving all Ext Tools as a whole, definitely not right. I thought about implementing finer grained per-tool approval for Ext Tool functions, taking MCP ui as example, but ui stuffs are more or less beyond my capacity (tho luckily Cursor + Sonnet has got me this far). Anyway, the core idea of this PR is simple and should be rather lightweight in coding, if not messing with UI design and UX considerations. Despite this PR, I'll be very happy if Roo would officially take this idea into a generalized (MCP+, including vscode ext, maybe workspace file based etc.) framework to integrate more external/modular agentic tools, I'd greatly enjoy contributing more tools (notebook ready, a long-run ai schedule under design, and maybe more) to Roo under this framework.
Thanks! And please take your time and get good sleep. |
be535dd to
a4f26e0
Compare
7244b61 to
0ff2b74
Compare
332d8e9 to
55a0617
Compare
|
@complyue Thanks for submitting this PR, and sincere apologies that it took us so long to review and respond. You deserved a quicker response from us. We're closing this PR now because it's no longer applicable due to the recent development of the Roo Code Marketplace. If you'd like to revisit this within the new context, please start by opening a new issue using our issue-first approach. We genuinely appreciate your patience and willingness to contribute. Thanks again! |
Context
Some tools would need vscode environment to correct function, but MCP would run the tool in separate os process, so no access to vscode env from the tool side.
This PR adds tool registration facility from other vscode extensions, otherwise basically the MCP tool integration solution.
Implementation
Please see PR contents.
How to Test
https://github.com/complyue/Roo-NB is an alternative way to add Notebook functionality to Roo, with this PR and that extension run together, it's equivalently what #1729 does.
Get in Touch
complyue Discord
Important
Introduces a new interface for VSCode extensions to register and manage custom tools within the Roo environment, with updates to handle tool interactions and UI components.
use_ext_toolfunctionality to allow VSCode extensions to register and use custom tools.Cline.ts,responses.ts, andsystem.tsto handleuse_ext_toolrequests.ExtensionToolManagerinExtensionToolManager.tsfor managing extension tools.ExtToolRow.tsxandExtToolsView.tsxfor displaying and managing extension tools in the UI.AutoApproveMenu.tsx,ChatRow.tsx, andChatView.tsxto support extension tool interactions.AutoApproveSettings.tsxandSettingsView.tsxto include settings for auto-approving extension tools.chat.jsonandsettings.jsonfor new extension tool features.This description was created by
for 17a21b50685bb5ed45e619c2da2cc15bc0c5464e. You can customize this summary. It will automatically update as commits are pushed.