-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Ability to load global-state from a file #7011
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
Thanks for the input! Yeah this would be really great. I think this is a duplicate of #4212 so I will close it, please follow the other issue for updates! Although I think no one is working on it at the moment. |
@code-asher , thanks for the reference, I understand now the issue better. |
Ohh I actually did not know there was a profile import/export feature in VS Code. Does it work in Codespaces? Wondering if we can leverage that to report it upstream, because if they have an import feature and it is not including the state when it should, that sounds like a pretty clear bug. |
But, if the ask is to implement a one-time load completely separate from the profiles feature, my instinct is that this is actually more work than #4212, so if the implementation described in that ticket is sufficient we should go with that. |
I tried again after upgrading code-server to the latest. The profiles feature works well. Same as codespaces. So we know it's possible to load the global-state from a file. The missing part is how to instruct code-server to load from that file when it starts. |
Just stumbled on this and wanted to add (since it doesn't appear to have been mentioned) that both desktop and Local links like:
Empty, exported gist: I don't see any similar functionality for codespaces or github.dev:
Docs: https://code.visualstudio.com/docs/editor/profiles#_save-as-a-github-gist I have been able to manually import profiles in Via Profiles UI
Via Developer: Open URL
I have not been able to make this work with code-server URLs though but feels like I might be close, so just want to document my efforts (and avoid retrying): Direct,
URL
URL params don't work at all:
Looks like lots of this logic is defined here:
|
@micahyoung thank you, profiles really works and fortunately for all states like hidden panels and s.o., will try to implement the profile loading from file for the initial start of code-server UPD: |
Any update or workaround known to solve this issue? |
What is your suggestion?
Changes like icons order in the activity-bar are saved into "global state". Locally, vscode saves them in a sqlite db at
~/Library/Application\ Support/Code/User/globalStorage/state.vscdb
. Code-server seems to save them in the browserIndexedDb
intovscode-web-state-db-global
.My suggestion it to have a file on the file-system as a starting-point to be able to load the state from there first. (it'd be great to have only this location and never use the browser, but not sure if this is feasible).
Why do you want this feature?
I'm providing my users with a pre-configured vscode instance in the docker container. I can customize the settings, but I can't customize the state. Meaning, I can't for example provide a code-server instance where the Search button is on top of the Explorer button in the activity-bar.
Are there any workarounds to get this functionality today?
I was trying many approaches, e.g. changing the state from an extension, but it seems to be impossible. vscode extension API doesn't provide access to the global-state.
Are you interested in submitting a PR for this?
I wish I could :)
The text was updated successfully, but these errors were encountered: