@@ -253,6 +253,40 @@ export const checkConnection = (clearCookies = false): void => {
253
253
} ) ;
254
254
} ;
255
255
256
+ async function serverManager ( ) : Promise < void > {
257
+ const extId = "intersystems-community.servermanager" ;
258
+ const ignore =
259
+ config ( "ignoreInstallServerManager" ) ||
260
+ vscode . workspace . getConfiguration ( "intersystems.servers" ) . get ( "/ignore" , false ) ;
261
+ if ( ignore || vscode . extensions . getExtension ( extId ) ) {
262
+ return ;
263
+ }
264
+ return vscode . window
265
+ . showInformationMessage (
266
+ `Extension InterSystems® Server Manager have not installed,
267
+ it's recommended to install it.` ,
268
+ "Install" ,
269
+ "Skip" ,
270
+ "Ignore"
271
+ )
272
+ . then ( async ( action ) => {
273
+ switch ( action ) {
274
+ case "Install" :
275
+ await vscode . commands . executeCommand ( "workbench.extensions.installExtension" , extId ) ;
276
+ // eslint-disable-next-line no-fallthrough
277
+ case "View" :
278
+ await vscode . commands . executeCommand ( "workbench.extensions.search" , `@tag:"intersystems"` ) ;
279
+ await vscode . commands . executeCommand ( "extension.open" , extId ) ;
280
+ break ;
281
+ case "Ignore" :
282
+ config ( ) . update ( "ignoreInstallServerManager" , true , vscode . ConfigurationTarget . Global ) ;
283
+ break ;
284
+ case "Skip" :
285
+ default :
286
+ }
287
+ } ) ;
288
+ }
289
+
256
290
export async function activate ( context : vscode . ExtensionContext ) : Promise < void > {
257
291
if ( ! packageJson . version . includes ( "SNAPSHOT" ) ) {
258
292
reporter = new TelemetryReporter ( extensionId , extensionVersion , aiKey ) ;
@@ -540,6 +574,9 @@ export async function activate(context: vscode.ExtensionContext): Promise<void>
540
574
...proposed
541
575
) ;
542
576
reporter && reporter . sendTelemetryEvent ( "extensionActivated" ) ;
577
+
578
+ // offer to install servermanager extension
579
+ await serverManager ( ) ;
543
580
}
544
581
545
582
export function deactivate ( ) : void {
0 commit comments