Skip to content

"Open in VS Code" opens the workspace file's parent folder instead of the .code-workspace #112

Description

For a multi-repo project defined by a .code-workspace file, the Open-in picker launches the editor on the containing directory, so VS Code opens it as a plain folder rather than as a multi-root workspace. The repo roots don't appear in the editor's tree.

Cause looks like ChatView.tsx:5904 passing openInCwd={gitCwd}, where gitCwd resolves from activeProject.workspaceRoot (ChatView.tsx:2446-2451) — which for a workspace-file project is the anchor directory by design (WorkspaceManifest.ts module docs).

The project already carries workspaceFile (contracts/orchestration.ts:216, migration 038_ProjectionProjectsWorkspaceFile), so passing that when present should fix it. Passing a file path is already supported — FilePreviewPanel.tsx:910 passes openInCwd={absolutePath} for a single file.

One caveat: this probably wants to be editor-aware rather than an unconditional swap. vscode / vscode-insiders / cursor understand .code-workspace files, but zed (contracts/editor.ts) would just open it as JSON text, which would be worse than the current behaviour.

Version: multi-repo-workspaces @ 92de5d9a, macOS arm64, dev build (pnpm dev).

Thanks for maintaining this fork — the multi-repo support is exactly what I needed.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions