Open mock workspace folder when --mock is used

Pre-sets the workspace to github-remote-file://mock-repo/ so the
Sessions UI starts with a folder already open, backed by the mock
file system provider from the E2E extension.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Osvaldo Ortega
2026-03-05 11:44:57 -08:00
parent f3a4923c94
commit 4b72d7e678

View File

@@ -137,7 +137,7 @@ ${importMapJson}
</head>
<body aria-label="">
<script type="module">
import { create } from '${fileRoot}/vs/sessions/sessions.web.main.internal.js';
import { create, URI } from '${fileRoot}/vs/sessions/sessions.web.main.internal.js';
create(document.body, {
productConfiguration: {
nameShort: 'Sessions (Web)',
@@ -146,7 +146,9 @@ ${importMapJson}
},
${additionalBuiltinExtensions}
workspaceProvider: {
workspace: undefined,
workspace: ${useMock
? `{ folderUri: URI.parse('github-remote-file://mock-repo/') }`
: 'undefined'},
open: async () => false,
payload: [['isSessionsWindow', 'true']],
},