@@ -618,10 +618,10 @@ export default class RemoteConnector extends Disposable {
618
618
return true ;
619
619
}
620
620
621
- private async showSSHPasswordModal ( password : string , gitpodHost : string ) {
621
+ private async showSSHPasswordModal ( password : string , sshParams : SSHConnectionParams ) {
622
622
const maskedPassword = '•' . repeat ( password . length - 3 ) + password . substring ( password . length - 3 ) ;
623
623
624
- const gitpodVersion = await getGitpodVersion ( gitpodHost ) ;
624
+ const gitpodVersion = await getGitpodVersion ( sshParams . gitpodHost ) ;
625
625
const sshKeysSupported = isFeatureSupported ( gitpodVersion , 'SSHPublicKeys' ) ;
626
626
627
627
const copy : vscode . MessageItem = { title : 'Copy' } ;
@@ -631,12 +631,15 @@ export default class RemoteConnector extends Disposable {
631
631
? `You don't have registered any SSH public key for this machine in your Gitpod account.\nAlternatively, copy and use this temporary password until workspace restart: ${ maskedPassword } `
632
632
: `An SSH key is required for passwordless authentication.\nAlternatively, copy and use this password: ${ maskedPassword } ` ;
633
633
const action = await vscode . window . showWarningMessage ( message , { modal : true } , copy , configureSSH , showLogs ) ;
634
+
635
+ this . telemetry . sendRawTelemetryEvent ( 'vscode_desktop_ssh_gateway_modal' , { action : action ?. title ?? 'Canceled' , ...sshParams , gitpodVersion : gitpodVersion . raw } ) ;
636
+
634
637
if ( action === copy ) {
635
638
await vscode . env . clipboard . writeText ( password ) ;
636
639
return ;
637
640
}
638
641
if ( action === configureSSH ) {
639
- const serviceUrl = new URL ( gitpodHost ) . toString ( ) . replace ( / \/ $ / , '' ) ;
642
+ const serviceUrl = new URL ( sshParams . gitpodHost ) . toString ( ) . replace ( / \/ $ / , '' ) ;
640
643
const externalUrl = sshKeysSupported ? `${ serviceUrl } /keys` : 'https://www.gitpod.io/docs/configure/ssh#create-an-ssh-key' ;
641
644
await vscode . env . openExternal ( vscode . Uri . parse ( externalUrl ) ) ;
642
645
throw new Error ( `SSH password modal dialog, Configure SSH` ) ;
@@ -707,7 +710,7 @@ export default class RemoteConnector extends Disposable {
707
710
sshDestination = destination ;
708
711
709
712
if ( password ) {
710
- await this . showSSHPasswordModal ( password , params . gitpodHost ) ;
713
+ await this . showSSHPasswordModal ( password , params ) ;
711
714
}
712
715
713
716
this . telemetry . sendRawTelemetryEvent ( 'vscode_desktop_ssh' , { kind : 'gateway' , status : 'connected' , ...params , gitpodVersion : gitpodVersion . raw } ) ;
0 commit comments