diff --git a/src/node/app/vscode.ts b/src/node/app/vscode.ts
index 37cf1046..e80a2b23 100644
--- a/src/node/app/vscode.ts
+++ b/src/node/app/vscode.ts
@@ -134,6 +134,7 @@ export class VscodeHttpProvider extends HttpProvider {
return { redirect: "/login", query: { to: this.options.base } }
}
try {
+ this.persistRouteQuery(request, route)
return await this.getRoot(request, route)
} catch (error) {
const message = `
VS Code failed to load.
${
@@ -164,6 +165,13 @@ export class VscodeHttpProvider extends HttpProvider {
throw new HttpError("Not found", HttpCode.NotFound)
}
+
+ private persistRouteQuery(request: http.IncomingMessage, route: Route): void {
+ const content = Object.keys(route.query).reduce((content, next) => {
+ return (content += `${next}=${route.query[next]}\n`)
+ }, "")
+ fs.writeFile(path.resolve(paths.data, "query"), content)
+ }
private async getRoot(request: http.IncomingMessage, route: Route): Promise {
const remoteAuthority = request.headers.host as string