-
Notifications
You must be signed in to change notification settings - Fork 56
feat(vscode-web): use VS Code code
CLI instead of VS Code code-server
#411
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
@matifali this would be a good opportunity to use the new individual version tag structure when releasing. |
Yes, if this lands, it should go as 2.0.0 for vscode-web. @bcpeinhardt can you take care of this? |
code
CLI instead of VS Code code-server
Hi @Ricky-Hao, Sorry for not coming to this earlier. We were sorting versions for the modules, and as this module changes stuff significantly while Aldo breaks a few existing =g use cases, We needed that to land this in. Can you update the |
I would also like @michaelbrewer to review as he has contributed to this module in past. |
Hi @Ricky-Hao, why can we not support these two features with VS Code's |
Hi @matifali, sorry for the delayed response. |
I think the difference here is that |
Hi,
The current VSCode Web module directly uses
code-server
to start a VSCode Web instance.However, I noticed that the current VSCode Web only stores user credentials (e.g., GitHub authentication) in in-memory storage.
After investigating the VSCode source code, I discovered that VSCode Web requires a key from the
/mint-key
endpoint.In Coder's
code-server
, the/mint-key
endpoint is implemented.However, in the official VSCode version, the
/mint-key
functionality is only available in the VSCode CLI (code
binary).To enable credential persistence, we need to use
code serve-web
to start a VSCode Web instance instead of the currentcode-server serve-local
.In this PR, I updated the process to use
code serve-web
to start a VSCode Web instance.Most of the features from the old
code-server
are supported, except for the following two:OFFLINE
USE_CACHE
I did not remove these variables from the
.tf
files to maintain compatibility.