@codingame/monaco-vscode-extensions-service-override 4.5.1 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/extensions.js +0 -2
  2. package/package.json +3 -3
  3. package/vscode/src/vs/base/common/console.js +1 -1
  4. package/vscode/src/vs/platform/extensionManagement/common/extensionManagementCLI.js +69 -136
  5. package/vscode/src/vs/platform/extensionResourceLoader/browser/extensionResourceLoaderService.js +1 -1
  6. package/vscode/src/vs/workbench/api/browser/mainThreadAuthentication.js +32 -37
  7. package/vscode/src/vs/workbench/api/browser/mainThreadBulkEdits.js +20 -2
  8. package/vscode/src/vs/workbench/api/browser/mainThreadCLICommands.js +12 -11
  9. package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents2.js +34 -10
  10. package/vscode/src/vs/workbench/api/browser/mainThreadCodeInsets.js +1 -1
  11. package/vscode/src/vs/workbench/api/browser/mainThreadCommands.js +1 -1
  12. package/vscode/src/vs/workbench/api/browser/mainThreadComments.js +44 -38
  13. package/vscode/src/vs/workbench/api/browser/mainThreadCustomEditors.js +60 -66
  14. package/vscode/src/vs/workbench/api/browser/mainThreadDebugService.js +3 -3
  15. package/vscode/src/vs/workbench/api/browser/mainThreadDocuments.js +6 -6
  16. package/vscode/src/vs/workbench/api/browser/mainThreadEditSessionIdentityParticipant.js +10 -9
  17. package/vscode/src/vs/workbench/api/browser/mainThreadEditor.js +1 -1
  18. package/vscode/src/vs/workbench/api/browser/mainThreadEditorTabs.js +45 -21
  19. package/vscode/src/vs/workbench/api/browser/mainThreadEditors.js +1 -1
  20. package/vscode/src/vs/workbench/api/browser/mainThreadExtensionService.js +41 -50
  21. package/vscode/src/vs/workbench/api/browser/mainThreadFileSystem.js +1 -1
  22. package/vscode/src/vs/workbench/api/browser/mainThreadFileSystemEventService.js +53 -100
  23. package/vscode/src/vs/workbench/api/browser/mainThreadLanguageFeatures.js +30 -13
  24. package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModels.js +32 -41
  25. package/vscode/src/vs/workbench/api/browser/mainThreadLogService.js +2 -2
  26. package/vscode/src/vs/workbench/api/browser/mainThreadMessageService.js +47 -56
  27. package/vscode/src/vs/workbench/api/browser/mainThreadNotebookEditors.js +3 -1
  28. package/vscode/src/vs/workbench/api/browser/mainThreadNotebookKernels.js +5 -5
  29. package/vscode/src/vs/workbench/api/browser/mainThreadNotebookSaveParticipant.js +7 -10
  30. package/vscode/src/vs/workbench/api/browser/mainThreadProgress.js +11 -12
  31. package/vscode/src/vs/workbench/api/browser/mainThreadSaveParticipant.js +8 -11
  32. package/vscode/src/vs/workbench/api/browser/mainThreadSearch.js +3 -3
  33. package/vscode/src/vs/workbench/api/browser/mainThreadTask.js +185 -165
  34. package/vscode/src/vs/workbench/api/browser/mainThreadTerminalShellIntegration.js +38 -10
  35. package/vscode/src/vs/workbench/api/browser/mainThreadTesting.js +1 -0
  36. package/vscode/src/vs/workbench/api/browser/mainThreadTreeViews.js +1 -1
  37. package/vscode/src/vs/workbench/api/browser/mainThreadTunnelService.js +28 -30
  38. package/vscode/src/vs/workbench/api/browser/mainThreadUriOpeners.js +23 -23
  39. package/vscode/src/vs/workbench/api/browser/mainThreadWebviewPanels.js +3 -3
  40. package/vscode/src/vs/workbench/api/browser/mainThreadWebviewViews.js +3 -3
  41. package/vscode/src/vs/workbench/api/browser/mainThreadWebviews.js +19 -18
  42. package/vscode/src/vs/workbench/api/browser/mainThreadWorkspace.js +36 -33
  43. package/vscode/src/vs/workbench/api/common/shared/dataTransferCache.js +2 -2
  44. package/vscode/src/vs/workbench/services/extensionManagement/browser/extensionBisect.js +56 -121
  45. package/vscode/src/vs/workbench/services/extensions/browser/extensionService.js +1 -1
  46. package/vscode/src/vs/workbench/services/extensions/browser/webWorkerFileSystemProvider.js +5 -5
  47. package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.js +133 -144
  48. package/vscode/src/vs/workbench/services/extensions/common/extensionHostManager.js +34 -33
  49. package/vscode/src/vs/workbench/services/extensions/common/extensionsUtil.js +9 -8
  50. package/vscode/src/vs/workbench/services/extensions/common/lazyCreateExtensionHostManager.js +2 -5
  51. package/vscode/src/vs/workbench/api/browser/mainThreadChat.js +0 -70
  52. package/vscode/src/vs/workbench/api/browser/mainThreadIssueReporter.js +0 -50
