void icon indicating copy to clipboard operation
void copied to clipboard

[Feature] Import other setting profiles from VS Code

Open joezhouchenye opened this issue 7 months ago • 15 comments

New user of void. When I click transfer from VS Code, only the default setting profile is imported to void. I have to manually export profiles from VS Code and import them to void.

joezhouchenye avatar May 08 '25 06:05 joezhouchenye

Thanks for reporting this. Do you know where the profiles are stored on your computer? Here is the relevant code right now: https://github.com/voideditor/void/blob/main/src/vs/workbench/contrib/void/browser/extensionTransferService.ts We simply have to add new transfer locations.

andrewpareles avatar May 08 '25 10:05 andrewpareles

I think it's in ~/.config/Code/User/profiles.

Image

Image

joezhouchenye avatar May 08 '25 10:05 joezhouchenye

@andrewpareles assign it to me

RNAdvani avatar May 08 '25 11:05 RNAdvani

@andrewpareles i have written the code for it but after the initial build the vs code doesn't reset, can u tell me the path of the builds, I am on windows 11, i removed the following folders but couldn't reset it

.out .void .void-editor .oss-dev-editor

and User/<Username>/Void

I want to clear the storage so i can import the profiles and run

RNAdvani avatar May 10 '25 16:05 RNAdvani

On windows, clearing %APPDATA%/.void-editor should work

Normally you can run a temporary dev mode with ./scripts/code.sh --user-data-dir ./.tmp/user-data --extensions-dir ./.tmp/extensions (and delete .tmp), but I don't think that will work here since this requires full application level testing

andrewpareles avatar May 11 '25 05:05 andrewpareles

turns out it is getting saved as /code-oss-dev in %appdata% for dev build I am not sure if it is the same while downloading through the website

RNAdvani avatar May 11 '25 07:05 RNAdvani

The dev location is different from the built location. Dev is named oss-dev, and regular is named void

andrewpareles avatar May 11 '25 08:05 andrewpareles

so i have found the solution, VSC maintains a local database using "@vscode/spqlite3" now to copy the state.vscdb we either need a take the snapshot of that, as we directly can't copy the file while VS code is running as that is locked by OS mutex. The workaround here is to ask the user to close the VSC while transferring the data in windows, linux can easily make the snapshot of that without any interference. and to actually run the sqlite3 script i would have to write down whole thing so that the user can actually import everything without shutting.

RNAdvani avatar May 11 '25 11:05 RNAdvani

@andrewpareles so should we make them close vs code while transferring?

RNAdvani avatar May 12 '25 13:05 RNAdvani

Are you saying it's necessary to close VSCode/Cursor/Windsurf when the user is transferring their settings, or just when transferring their profile? If just profile, I think we should make this into a separate button and alert them to close the other window when they click it.

andrewpareles avatar May 12 '25 18:05 andrewpareles

yes, only profile needs closing editors other files are JSON except the profile file which is SQL state and when running, is blocked by OS. I'll add profile in void's settings with alert?

RNAdvani avatar May 13 '25 06:05 RNAdvani

Sounds great!

andrewpareles avatar May 13 '25 06:05 andrewpareles

@andrewpareles i found the way where we can directly transfer it there are few workarounds can you just tell me where do we store onboarding state or gemini key so what it does when we click on transfer it copies it and keeps it in a temp folder and restarts the void editor and before restarting it copies staged files to the "actual" location in that ig the onboarding part is getting lost i just need to store that rest everything works

RNAdvani avatar May 17 '25 17:05 RNAdvani

so the onboarding data would get deleted if we use transfer from vscode/windsurf/cursor as the api keys and data is stored in each profile as the the corresponding vscdb doesn't have those data so would it be possible for us to show transfer first then ask the users to enter api keys? after that it works perfectly

RNAdvani avatar May 17 '25 19:05 RNAdvani

@andrewpareles everything is working i just have one doubt when we run _hostservice.restar does it remove in memory data otherwise everything is working and even api keys are getting saved after profile transfer just when we call hostservice.restart to relaunch we get onboarding screen again but when we manually close and open every state is proper the only bug i need to fix otherwise everything seems normal

RNAdvani avatar May 18 '25 17:05 RNAdvani