revert: 取消功能【避免打开同一个项目】

This commit is contained in:
Levi Yan
2025-06-12 00:12:27 +08:00
parent b58e667edd
commit 29f6ece39c
3 changed files with 13 additions and 50 deletions

View File

@@ -68,29 +68,12 @@ export default class DSHome {
panel.webview.postMessage({ command: 'getUsername', data: { username: username } })
break;
}
case 'getCurrentHost':
let currentHost = null
if (vscode.env.remoteName) {
// 远程环境需要确认当前host名称项目名称
const currentHostRecorded = this.context.globalState.get('currentHost')
currentHost = currentHostRecorded != undefined ? currentHostRecorded : ""
} else {
// 如果当前是本地环境,则没有限制
}
if (null == currentHost || "" == currentHost) {
panel.webview.postMessage({ command: 'getCurrentHost', data: {currentHost: ''}})
break;
} else {
panel.webview.postMessage({ command: 'getCurrentHost', data: {currentHost: currentHost}})
break;
}
case 'firstOpenRemoteFolder':
// data.host - project name
await this.remoteContainer.firstOpenProject(data.host, data.hostname, data.port, data.username, data.path, this.context)
await this.remoteContainer.firstOpenProject(data.host, data.hostname, data.port, data.username, data.path)
break;
case 'openRemoteFolder':
this.remoteContainer.openRemoteFolder(data.host, data.port, data.username, data.path, this.context);
this.remoteContainer.openRemoteFolder(data.host, data.port, data.username, data.path);
break;
case 'getDevstarDomain':
panel.webview.postMessage({ command: 'getDevstarDomain', data: { devstarDomain: this.devstarDomain } })