-
Notifications
You must be signed in to change notification settings - Fork 835
[PoC] Make use of vscode.lm tools contributed by arbitrary VSCode extensions #684
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
base: main
Are you sure you want to change the base?
Conversation
|
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 delete should probably be reverted
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.
definitely if Kilo would accept this PR.
it's deleted as tests have not been updated to pass, according to function/class signature changes for the functionalities. serve as a workaround to make it pushable for initial discussion.
the tests are less concert, compared to tool approval ui/logic, which would need major workouts beyond done so far.
anyway, let's see it working and discuss/decide further directions for now.
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.
Pull Request Overview
This PR introduces support for invoking VS Code LM tools via a new agentic interface, along with a persistent tool selection TreeView, and integrates these capabilities with Kilo's core systems.
- Added new interfaces and configuration for VS Code LM tools
- Implemented VSCLMToolsService to manage and expose available tools via a TreeView
- Updated provider, prompt generation, and tool invocation logic to leverage the VSCLM tool system
- Removed the pre-push hook file
Reviewed Changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
src/shared/tools.ts | Added new interfaces and configuration for VS Code LM tools |
src/services/vsclm/design.md | Provided design details for the new tool selection feature |
src/services/vsclm/VSCLMToolsService.ts | Implemented the service to manage and display VSCLM tool data |
src/package.json | Registered new tree view and commands for tool selection |
src/core/webview/generateSystemPrompt.ts | Integrated VSCLM tool service into system prompt generation |
src/core/webview/ClineProvider.ts | Added VSCLMToolsService instance and accessor in the provider |
src/core/tools/vsclmt.ts | Created tool invocation routine for VS Code LM tools |
src/core/task/Task.ts | Included VSCLM service when generating system prompts |
src/core/prompts/tools/vsclmt.ts | Provided documentation for the new VSCLMT tool |
src/core/prompts/tools/index.ts | Registered the VSCLMT tool description mapping |
src/core/prompts/system.ts | Updated system prompt generation to include VSCLMT info |
src/core/prompts/sections/vsclmt.ts | Added a section to display available VS Code LM tools in prompts |
src/core/prompts/sections/index.ts | Exported the VSCLMT prompts section |
src/core/assistant-message/presentAssistantMessage.ts | Integrated the VSCLMT tool in the assistant message presentation |
packages/types/src/tool.ts | Updated tool types to include VSCLMT commands |
.husky/pre-push | Removed the pre-push hook that previously enforced pre-deployment checks |
Comments suppressed due to low confidence (2)
.husky/pre-push:1
- The removal of the pre-push hook may bypass important pre-deployment validations like type checking and changeset verification. Confirm that this removal is intentional or consider restoring the hook to maintain development safeguards.
diff --git a/.husky/pre-push b/.husky/pre-push
src/services/vsclm/VSCLMToolsService.ts:263
- The prepareToolInvocation method always returns undefined, which prevents the handling of tool confirmation messages. Consider implementing the intended functionality or updating the documentation to remove potential confusion.
return undefined
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.
As a POC this is definitely very cool, thank you! I think we should add this for sure but we need to tweak some more on this PR to make it compatible with how we want the UI for it to be, for example adding it as a separate pane in the activity bar would not be my preference. I'd rather have it be a settings pane or something like that. One reason being is that it now breaks the 'open in editor' mode but and having another pane below the default chat view is not ideal.
For the rest I would definitely like to land this! //cc @RSO
@kevinvandijk @RSO Glad you would consider to land this! If Kilo would like to merge this, I'm happy to further work it out wrt ideal UI/UX aspects. Do you have guidance or best practice for the mods, as to ease pulling new features from Roo repo? I had some pain experience to maintain XXL sized (due to UI mods involved) PR against Roo, that being ever (sometimes hardly) rebased with Roo's fast dev pace, this PoC mod by far is designed to be minimal wrt frequent rebasing in mind, so not taking UI/UX as a priority till now. |
@chrarnoldus Pls chime in and comment some? |
1d2e508
to
2377b26
Compare
Thanks for your patience @complyue. As @kevinvandijk mentioned, we are definitely interested in taking this. My feedback so far is the following:
Are you interested in continuing to work on this? We can also consider taking it from here otherwise. @kevinvandijk @hassoncs thoughts? |
@complyue I just used your PR to tell GitViz to visualize commits.... kinda cool. One anomaly though, I installed the GitHub Remote Server, the tools show up in Copilots' Tool dropdown, but not in your list. Any ideas why? |
@chrarnoldus @kevinvandijk @hassoncs In Roo they had to add There might be a need to make the whole tool system, discovery based and configurable (to use a tool or not) at many levels per project / monorepo folder / or per mode basis. Copilot already has an inclusion method with They use MS has significantly raised the bar for they whole MCP client consumption ecosystem with the latest Copilot / VS Code release Sounds like a fun project to start on 👨🚀 🚀 |
I very much agree! the treeview solution in this PoC is solely for easier rebasing by myself to keep up with Kilo/Roo in building .vsix for my team use.
I think it's possible, just set
it'll write into
yes, pretty the same.
I tried to tackle the webview ui part, but it touches too many places in the codebase, e.g. extension messaging, those I don't think I can maintain well enough. I would appreciate very much if you take it from here, you (+ @kevinvandijk @hassoncs) are definitely more capable than me to get this functionality into maintainable code. that said I'll be very glad to be in the loop and see what I can contribute. |
@adamhill I'm not sure which ext you are referring to? https://marketplace.visualstudio.com/search?term=github%20remote%20server&target=VSCode&category=All%20categories&sortBy=Relevance didn't show an exact match. basically its |
@complyue I am referring to The official GitHub Remote server - https://github.blog/changelog/2025-06-12-remote-github-mcp-server-is-now-available-in-public-preview/ the tools show up in Agent mode along with several other |
@adamhill so they are probably MCP tools, this PoC is not discovering them by far, currently limited to LM tools from vscode extensions. |
@complyue Do you have any examples of extensions that provide useful tools? I remember looking at my extensions recently, but wasn't super impressed. |
@chrarnoldus Pls check the live list at https://marketplace.visualstudio.com/search?term=%40tag%3Alanguage-model-tools&target=VSCode&category=All%20categories&sortBy=Relevance For myself, "Roo Notebook Tools" is a must-have for my team use. |
bb362a2
to
ba5b240
Compare
@chrarnoldus @complyue A big part of the appeal of this PR for me is now being able to write extensions for VSCode that Kilo can consume as if it were a native tool, allowing people to expand Kilo tools without having to modify the main codebase. I am particularly interested in seeing if we could pull out something kinda complicated like Codebase Indexing or the Marketplace for easy experimentation. And since we could detect extensions that contribute a specific name / topic, they could automatically appear in an appropriate Settings section for toggling on and off. Maybe this could be a way for others to quickly iterate on Experimental features, without having to wait on Kilo releases or make testers pull a PR and compile it locally. |
@adamhill what would be the advantage of vscode lmtools over, e.g. an mcp tool? |
mcp tool has to run in a separate process, have no access to semantic IDE features that vscode provides, e.g. rename a symbol per the ide's knowledge about a variable's definition site and all use sites. an mcp tool would have to spin up a full LSP server hosting env and make use of LSP servers itself, to achieve the same thing which is trivial via vscode api. |
What @complyue said... :-) Direct access to the existing VSCode API's (and LSPs as complyue's just reminded me) is the primary benefit |
Anyone available to work on the following?
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing Touches🧪 Generate unit tests
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
@complyue @chrarnoldus This PR has become more important now. One of the VSCode PMs announced they will be allowing Extensions to contribute Models to VSCode now Edit: API details here We could use this PR to gain some knowledge in consuming 3rd party extensions in the codebase. |
Context
vscode.lm
officially has agentic tool interface defined, "vscode.copilot-chat" provides most of GitHub Copilot tools through that interface, and there are many standalone tool-providing VSCode extensions out there: @tag:language-model-tools including my own: https://marketplace.visualstudio.com/items?itemName=ComplYue.roo-nbThis PR proves the concept for Kilo (and a sister PR for Roo) to call those tools right there.
p.s. Roo team is less inclined to discuss this idea in near future, wonder about Kilo's position here.
Implementation
Pls see https://github.com/complyue/kilocode/blob/vsclmt/src/services/vsclm/design.md
Screenshots
More tools can be added:
How to Test
Tell Kilo to use some of those tools selected.
Get in Touch
Discord: complyue