Skip to content

VSCode: correctly locate workspaceStorage when working inside a dev container#180

Open
josteinaj wants to merge 1 commit intogetagentseal:mainfrom
josteinaj:locate-workspaceStorage-in-vscode-dev-container
Open

VSCode: correctly locate workspaceStorage when working inside a dev container#180
josteinaj wants to merge 1 commit intogetagentseal:mainfrom
josteinaj:locate-workspaceStorage-in-vscode-dev-container

Conversation

@josteinaj
Copy link
Copy Markdown

In a dev container, the path used is:

/home/vscode/.vscode-server/data/User/workspaceStorage

In other words, the vscode configuration is stored under ~/.vscode-server/data instead of ~/.config/Code.

@iamtoruk
Copy link
Copy Markdown
Member

Thanks for this! Dev container support is a good catch.

One thing: PR #181 (just merged) refactored this function from returning a single path to returning an array of paths. Your PR will have a merge conflict against current main.

The good news is the fix becomes even simpler with the new approach. Instead of checking env vars, you can just add the path to the Linux array since discoverVSCodeTranscripts already handles non-existent directories gracefully (returns []):

return [
  join(homedir(), '.config', 'Code', 'User', 'workspaceStorage'),
  join(homedir(), '.config', 'Code - Insiders', 'User', 'workspaceStorage'),
  join(homedir(), '.vscode-server', 'data', 'User', 'workspaceStorage'),
]

Could you rebase on main and update the diff? No env var check needed.

@josteinaj josteinaj force-pushed the locate-workspaceStorage-in-vscode-dev-container branch from 4b63c67 to 2de8909 Compare April 30, 2026 20:52
@josteinaj
Copy link
Copy Markdown
Author

Just my luck 😅. I rebased and updated now. Indeed the solution is even simpler and more robust now 👍.

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.

2 participants