dockerimg: fix vscode:// links
This adds an undocumented parameter that makes vsc open a new window
instead of replacing your current vsc window with the link.
diff --git a/dockerimg/dockerimg.go b/dockerimg/dockerimg.go
index 1d6237b..3a0cc7e 100644
--- a/dockerimg/dockerimg.go
+++ b/dockerimg/dockerimg.go
@@ -276,10 +276,12 @@
return appendInternalErr(fmt.Errorf("NewContainerSSHTheather: %w", err))
}
+ // Note: The vscode: link uses an undocumented request parameter that I really had to dig to find:
+ // https://github.com/microsoft/vscode/blob/2b9486161abaca59b5132ce3c59544f3cc7000f6/src/vs/code/electron-main/app.ts#L878
fmt.Printf(`Connect to this container via any of these methods:
🖥️ ssh %s
🖥️ code --remote ssh-remote+root@%s /app -n
-🔗 vscode://vscode-remote/ssh-remote+root@%s/app?n=true
+🔗 vscode://vscode-remote/ssh-remote+root@%s/app?windowId=_blank
`, cntrName, cntrName, cntrName)
sshUserIdentity = cst.userIdentity
sshServerIdentity = cst.serverIdentity