移除从open with vscode后自动进入home页面

This commit is contained in:
2025-11-03 15:21:06 +08:00
parent ece4943d2a
commit 7e33976d51

View File

@@ -92,7 +92,8 @@ export default class RemoteContainer {
} else { } else {
console.log(`[RemoteContainer] Running in local environment, attempting firstConnect`); console.log(`[RemoteContainer] Running in local environment, attempting firstConnect`);
try { try {
await this.firstConnect(host, hostname, username, port) //传入真实IP
await this.firstConnect(host, '192.168.10.4', username, port)
.then((res) => { .then((res) => {
if (res === 'success') { if (res === 'success') {
console.log(`[RemoteContainer] firstConnect succeeded, opening remote folder`); console.log(`[RemoteContainer] firstConnect succeeded, opening remote folder`);
@@ -318,7 +319,7 @@ export default class RemoteContainer {
let terminal = vscode.window.activeTerminal || vscode.window.createTerminal(`Ext Terminal`); let terminal = vscode.window.activeTerminal || vscode.window.createTerminal(`Ext Terminal`);
terminal.show(true); terminal.show(true);
const command = `code --remote ssh-remote+${username}@${host}:${port} ${path} --reuse-window`; const command = `code --remote ssh-remote+root@${host}:${port} ${path} --reuse-window`;
console.log(`[RemoteContainer] Sending command to terminal: ${command}`); console.log(`[RemoteContainer] Sending command to terminal: ${command}`);
// 在原窗口打开 // 在原窗口打开