@@ -41,7 +41,16 @@ export abstract class IdeClient {
41
41
} ) ;
42
42
43
43
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
+ } ) ;
45
54
} ) ;
46
55
47
56
window . addEventListener ( "contextmenu" , ( event ) => {
@@ -65,17 +74,17 @@ export abstract class IdeClient {
65
74
} ) ;
66
75
}
67
76
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
- */
72
77
public async task < T > ( description : string , duration : number , task : ( ) => Promise < T > ) : Promise < T > ;
73
78
public async task < T , V > ( description : string , duration : number , task : ( v : V ) => Promise < T > , t : Promise < V > ) : Promise < T > ;
74
79
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 > ;
75
80
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 > ;
76
81
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 > ;
77
82
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 > ;
78
83
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
+ */
79
88
public async task < T > (
80
89
description : string , duration : number = 100 , task : ( ...args : any [ ] ) => Promise < T > , ...after : Array < Promise < any > > // tslint:disable-line no-any
81
90
) : Promise < T > {
0 commit comments