Skip to content
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

Use VSCode Code CLI instead of VSCode code-server to run VSCode Web #411

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

Ricky-Hao
Copy link

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 current code-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.

@bcpeinhardt
Copy link
Collaborator

@matifali this would be a good opportunity to use the new individual version tag structure when releasing.

@matifali
Copy link
Member

Yes if this. lands, it should be go as 2.0.0 for vscode-web. @bcpeinhardt can you take care of this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants