@@ -92,17 +92,6 @@ export async function activate(context: vscode.ExtensionContext) {
92
92
const remoteConnector = new RemoteConnector ( context , sessionService , hostService , experiments , logger , telemetryService , notificationService , remoteService ) ;
93
93
context . subscriptions . push ( remoteConnector ) ;
94
94
95
- context . subscriptions . push ( vscode . window . registerUriHandler ( {
96
- handleUri ( uri : vscode . Uri ) {
97
- // logger.trace('Handling Uri...', uri.toString());
98
- if ( uri . path === GitpodServer . AUTH_COMPLETE_PATH ) {
99
- authProvider . handleUri ( uri ) ;
100
- } else {
101
- remoteConnector . handleUri ( uri ) ;
102
- }
103
- }
104
- } ) ) ;
105
-
106
95
remoteConnectionInfo = getGitpodRemoteWindowConnectionInfo ( context ) ;
107
96
vscode . commands . executeCommand ( 'setContext' , 'gitpod.remoteConnection' , ! ! remoteConnectionInfo ) ;
108
97
@@ -121,13 +110,21 @@ export async function activate(context: vscode.ExtensionContext) {
121
110
// Backwards compatibility with older gitpod-remote extensions
122
111
commandManager . register ( { id : 'gitpod.api.autoTunnel' , execute : ( ) => { } } ) ;
123
112
124
- if ( ! context . globalState . get < boolean > ( FIRST_INSTALL_KEY , false ) ) {
125
- context . globalState . update ( FIRST_INSTALL_KEY , true ) ;
126
- telemetryService . sendTelemetryEvent ( 'gitpod_desktop_installation' , { gitpodHost : hostService . gitpodHost , kind : 'install' } ) ;
127
- }
113
+ const firstLoadPromise = sessionService . didFirstLoad . then ( ( ) => remoteConnector . updateSSHRemotePlatform ( ) ) ;
114
+
115
+ context . subscriptions . push ( vscode . window . registerUriHandler ( {
116
+ handleUri ( uri : vscode . Uri ) {
117
+ // logger.trace('Handling Uri...', uri.toString());
118
+ if ( uri . path === GitpodServer . AUTH_COMPLETE_PATH ) {
119
+ authProvider . handleUri ( uri ) ;
120
+ } else {
121
+ firstLoadPromise . then ( ( ) => remoteConnector . handleUri ( uri ) ) ;
122
+ }
123
+ }
124
+ } ) ) ;
128
125
129
126
// Because auth provider implementation is in the same extension, we need to wait for it to activate first
130
- sessionService . didFirstLoad . then ( async ( ) => {
127
+ firstLoadPromise . then ( async ( ) => {
131
128
if ( remoteConnectionInfo ) {
132
129
remoteSession = new RemoteSession ( remoteConnectionInfo . connectionInfo , context , remoteService , hostService , sessionService , experiments , logger ! , telemetryService ! , notificationService ) ;
133
130
await remoteSession . initialize ( ) ;
@@ -141,6 +138,11 @@ export async function activate(context: vscode.ExtensionContext) {
141
138
}
142
139
} ) ;
143
140
141
+ if ( ! context . globalState . get < boolean > ( FIRST_INSTALL_KEY , false ) ) {
142
+ context . globalState . update ( FIRST_INSTALL_KEY , true ) ;
143
+ telemetryService . sendTelemetryEvent ( 'gitpod_desktop_installation' , { gitpodHost : hostService . gitpodHost , kind : 'install' } ) ;
144
+ }
145
+
144
146
success = true ;
145
147
} finally {
146
148
const rawActivateProperties = {
0 commit comments