-
Notifications
You must be signed in to change notification settings - Fork 2.8k
feat: add vscode-lm provider integration #276
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
|
|
Awesome! I’ll take a look. |
It looks like all hope is only for you, bro! If you don’t look at the crooked syntax and the lack of unit tests, then the main thing you need to understand about the provider is the free and unlimited use of OpenAI 4o, o1 and cloude 3.5 sonnet. I've been using this provider for 2 weeks now and I'm very pleased! I think this is the most important expansion of capabilities since the Roo branch of Cline. All that remains is to do tests, clean up the code, and it’s probably worth making a filter for the presence of the vs code lm API in the platform so that it does not appear on open source IDEs. Don't let the idea die! :) |
|
I cleaned up the code a little and updated the branch to the current version |
|
Not sure if this is based off this cline PR cline/cline#970 but just to say I've been using a build of cline with that code in for a few days and it's been working amazingly well. I really hope this gets some attention; I think it would be a massive game changer for this fork/project. |
Thanks! I've had a few things ahead of this but am very excited to review. |
|
What's the best way for me to test this out? I haven't used the VS Code LM API before |
|
Hello RooCline! Whilst reviewing this PR please read the findings in the original pr this code is indeed based upon. The original code of this provider did work, but has MAJOR inefficiencies that waste a lot of resources. I want to clarify that i absolutely do not want to 'claim credit' and would love for this amazing feature to be rolled out; But this provider, in it's current state, has a lot off critical issues (as i've described in the original PR) Short version:
To adress these issues:
As you can see this providers requires a slew of breaking changes to function optimally. You're welcome to go and have a look how i've implemented the fixes for the problems described, and translate them to RooCline compatible code. However i must warn you, I've deviated from the Cline code quite a lot already and have no idea if any of the changes I've made are stable enough to actually be released. I cannot stress this enough; I don't think the original provider code is production ready just yet. Cheers! |
You'll need to install the Copilot and Copilot Chat extensions for VSCode. Sidenote: You can use it either with a subscription or the new GitHub Copilot Free. |
|
Thank you @julesmons, I'll take a look at your repo! I did get the list of models showing up with the Copilot account but now I see this error when I try to start a task - is there a step I'm missing?
|
Sadly i don't know what @RaySinner has changed so i have no clue why this happens. |
Er sorry to bug - it's something I broke when trying to clean up whitespace on this branch. As you all were... |
|
I didn't know that it had so many critical errors, and I haven't encountered any restrictions with it yet. I like how it works. But he's right, it's based on his code, so this PR can be closed further, you'll figure it out yourself. although I'm sure that he's just greedy and you won't reach an agreement, and roo-cline will simply be left without such a wonderful provider. |
|
Greedy? Agreement?? That's absolutely not the point of the message i've left... The point was to make sure stable code got merged. I was merely listing known-issues so not only the RooCline dev(s) can make informed decisions regarding their codebase, but you also have pointers to go and improve the existing code with (As i've directed my attention elsewhere for the time being). If any developers are looking to pick this up, feel free to message me for additional information. |
|
I really appreciate both of you moving this forward. I'll take a closer look and see if we can get this out in a responsible way. Thanks so much! |
|
Salut, vscode-lm:copilot/claude-3.7-sonnet ne marche pas sur cline, quand je l'utilise il affiche le message suivant : Request Failed: 400 {"error":{"message":"Model is not supported for this request.","param":"model","code":"model_not_supported","type":"invalid_request_error"}} je tient a préciser que j'ai la version pro de github copilot et que vscode-lm:copilot/claude-3.5-sonnet fonctionne très bien dans cline, quelqu'un aurait une solution ? |
Thanks to this provider, Roo-Cline gets the opportunity to free, unlimited use of models provided by Github Copilot, namely:
Attention: The provider is only available on the original version of VS Code due to the fact that Copilot is a proprietary functionality.
To use the provider, you need to have a PRO subscription to Copilot, or create a new Microsoft account every 30 days and activate a 30-day free trial period on it. But believe me, the free unlimited sonnet 3.5 is worth it.
Description
This PR adds support for VS Code Language Model provider integration, allowing users to leverage VS Code's built-in language model capabilities directly within Cline. The integration includes a complete provider implementation, transformation logic for message formatting, and UI components for configuration.
Key features:
Type of change
How Has This Been Tested?
Additional context
This provider integration enables seamless use of VS Code's language model capabilities, enhancing the extension's functionality while maintaining compatibility with existing provider interfaces. The implementation follows VS Code's extension API best practices and includes proper TypeScript definitions for improved development experience.
Reviewers
@original-fork-owner
Important
This PR integrates VS Code's Language Model API into the extension, adding a new provider for GitHub Copilot models and updating UI and configuration components to support this integration.
VsCodeLmHandlerto integrate VS Code Language Model API insrc/api/providers/vscode-lm.ts.ApiOptions.tsx.VsCodeLmHandler.ApiOptions.tsxto include VS Code LM API as a provider option.ApiOptions.tsx.vsCodeLmModelSelectortopackage.jsonandClineProvider.tsfor model configuration.stringifyVsCodeLmModelSelectorinvsCodeSelectorUtils.tsfor model selector string conversion.ExtensionMessage.tsandWebviewMessage.tsto handle VS Code LM API messages.This description was created by
for cc162c1b906cd6735069685112a771b86368ca51. It will automatically update as commits are pushed.