@@ -41,7 +41,16 @@ export abstract class IdeClient {
4141 } ) ;
4242
4343 this . sharedProcessData = new Promise ( ( resolve ) : void => {
44- client . onSharedProcessActive ( resolve ) ;
44+ let d = client . onSharedProcessActive ( ( data ) => {
45+ d . dispose ( ) ;
46+ d = client . onSharedProcessActive ( ( ) => {
47+ d . dispose ( ) ;
48+ this . retry . notificationService . error (
49+ new Error ( "Disconnected from shared process. Searching, installing, enabling, and disabling extensions will not work until the page is refreshed." ) ,
50+ ) ;
51+ } ) ;
52+ resolve ( data ) ;
53+ } ) ;
4554 } ) ;
4655
4756 window . addEventListener ( "contextmenu" , ( event ) => {
@@ -65,17 +74,17 @@ export abstract class IdeClient {
6574 } ) ;
6675 }
6776
68- /**
69- * Wrap a task in some logging, timing, and progress updates. Can optionally
70- * wait on other tasks which won't count towards this task's time.
71- */
7277 public async task < T > ( description : string , duration : number , task : ( ) => Promise < T > ) : Promise < T > ;
7378 public async task < T , V > ( description : string , duration : number , task : ( v : V ) => Promise < T > , t : Promise < V > ) : Promise < T > ;
7479 public async task < T , V1 , V2 > ( description : string , duration : number , task : ( v1 : V1 , v2 : V2 ) => Promise < T > , t1 : Promise < V1 > , t2 : Promise < V2 > ) : Promise < T > ;
7580 public async task < T , V1 , V2 , V3 > ( description : string , duration : number , task : ( v1 : V1 , v2 : V2 , v3 : V3 ) => Promise < T > , t1 : Promise < V1 > , t2 : Promise < V2 > , t3 : Promise < V3 > ) : Promise < T > ;
7681 public async task < T , V1 , V2 , V3 , V4 > ( description : string , duration : number , task : ( v1 : V1 , v2 : V2 , v3 : V3 , v4 : V4 ) => Promise < T > , t1 : Promise < V1 > , t2 : Promise < V2 > , t3 : Promise < V3 > , t4 : Promise < V4 > ) : Promise < T > ;
7782 public async task < T , V1 , V2 , V3 , V4 , V5 > ( description : string , duration : number , task : ( v1 : V1 , v2 : V2 , v3 : V3 , v4 : V4 , v5 : V5 ) => Promise < T > , t1 : Promise < V1 > , t2 : Promise < V2 > , t3 : Promise < V3 > , t4 : Promise < V4 > , t5 : Promise < V5 > ) : Promise < T > ;
7883 public async task < T , V1 , V2 , V3 , V4 , V5 , V6 > ( description : string , duration : number , task : ( v1 : V1 , v2 : V2 , v3 : V3 , v4 : V4 , v5 : V5 , v6 : V6 ) => Promise < T > , t1 : Promise < V1 > , t2 : Promise < V2 > , t3 : Promise < V3 > , t4 : Promise < V4 > , t5 : Promise < V5 > , t6 : Promise < V6 > ) : Promise < T > ;
84+ /**
85+ * Wrap a task in some logging, timing, and progress updates. Can optionally
86+ * wait on other tasks which won't count towards this task's time.
87+ */
7988 public async task < T > (
8089 description : string , duration : number = 100 , task : ( ...args : any [ ] ) => Promise < T > , ...after : Array < Promise < any > > // tslint:disable-line no-any
8190 ) : Promise < T > {
0 commit comments