@@ -24,6 +24,7 @@ import { IExtensionBisectService } from 'vscode/vscode/vs/workbench/services/ext
24
24
  import Severity$1 from 'vscode/vscode/vs/base/common/severity';
25
25
 
26
26
  var ExtensionBisectService_1, ExtensionBisectUi_1;
27
+ const _moduleId = "vs/workbench/services/extensionManagement/browser/extensionBisect";
27
28
  class BisectState {
28
29
  static fromJSON(raw) {
29
30
  if (!raw) {
@@ -31,7 +32,9 @@ class BisectState {
31
32
  }
32
33
  try {
33
34
  const data = JSON.parse(raw);
34
- return ( new BisectState(data.extensions, data.low, data.high, data.mid));
35
+ return (
36
+ (new BisectState(data.extensions, data.low, data.high, data.mid))
37
+ );
35
38
  }
36
39
  catch {
37
40
  return undefined;
@@ -50,7 +53,7 @@ let ExtensionBisectService = class ExtensionBisectService {
50
53
  constructor(logService, _storageService, _envService) {
51
54
  this._storageService = _storageService;
52
55
  this._envService = _envService;
53
- this._disabled = ( new Map());
56
+ this._disabled = ( (new Map()));
54
57
  const raw = _storageService.get(ExtensionBisectService_1._storageKey, -1 );
55
58
  this._state = BisectState.fromJSON(raw);
56
59
  if (this._state) {
@@ -82,20 +85,20 @@ let ExtensionBisectService = class ExtensionBisectService {
82
85
  return disabled ?? false;
83
86
  }
84
87
  _isEnabledInEnv(extension) {
85
- return Array.isArray(this._envService.enableExtensions) && ( this._envService.enableExtensions.some(id => areSameExtensions({ id }, extension.identifier)));
88
+ return Array.isArray(this._envService.enableExtensions) && ( (this._envService.enableExtensions.some(id => areSameExtensions({ id }, extension.identifier))));
86
89
  }
87
90
  async start(extensions) {
88
91
  if (this._state) {
89
- throw new Error('invalid state');
92
+ throw ( (new Error('invalid state')));
90
93
  }
91
- const extensionIds = ( extensions.map(ext => ext.identifier.id));
92
- const newState = ( new BisectState(extensionIds, 0, extensionIds.length, 0));
94
+ const extensionIds = ( (extensions.map(ext => ext.identifier.id)));
95
+ const newState = ( (new BisectState(extensionIds, 0, extensionIds.length, 0)));
93
96
  this._storageService.store(ExtensionBisectService_1._storageKey, JSON.stringify(newState), -1 , 1 );
94
97
  await this._storageService.flush();
95
98
  }
96
99
  async next(seeingBad) {
97
100
  if (!this._state) {
98
- throw new Error('invalid state');
101
+ throw ( (new Error('invalid state')));
99
102
  }
100
103
  if (seeingBad && this._state.mid === 0 && this._state.high === this._state.extensions.length) {
101
104
  return { bad: true, id: '' };
@@ -104,11 +107,11 @@ let ExtensionBisectService = class ExtensionBisectService {
104
107
  await this.reset();
105
108
  return { id: this._state.extensions[this._state.low], bad: seeingBad };
106
109
  }
107
- const nextState = ( new BisectState(
110
+ const nextState = ( (new BisectState(
108
111
  this._state.extensions,
109
112
  seeingBad ? this._state.low : this._state.mid,
110
113
  seeingBad ? this._state.mid : this._state.high
111
- ));
114
+ )));
112
115
  this._storageService.store(ExtensionBisectService_1._storageKey, JSON.stringify(nextState), -1 , 1 );
113
116
  await this._storageService.flush();
114
117
  return undefined;
@@ -118,14 +121,14 @@ let ExtensionBisectService = class ExtensionBisectService {
118
121
  await this._storageService.flush();
119
122
  }
120
123
  };
121
- ExtensionBisectService = ExtensionBisectService_1 = ( __decorate([
122
- ( __param(0, ILogService)),
123
- ( __param(1, IStorageService)),
124
- ( __param(2, IWorkbenchEnvironmentService))
125
- ], ExtensionBisectService));
124
+ ExtensionBisectService = ExtensionBisectService_1 = ( (__decorate([
125
+ ( (__param(0, ILogService))),
126
+ ( (__param(1, IStorageService))),
127
+ ( (__param(2, IWorkbenchEnvironmentService)))
128
+ ], ExtensionBisectService)));
126
129
  let ExtensionBisectUi = class ExtensionBisectUi {
127
130
  static { ExtensionBisectUi_1 = this; }
128
- static { this.ctxIsBisectActive = ( new RawContextKey('isExtensionBisectActive', false)); }
131
+ static { this.ctxIsBisectActive = ( (new RawContextKey('isExtensionBisectActive', false))); }
129
132
  constructor(contextKeyService, _extensionBisectService, _notificationService, _commandService) {
130
133
  this._extensionBisectService = _extensionBisectService;
131
134
  this._notificationService = _notificationService;
@@ -137,19 +140,11 @@ let ExtensionBisectUi = class ExtensionBisectUi {
137
140
  }
138
141
  _showBisectPrompt() {
139
142
  const goodPrompt = {
140
- label: ( localizeWithPath(
141
- 'vs/workbench/services/extensionManagement/browser/extensionBisect',
142
- 'I cannot reproduce',
143
- "I can't reproduce"
144
- )),
143
+ label: ( localizeWithPath(_moduleId, 0, "I can't reproduce")),
145
144
  run: () => this._commandService.executeCommand('extension.bisect.next', false)
146
145
  };
147
146
  const badPrompt = {
148
- label: ( localizeWithPath(
149
- 'vs/workbench/services/extensionManagement/browser/extensionBisect',
150
- 'This is Bad',
151
- "I can reproduce"
152
- )),
147
+ label: ( localizeWithPath(_moduleId, 1, "I can reproduce")),
153
148
  run: () => this._commandService.executeCommand('extension.bisect.next', true)
154
149
  };
155
150
  const stop = {
@@ -158,41 +153,37 @@ let ExtensionBisectUi = class ExtensionBisectUi {
158
153
  };
159
154
  const message = this._extensionBisectService.disabledCount === 1
160
155
  ? ( localizeWithPath(
161
- 'vs/workbench/services/extensionManagement/browser/extensionBisect',
162
- 'bisect.singular',
156
+ _moduleId,
157
+ 2,
163
158
  "Extension Bisect is active and has disabled 1 extension. Check if you can still reproduce the problem and proceed by selecting from these options."
164
159
  ))
165
160
  : ( localizeWithPath(
166
- 'vs/workbench/services/extensionManagement/browser/extensionBisect',
167
- 'bisect.plural',
161
+ _moduleId,
162
+ 3,
168
163
  "Extension Bisect is active and has disabled {0} extensions. Check if you can still reproduce the problem and proceed by selecting from these options.",
169
164
  this._extensionBisectService.disabledCount
170
165
  ));
171
166
  this._notificationService.prompt(Severity$1.Info, message, [goodPrompt, badPrompt, stop], { sticky: true, priority: NotificationPriority.URGENT });
172
167
  }
173
168
  };
174
- ExtensionBisectUi = ExtensionBisectUi_1 = ( __decorate([
175
- ( __param(0, IContextKeyService)),
176
- ( __param(1, IExtensionBisectService)),
177
- ( __param(2, INotificationService)),
178
- ( __param(3, ICommandService))
179
- ], ExtensionBisectUi));
180
- ( Registry.as(Extensions.Workbench)).registerWorkbenchContribution(ExtensionBisectUi, 3 );
169
+ ExtensionBisectUi = ExtensionBisectUi_1 = ( (__decorate([
170
+ ( (__param(0, IContextKeyService))),
171
+ ( (__param(1, IExtensionBisectService))),
172
+ ( (__param(2, INotificationService))),
173
+ ( (__param(3, ICommandService)))
174
+ ], ExtensionBisectUi)));
175
+ ( (Registry.as(Extensions.Workbench))).registerWorkbenchContribution(ExtensionBisectUi, 3 );
181
176
  registerAction2(class extends Action2 {
182
177
  constructor() {
183
178
  super({
184
179
  id: 'extension.bisect.start',
185
- title: ( localize2WithPath(
186
- 'vs/workbench/services/extensionManagement/browser/extensionBisect',
187
- 'title.start',
188
- 'Start Extension Bisect'
189
- )),
180
+ title: ( localize2WithPath(_moduleId, 4, 'Start Extension Bisect')),
190
181
  category: Categories.Help,
191
182
  f1: true,
192
- precondition: ( ExtensionBisectUi.ctxIsBisectActive.negate()),
183
+ precondition: ( (ExtensionBisectUi.ctxIsBisectActive.negate())),
193
184
  menu: {
194
185
  id: MenuId.ViewContainerTitle,
195
- when: ( ContextKeyExpr.equals('viewContainer', 'workbench.view.extensions')),
186
+ when: ( (ContextKeyExpr.equals('viewContainer', 'workbench.view.extensions'))),
196
187
  group: '2_enablement',
197
188
  order: 4
198
189
  }
@@ -206,22 +197,14 @@ registerAction2(class extends Action2 {
206
197
  const extensionsBisect = accessor.get(IExtensionBisectService);
207
198
  const extensions = (await extensionManagement.getInstalled(1 )).filter(ext => extensionEnablementService.isEnabled(ext));
208
199
  const res = await dialogService.confirm({
209
- message: ( localizeWithPath(
210
- 'vs/workbench/services/extensionManagement/browser/extensionBisect',
211
- 'msg.start',
212
- "Extension Bisect"
213
- )),
200
+ message: ( localizeWithPath(_moduleId, 5, "Extension Bisect")),
214
201
  detail: ( localizeWithPath(
215
- 'vs/workbench/services/extensionManagement/browser/extensionBisect',
216
- 'detail.start',
202
+ _moduleId,
203
+ 6,
217
204
  "Extension Bisect will use binary search to find an extension that causes a problem. During the process the window reloads repeatedly (~{0} times). Each time you must confirm if you are still seeing problems.",
218
205
  2 + Math.log2(extensions.length) | 0
219
206
  )),
220
- primaryButton: ( localizeWithPath(
221
- 'vs/workbench/services/extensionManagement/browser/extensionBisect',
222
- { key: 'msg2', comment: ['&& denotes a mnemonic'] },
223
- "&&Start Extension Bisect"
224
- ))
207
+ primaryButton: ( localizeWithPath(_moduleId, 7, "&&Start Extension Bisect"))
225
208
  });
226
209
  if (res.confirmed) {
227
210
  await extensionsBisect.start(extensions);
@@ -233,11 +216,7 @@ registerAction2(class extends Action2 {
233
216
  constructor() {
234
217
  super({
235
218
  id: 'extension.bisect.next',
236
- title: ( localize2WithPath(
237
- 'vs/workbench/services/extensionManagement/browser/extensionBisect',
238
- 'title.isBad',
239
- 'Continue Extension Bisect'
240
- )),
219
+ title: ( localize2WithPath(_moduleId, 8, 'Continue Extension Bisect')),
241
220
  category: Categories.Help,
242
221
  f1: true,
243
222
  precondition: ExtensionBisectUi.ctxIsBisectActive
@@ -271,13 +250,9 @@ registerAction2(class extends Action2 {
271
250
  return;
272
251
  }
273
252
  if (done.bad) {
274
- await dialogService.info(( localizeWithPath(
275
- 'vs/workbench/services/extensionManagement/browser/extensionBisect',
276
- 'done.msg',
277
- "Extension Bisect"
278
- )), ( localizeWithPath(
279
- 'vs/workbench/services/extensionManagement/browser/extensionBisect',
280
- 'done.detail2',
253
+ await dialogService.info(( localizeWithPath(_moduleId, 9, "Extension Bisect")), ( localizeWithPath(
254
+ _moduleId,
255
+ 10,
281
256
  "Extension Bisect is done but no extension has been identified. This might be a problem with {0}.",
282
257
  productService.nameShort
283
258
  )));
@@ -285,32 +260,16 @@ registerAction2(class extends Action2 {
285
260
  else {
286
261
  const res = await dialogService.confirm({
287
262
  type: Severity$1.Info,
288
- message: ( localizeWithPath(
289
- 'vs/workbench/services/extensionManagement/browser/extensionBisect',
290
- 'done.msg',
291
- "Extension Bisect"
292
- )),
293
- primaryButton: ( localizeWithPath(
294
- 'vs/workbench/services/extensionManagement/browser/extensionBisect',
295
- { key: 'report', comment: ['&& denotes a mnemonic'] },
296
- "&&Report Issue & Continue"
297
- )),
298
- cancelButton: ( localizeWithPath(
299
- 'vs/workbench/services/extensionManagement/browser/extensionBisect',
300
- 'continue',
301
- "Continue"
302
- )),
263
+ message: ( localizeWithPath(_moduleId, 9, "Extension Bisect")),
264
+ primaryButton: ( localizeWithPath(_moduleId, 11, "&&Report Issue & Continue")),
265
+ cancelButton: ( localizeWithPath(_moduleId, 12, "Continue")),
303
266
  detail: ( localizeWithPath(
304
- 'vs/workbench/services/extensionManagement/browser/extensionBisect',
305
- 'done.detail',
267
+ _moduleId,
268
+ 13,
306
269
  "Extension Bisect is done and has identified {0} as the extension causing the problem.",
307
270
  done.id
308
271
  )),
309
- checkbox: { label: ( localizeWithPath(
310
- 'vs/workbench/services/extensionManagement/browser/extensionBisect',
311
- 'done.disbale',
312
- "Keep this extension disabled"
313
- )), checked: true }
272
+ checkbox: { label: ( localizeWithPath(_moduleId, 14, "Keep this extension disabled")), checked: true }
314
273
  });
315
274
  if (res.checkboxChecked) {
316
275
  await extensionEnablementService.disableExtension({ id: done.id }, undefined);
@@ -325,49 +284,29 @@ registerAction2(class extends Action2 {
325
284
  async _checkForBad(dialogService, bisectService) {
326
285
  const { result } = await dialogService.prompt({
327
286
  type: Severity$1.Info,
328
- message: ( localizeWithPath(
329
- 'vs/workbench/services/extensionManagement/browser/extensionBisect',
330
- 'msg.next',
331
- "Extension Bisect"
332
- )),
287
+ message: ( localizeWithPath(_moduleId, 15, "Extension Bisect")),
333
288
  detail: ( localizeWithPath(
334
- 'vs/workbench/services/extensionManagement/browser/extensionBisect',
335
- 'bisect',
289
+ _moduleId,
290
+ 16,
336
291
  "Extension Bisect is active and has disabled {0} extensions. Check if you can still reproduce the problem and proceed by selecting from these options.",
337
292
  bisectService.disabledCount
338
293
  )),
339
294
  buttons: [
340
295
  {
341
- label: ( localizeWithPath(
342
- 'vs/workbench/services/extensionManagement/browser/extensionBisect',
343
- { key: 'next.good', comment: ['&& denotes a mnemonic'] },
344
- "I ca&&n't reproduce"
345
- )),
296
+ label: ( localizeWithPath(_moduleId, 17, "I ca&&n't reproduce")),
346
297
  run: () => false
347
298
  },
348
299
  {
349
- label: ( localizeWithPath(
350
- 'vs/workbench/services/extensionManagement/browser/extensionBisect',
351
- { key: 'next.bad', comment: ['&& denotes a mnemonic'] },
352
- "I can &&reproduce"
353
- )),
300
+ label: ( localizeWithPath(_moduleId, 18, "I can &&reproduce")),
354
301
  run: () => true
355
302
  },
356
303
  {
357
- label: ( localizeWithPath(
358
- 'vs/workbench/services/extensionManagement/browser/extensionBisect',
359
- { key: 'next.stop', comment: ['&& denotes a mnemonic'] },
360
- "&&Stop Bisect"
361
- )),
304
+ label: ( localizeWithPath(_moduleId, 19, "&&Stop Bisect")),
362
305
  run: () => undefined
363
306
  }
364
307
  ],
365
308
  cancelButton: {
366
- label: ( localizeWithPath(
367
- 'vs/workbench/services/extensionManagement/browser/extensionBisect',
368
- { key: 'next.cancel', comment: ['&& denotes a mnemonic'] },
369
- "&&Cancel Bisect"
370
- )),
309
+ label: ( localizeWithPath(_moduleId, 20, "&&Cancel Bisect")),
371
310
  run: () => null
372
311
  }
373
312
  });
@@ -378,11 +317,7 @@ registerAction2(class extends Action2 {
378
317
  constructor() {
379
318
  super({
380
319
  id: 'extension.bisect.stop',
381
- title: ( localize2WithPath(
382
- 'vs/workbench/services/extensionManagement/browser/extensionBisect',
383
- 'title.stop',
384
- 'Stop Extension Bisect'
385
- )),
320
+ title: ( localize2WithPath(_moduleId, 21, 'Stop Extension Bisect')),
386
321
  category: Categories.Help,
387
322
  f1: true,
388
323
  precondition: ExtensionBisectUi.ctxIsBisectActive
@@ -210,7 +210,7 @@ let BrowserExtensionHostFactory = class BrowserExtensionHostFactory {
210
210
  const snapshot = await this._getExtensionRegistrySnapshotWhenReady();
211
211
  const remoteEnv = await this._remoteAgentService.getEnvironment();
212
212
  if (!remoteEnv) {
213
- throw new Error('Cannot provide init data for remote extension host!');
213
+ throw ( new Error('Cannot provide init data for remote extension host!'));
214
214
  }
215
215
  const myExtensions = runningLocations.filterByExtensionHostKind(snapshot.extensions, 3 );
216
216
  const extensions = ( new ExtensionHostExtensions(snapshot.versionId, snapshot.extensions, ( myExtensions.map(extension => extension.identifier))));
@@ -33,19 +33,19 @@ class FetchFileSystemProvider {
33
33
  return Disposable.None;
34
34
  }
35
35
  writeFile(_resource, _content, _opts) {
36
- throw new NotSupportedError();
36
+ throw ( new NotSupportedError());
37
37
  }
38
38
  readdir(_resource) {
39
- throw new NotSupportedError();
39
+ throw ( new NotSupportedError());
40
40
  }
41
41
  mkdir(_resource) {
42
- throw new NotSupportedError();
42
+ throw ( new NotSupportedError());
43
43
  }
44
44
  delete(_resource, _opts) {
45
- throw new NotSupportedError();
45
+ throw ( new NotSupportedError());
46
46
  }
47
47
  rename(_from, _to, _opts) {
48
- throw new NotSupportedError();
48
+ throw ( new NotSupportedError());
49
49
  }
50
50
  }
51
51