feat: firstOpenProject, in remote environment, create new local window, then call extension and open project by command
This commit is contained in:
18
src/main.ts
18
src/main.ts
@@ -73,6 +73,24 @@ export class DevStarExtension {
|
||||
} else {
|
||||
vscode.window.showErrorMessage('Missing required parameters.');
|
||||
}
|
||||
} else if (uri.path === "/openProjectSkippingLoginCheck") {
|
||||
// 仅有已登录、不用改变登录状态时,用此流程
|
||||
const params = new URLSearchParams(uri.query);
|
||||
const host = params.get('host');
|
||||
const hostname = params.get('hostname');
|
||||
const port = params.get('port');
|
||||
const username = params.get('username');
|
||||
const path = params.get('path');
|
||||
|
||||
if (host && hostname && port && username && path) {
|
||||
const container_host = host;
|
||||
const container_hostname = hostname
|
||||
const container_port = parseInt(port, 10);
|
||||
const container_username = username;
|
||||
const project_path = decodeURIComponent(path);
|
||||
|
||||
await this.remoteContainer.firstOpenProject(container_host, container_hostname, container_port, container_username, project_path, this.context)
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user