-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Register URL handler for code scheme #1571
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
Comments
Given code-server doesn't run as an app locally, I'm not sure how we'd register for and handle such URLs. |
Using registerProtocolHandler the scheme can be mapped to a URL. Your browser will then confirm with the user that this is what they want. |
Neat, didn't know that existed, thanks for sharing. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no activity occurs in the next 5 days. |
I would have thought this is handled by vscode, is it still on the roadmap? |
It is not on the roadmap, and I am not sure if VS Code has added support for this. Does anyone know if it works in Codespaces? |
I am also interested in this feature. Though I have not tried it out by myself yet, according to the Codespaces documentation and this article on a similar topic, Codespaces has a special endpoint ( |
Update on this topic: For last few weeks, I have been working on enabling OAuth2 authorization code flow from our VSCode extension running in code-server and found While the changes on VS extension side were relatively simple, we needed to make some changes on the server side as well for (1) supporting wildcard in supported redirect URIs, and (2) making sure URI-encoded query parameters are processed properly. Since our server code is stored in a private repo, I cannot show those changes here. Anyway, I just wanted to say no changes were needed on code-server to make it work. |
Is there a way to call |
Hmm... I am not sure if it is possible... I wrote a very primitive VS Code extension based on the "Hello World" sample on VS Code Documentation. Does it satisfy your needs? The repo contains the vsix file and README contains a video on how to install/use it. |
@TamiTakamiya wow thanks! let me try it out shortly |
Any ideas? |
@bilogic So far I have opened external URIs with our VSCode extensions. When code-server is used, I think the scheme needs to be set to but this does not open the file in the editor... I am not sure if this is supposed to work. |
@TamiTakamiya thanks, so I have to specify the full path in your sample and not just the front part? Let me try again. Update: I get a link now, but loading the link in my Chrome does not open the file in code-server |
Also related to #3891 |
revisiting, this is definitely doable
|
code-server should be able to handle the
code
scheme, so URLs likevscode:extension/kayteh.plastic-slate
such as used to install themes via a Open in VSCode button e.g. on the Plastic Slate theme page on VSCodeThemes.Edit: not sure if we can handle
code
because the protocol must start withweb+
. Handlingweb+code-server
might make sense though.The text was updated successfully, but these errors were encountered: