auto get domain

This commit is contained in:
Cai
2025-10-26 21:39:49 +08:00
parent 9921848d9b
commit b921bda4bc
2 changed files with 6 additions and 6 deletions

View File

@@ -57,12 +57,10 @@ function ChangeWorkspacefileTree(fileTree) {
}
}
// vscode.window.showInformationMessage('Connecting to server...');
vs_socket = io('vscode');
const protocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:';
const host = window.location.host;
vs_socket = io(`${protocol}//${host}/vscode`);
vs_socket.on('connect', () => {
// vscode.window.showInformationMessage('Connected to server');
console.log('Connected to server');
vs_socket.emit('login', { config: code_like_config });
vs_socket.emit('load_chapter',{config: code_like_config})