@codingame/monaco-vscode-extensions-service-override 37.6.1 → 38.0.1

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 (44) hide show
  1. package/package.json +3 -3
  2. package/service-override/tools/missingMainThreadCustomers.js +4 -0
  3. package/vscode/src/vs/platform/extensionManagement/common/extensionManagementCLI.js +29 -29
  4. package/vscode/src/vs/workbench/api/browser/mainThreadAuthentication.d.ts +3 -19
  5. package/vscode/src/vs/workbench/api/browser/mainThreadAuthentication.js +133 -75
  6. package/vscode/src/vs/workbench/api/browser/mainThreadCLICommands.js +1 -1
  7. package/vscode/src/vs/workbench/api/browser/mainThreadComments.js +1 -1
  8. package/vscode/src/vs/workbench/api/browser/mainThreadCustomEditors.d.ts +13 -1
  9. package/vscode/src/vs/workbench/api/browser/mainThreadCustomEditors.js +108 -14
  10. package/vscode/src/vs/workbench/api/browser/mainThreadCustomTextEditorNavigation.d.ts +29 -0
  11. package/vscode/src/vs/workbench/api/browser/mainThreadCustomTextEditorNavigation.js +94 -0
  12. package/vscode/src/vs/workbench/api/browser/mainThreadDataChannels.js +6 -6
  13. package/vscode/src/vs/workbench/api/browser/mainThreadDebugService.js +8 -16
  14. package/vscode/src/vs/workbench/api/browser/mainThreadDocumentsAndEditors.d.ts +1 -1
  15. package/vscode/src/vs/workbench/api/browser/mainThreadDocumentsAndEditors.js +2 -1
  16. package/vscode/src/vs/workbench/api/browser/mainThreadEditSessionIdentityParticipant.js +1 -1
  17. package/vscode/src/vs/workbench/api/browser/mainThreadEditorTabs.js +3 -5
  18. package/vscode/src/vs/workbench/api/browser/mainThreadExtensionService.js +11 -11
  19. package/vscode/src/vs/workbench/api/browser/mainThreadFileSystemEventService.js +22 -20
  20. package/vscode/src/vs/workbench/api/browser/mainThreadLanguageFeatures.js +10 -3
  21. package/vscode/src/vs/workbench/api/browser/mainThreadMessageService.js +13 -7
  22. package/vscode/src/vs/workbench/api/browser/mainThreadOutputService.js +3 -3
  23. package/vscode/src/vs/workbench/api/browser/mainThreadProgress.d.ts +3 -4
  24. package/vscode/src/vs/workbench/api/browser/mainThreadProgress.js +13 -6
  25. package/vscode/src/vs/workbench/api/browser/mainThreadSCM.js +7 -0
  26. package/vscode/src/vs/workbench/api/browser/mainThreadSaveParticipant.js +1 -1
  27. package/vscode/src/vs/workbench/api/browser/mainThreadShare.d.ts +0 -1
  28. package/vscode/src/vs/workbench/api/browser/mainThreadShare.js +4 -9
  29. package/vscode/src/vs/workbench/api/browser/mainThreadTask.js +1 -1
  30. package/vscode/src/vs/workbench/api/browser/mainThreadTerminalService.js +6 -1
  31. package/vscode/src/vs/workbench/api/browser/mainThreadTerminalShellIntegration.js +13 -18
  32. package/vscode/src/vs/workbench/api/browser/mainThreadTunnelService.js +2 -2
  33. package/vscode/src/vs/workbench/api/browser/mainThreadUriOpeners.js +4 -3
  34. package/vscode/src/vs/workbench/api/browser/mainThreadWebviews.js +1 -1
  35. package/vscode/src/vs/workbench/api/browser/mainThreadWorkspace.js +5 -5
  36. package/vscode/src/vs/workbench/contrib/customEditor/common/customTextEditorModel.d.ts +1 -0
  37. package/vscode/src/vs/workbench/contrib/customEditor/common/customTextEditorModel.js +4 -1
  38. package/vscode/src/vs/workbench/services/extensionManagement/browser/extensionBisect.js +23 -23
  39. package/vscode/src/vs/workbench/services/extensionManagement/browser/webExtensionsScannerService.js +2 -2
  40. package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.js +19 -13
  41. package/vscode/src/vs/workbench/services/extensions/common/extensionHostManager.js +1 -1
  42. package/vscode/src/vs/workbench/services/extensions/common/extensionsProposedApi.js +1 -1
  43. package/vscode/src/vs/workbench/services/extensions/common/extensionsUtil.js +4 -4
  44. package/vscode/src/vs/workbench/services/themes/browser/cssExtensionPoint.js +5 -5
@@ -1,11 +1,13 @@
1
1
 
2
2
  import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
3
3
  import { multibyteAwareBtoa } from '@codingame/monaco-vscode-api/vscode/vs/base/common/strings';
4
- import { DeferredPromise, createCancelablePromise } from '@codingame/monaco-vscode-api/vscode/vs/base/common/async';
4
+ import { raceCancellation, DeferredPromise, createCancelablePromise } from '@codingame/monaco-vscode-api/vscode/vs/base/common/async';
5
5
  import { CancellationToken, CancellationTokenSource } from '@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation';
6
6
  import { onUnexpectedError, isCancellationError } from '@codingame/monaco-vscode-api/vscode/vs/base/common/errors';
7
7
  import { Emitter, Event } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
8
- import { Disposable, DisposableMap, DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
8
+ import { Disposable, DisposableMap, DisposableStore, toDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
9
+ import { IOutlineService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/outline/browser/outline.service';
10
+ import { MainThreadCustomTextEditorNavigation } from './mainThreadCustomTextEditorNavigation.js';
9
11
  import { Schemas } from '@codingame/monaco-vscode-api/vscode/vs/base/common/network';
10
12
  import { basename } from '@codingame/monaco-vscode-api/vscode/vs/base/common/path';
11
13
  import { isEqualOrParent, isEqual, toLocalResource } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
@@ -33,13 +35,14 @@ import { IEditorGroupsService } from '@codingame/monaco-vscode-api/vscode/vs/wor
33
35
  import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
34
36
  import { IWorkbenchEnvironmentService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/environment/common/environmentService.service';
35
37
  import { IExtensionService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions.service';
36
- import { IPathService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/path/common/pathService.service';
38
+ import '@codingame/monaco-vscode-api/vscode/vs/workbench/services/path/common/pathService';
37
39
  import { ResourceWorkingCopy } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/workingCopy/common/resourceWorkingCopy';
38
40
  import { NO_TYPE_ID, WorkingCopyCapabilities } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/workingCopy/common/workingCopy';
39
41
  import { IWorkingCopyFileService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/workingCopy/common/workingCopyFileService.service';
40
42
  import { IWorkingCopyService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/workingCopy/common/workingCopyService.service';
41
43
  import { IUriIdentityService } from '@codingame/monaco-vscode-api/vscode/vs/platform/uriIdentity/common/uriIdentity.service';
42
44
  import { IUntitledTextEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/untitled/common/untitledTextEditorService.service';
45
+ import { IPathService } from '@codingame/monaco-vscode-api/vscode/vs/platform/path/common/pathService.service';
43
46
 
44
47
  var MainThreadCustomEditorModel_1;
45
48
  var CustomEditorModelType;
@@ -62,7 +65,8 @@ let MainThreadCustomEditors = class MainThreadCustomEditors extends Disposable {
62
65
  _instantiationService,
63
66
  _webviewWorkbenchService,
64
67
  _uriIdentityService,
65
- _untitledTextEditorService
68
+ _untitledTextEditorService,
69
+ _outlineService
66
70
  ) {
67
71
  super();
68
72
  this.mainThreadWebview = mainThreadWebview;
@@ -74,9 +78,13 @@ let MainThreadCustomEditors = class MainThreadCustomEditors extends Disposable {
74
78
  this._webviewWorkbenchService = _webviewWorkbenchService;
75
79
  this._uriIdentityService = _uriIdentityService;
76
80
  this._untitledTextEditorService = _untitledTextEditorService;
81
+ this._outlineService = _outlineService;
77
82
  this._editorProviders = this._register(( new DisposableMap()));
83
+ this._navigation = this._register(( new DisposableMap()));
84
+ this._pendingNavigation = ( new Map());
78
85
  this._editorRenameBackups = ( new Map());
79
86
  this._pendingSideBySideDiffResolutions = ( new Map());
87
+ this._webviewHandles = ( new WeakMap());
80
88
  this._webviewOriginStore = ( new ExtensionKeyedWebviewOriginStore("mainThreadCustomEditors.origins", storageService));
81
89
  this._proxyCustomEditors = ( context.getProxy(ExtHostContext.ExtHostCustomEditors));
82
90
  this._register(workingCopyFileService.registerWorkingCopyProvider(editorResource => {
@@ -167,11 +175,8 @@ let MainThreadCustomEditors = class MainThreadCustomEditors extends Disposable {
167
175
  if (!(webviewInput instanceof CustomEditorInput || webviewInput instanceof CustomEditorDiffInput || webviewInput instanceof CustomEditorSideBySideDiffInput)) {
168
176
  return;
169
177
  }
170
- const handle = generateUuid();
171
178
  webviewInput.webview.origin = this._webviewOriginStore.getOrigin(viewType, extension.id);
172
- this.mainThreadWebviewPanels.addWebviewInput(handle, webviewInput, {
173
- serializeBuffersForPostMessage
174
- });
179
+ const handle = this.getOrAddWebviewInput(webviewInput, serializeBuffersForPostMessage);
175
180
  webviewInput.webview.options = options;
176
181
  webviewInput.webview.extension = extension;
177
182
  const resource = webviewInput instanceof CustomEditorDiffInput ? webviewInput.modifiedResource : webviewInput.resource;
@@ -203,11 +208,9 @@ let MainThreadCustomEditors = class MainThreadCustomEditors extends Disposable {
203
208
  }
204
209
  }
205
210
  } catch (error) {
206
- onUnexpectedError(error);
207
- webviewInput.webview.setHtml(this.mainThreadWebview.getWebviewResolvedFailedContent(viewType));
208
211
  additionalModelRefs.dispose();
209
212
  modelRef?.dispose();
210
- return;
213
+ throw error;
211
214
  }
212
215
  if (!modelRef) {
213
216
  additionalModelRefs.dispose();
@@ -283,6 +286,17 @@ let MainThreadCustomEditors = class MainThreadCustomEditors extends Disposable {
283
286
  } else {
284
287
  const actualResource = modelType === CustomEditorModelType.Text ? this._uriIdentityService.asCanonicalUri(resource) : resource;
285
288
  await this._proxyCustomEditors.$resolveCustomEditor(actualResource, handle, viewType, initData, position, cancellation);
289
+ if (modelType === CustomEditorModelType.Text && capabilities.supportsNavigation && !cancellation.isCancellationRequested && !webviewInput.isDisposed()) {
290
+ await this.resolveCustomTextEditorNavigation(
291
+ webviewInput,
292
+ handle,
293
+ viewType,
294
+ actualResource,
295
+ resolvedModelRef.object,
296
+ cancellation,
297
+ disposables
298
+ );
299
+ }
286
300
  }
287
301
  } catch (error) {
288
302
  onUnexpectedError(error);
@@ -295,6 +309,86 @@ let MainThreadCustomEditors = class MainThreadCustomEditors extends Disposable {
295
309
  }));
296
310
  this._editorProviders.set(viewType, disposables);
297
311
  }
312
+ getOrAddWebviewInput(webviewInput, serializeBuffersForPostMessage) {
313
+ let handle = this._webviewHandles.get(webviewInput);
314
+ if (!handle) {
315
+ handle = generateUuid();
316
+ this._webviewHandles.set(webviewInput, handle);
317
+ this.mainThreadWebviewPanels.addWebviewInput(handle, webviewInput, {
318
+ serializeBuffersForPostMessage
319
+ });
320
+ }
321
+ return handle;
322
+ }
323
+ async resolveCustomTextEditorNavigation(input, handle, viewType, resource, model, token, providerDisposables) {
324
+ if (!(model instanceof CustomTextEditorModel)) {
325
+ return;
326
+ }
327
+ const lifetime = ( new CancellationTokenSource(token));
328
+ const pending = {
329
+ selection: undefined,
330
+ changed: false
331
+ };
332
+ this._pendingNavigation.set(handle, pending);
333
+ const cleanup = ( new DisposableStore());
334
+ const clear = () => {
335
+ cleanup.dispose();
336
+ };
337
+ cleanup.add(toDisposable(() => {
338
+ providerDisposables.delete(cleanup);
339
+ lifetime.dispose(true);
340
+ this._pendingNavigation.delete(handle);
341
+ this._navigation.deleteAndDispose(handle);
342
+ if (input.navigation) {
343
+ input.navigation = undefined;
344
+ this._outlineService.notifyOutlineChanged();
345
+ }
346
+ }));
347
+ cleanup.add(input.onWillDispose(clear));
348
+ cleanup.add(input.webview.onDidDispose(clear));
349
+ providerDisposables.add(cleanup);
350
+ try {
351
+ const result = await raceCancellation(
352
+ this._proxyCustomEditors.$resolveCustomTextEditorNavigation(handle, viewType, resource, lifetime.token),
353
+ lifetime.token
354
+ );
355
+ if (!result || lifetime.token.isCancellationRequested || input.isDisposed()) {
356
+ this._proxyCustomEditors.$disposeCustomTextEditorNavigation(handle);
357
+ clear();
358
+ return;
359
+ }
360
+ const navigation = ( new MainThreadCustomTextEditorNavigation(
361
+ model.textEditorModel,
362
+ pending.changed ? pending.selection : result.selection,
363
+ handle,
364
+ this._proxyCustomEditors,
365
+ () => {
366
+ const group = input.group === undefined ? undefined : this._editorGroupService.getGroup(input.group);
367
+ if (group?.activeEditor === input) {
368
+ group.focus();
369
+ }
370
+ }
371
+ ));
372
+ this._navigation.set(handle, navigation);
373
+ input.navigation = navigation;
374
+ this._outlineService.notifyOutlineChanged();
375
+ } catch (error) {
376
+ clear();
377
+ if (!isCancellationError(error)) {
378
+ onUnexpectedError(error);
379
+ }
380
+ } finally {
381
+ this._pendingNavigation.delete(handle);
382
+ }
383
+ }
384
+ $onDidChangeCustomTextEditorSelection(handle, selection) {
385
+ this._navigation.get(handle)?.updateSelection(selection);
386
+ const pending = this._pendingNavigation.get(handle);
387
+ if (pending) {
388
+ pending.changed = true;
389
+ pending.selection = selection;
390
+ }
391
+ }
298
392
  resolveCustomEditorSideBySideDiff(
299
393
  modelType,
300
394
  webviewInput,
@@ -425,7 +519,7 @@ let MainThreadCustomEditors = class MainThreadCustomEditors extends Disposable {
425
519
  })());
426
520
  }
427
521
  };
428
- MainThreadCustomEditors = ( __decorate([( __param(3, IExtensionService)), ( __param(4, IStorageService)), ( __param(5, IWorkingCopyService)), ( __param(6, IWorkingCopyFileService)), ( __param(7, ICustomEditorService)), ( __param(8, IEditorGroupsService)), ( __param(9, IEditorService)), ( __param(10, IInstantiationService)), ( __param(11, IWebviewWorkbenchService)), ( __param(12, IUriIdentityService)), ( __param(13, IUntitledTextEditorService))], MainThreadCustomEditors));
522
+ MainThreadCustomEditors = ( __decorate([( __param(3, IExtensionService)), ( __param(4, IStorageService)), ( __param(5, IWorkingCopyService)), ( __param(6, IWorkingCopyFileService)), ( __param(7, ICustomEditorService)), ( __param(8, IEditorGroupsService)), ( __param(9, IEditorService)), ( __param(10, IInstantiationService)), ( __param(11, IWebviewWorkbenchService)), ( __param(12, IUriIdentityService)), ( __param(13, IUntitledTextEditorService)), ( __param(14, IOutlineService))], MainThreadCustomEditors));
429
523
  var HotExitState;
430
524
  (function(HotExitState) {
431
525
  let Type;
@@ -532,7 +626,7 @@ let MainThreadCustomEditorModel = MainThreadCustomEditorModel_1 = class MainThre
532
626
  this._register(workingCopyService.registerWorkingCopy(this));
533
627
  this._register(extensionService.onWillStop(e => {
534
628
  e.veto(true, ( localize(
535
- 5068,
629
+ 6389,
536
630
  "An extension provided editor for '{0}' is still open that would close otherwise.",
537
631
  this.name
538
632
  )));
@@ -600,7 +694,7 @@ let MainThreadCustomEditorModel = MainThreadCustomEditorModel_1 = class MainThre
600
694
  this._undoService.pushElement({
601
695
  type: UndoRedoElementType.Resource,
602
696
  resource: this._editorResource,
603
- label: label ?? ( localize(5069, "Edit")),
697
+ label: label ?? ( localize(6390, "Edit")),
604
698
  code: "undoredo.customEditorEdit",
605
699
  undo: () => this.undo(),
606
700
  redo: () => this.redo()
@@ -0,0 +1,29 @@
1
+ import { CancellationToken } from "@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation";
2
+ import { Disposable, IDisposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
3
+ import { IRange } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/core/range";
4
+ import { ISelection } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/core/selection";
5
+ import { ITextModel } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/model";
6
+ import { ICustomTextEditorNavigation } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/customEditor/common/customTextEditorNavigation";
7
+ import { ExtHostCustomEditorsShape, WebviewHandle } from "@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol";
8
+ export declare class MainThreadCustomTextEditorNavigation extends Disposable implements ICustomTextEditorNavigation {
9
+ readonly model: ITextModel;
10
+ private readonly _handle;
11
+ private readonly _proxy;
12
+ private readonly _focus;
13
+ private readonly _onDidChangeSelection;
14
+ readonly onDidChangeSelection: import("@codingame/monaco-vscode-api/vscode/vs/base/common/event").Event<void>;
15
+ private readonly _onDidDispose;
16
+ readonly onDidDispose: import("@codingame/monaco-vscode-api/vscode/vs/base/common/event").Event<void>;
17
+ private readonly _lifetime;
18
+ private readonly _states;
19
+ private _nextState;
20
+ private _disposed;
21
+ private _selection;
22
+ constructor(model: ITextModel, selection: ISelection | undefined, _handle: WebviewHandle, _proxy: ExtHostCustomEditorsShape, _focus: () => void);
23
+ get selection(): ISelection | undefined;
24
+ updateSelection(selection: ISelection | undefined): void;
25
+ revealRange(range: IRange, selection: ISelection | undefined, preserveFocus: boolean, token: CancellationToken): Promise<void>;
26
+ captureViewState(): IDisposable;
27
+ dispose(): void;
28
+ private _handleError;
29
+ }
@@ -0,0 +1,94 @@
1
+
2
+ import { CancellationTokenSource } from '@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation';
3
+ import { isCancellationError, onUnexpectedError } from '@codingame/monaco-vscode-api/vscode/vs/base/common/errors';
4
+ import { Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
5
+ import { Disposable, toDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
6
+
7
+ class MainThreadCustomTextEditorNavigation extends Disposable {
8
+ constructor(model, selection, _handle, _proxy, _focus) {
9
+ super();
10
+ this.model = model;
11
+ this._handle = _handle;
12
+ this._proxy = _proxy;
13
+ this._focus = _focus;
14
+ this._onDidChangeSelection = this._register(( new Emitter()));
15
+ this.onDidChangeSelection = this._onDidChangeSelection.event;
16
+ this._onDidDispose = this._register(( new Emitter()));
17
+ this.onDidDispose = this._onDidDispose.event;
18
+ this._lifetime = ( new CancellationTokenSource());
19
+ this._states = ( new Set());
20
+ this._nextState = 0;
21
+ this._disposed = false;
22
+ this._selection = selection;
23
+ }
24
+ get selection() {
25
+ return this._selection;
26
+ }
27
+ updateSelection(selection) {
28
+ if (!this._disposed) {
29
+ this._selection = selection;
30
+ this._onDidChangeSelection.fire();
31
+ }
32
+ }
33
+ async revealRange(range, selection, preserveFocus, token) {
34
+ if (this._disposed || token.isCancellationRequested) {
35
+ return;
36
+ }
37
+ if (selection) {
38
+ for (const stateId of this._states) {
39
+ this._proxy.$releaseCustomTextEditorViewState(this._handle, stateId);
40
+ }
41
+ this._states.clear();
42
+ }
43
+ const cancellation = ( new CancellationTokenSource(this._lifetime.token));
44
+ const listener = token.onCancellationRequested(() => cancellation.cancel());
45
+ try {
46
+ await this._proxy.$revealCustomTextEditorRange(this._handle, range, selection, preserveFocus, cancellation.token);
47
+ if (!preserveFocus && !cancellation.token.isCancellationRequested) {
48
+ this._focus();
49
+ }
50
+ } catch (error) {
51
+ this._handleError(error);
52
+ } finally {
53
+ listener.dispose();
54
+ cancellation.dispose();
55
+ }
56
+ }
57
+ captureViewState() {
58
+ if (this._disposed) {
59
+ return Disposable.None;
60
+ }
61
+ const stateId = this._nextState++;
62
+ this._states.add(stateId);
63
+ const captured = this._proxy.$captureCustomTextEditorViewState(this._handle, stateId).catch(error => {
64
+ this._states.delete(stateId);
65
+ this._proxy.$releaseCustomTextEditorViewState(this._handle, stateId);
66
+ this._handleError(error);
67
+ });
68
+ return toDisposable(() => {
69
+ void captured.then(async () => {
70
+ if (this._states.delete(stateId)) {
71
+ await this._proxy.$restoreCustomTextEditorViewState(this._handle, stateId, this._lifetime.token);
72
+ }
73
+ }).catch(error => this._handleError(error));
74
+ });
75
+ }
76
+ dispose() {
77
+ if (this._disposed) {
78
+ return;
79
+ }
80
+ this._disposed = true;
81
+ this._lifetime.dispose(true);
82
+ this._states.clear();
83
+ this._proxy.$disposeCustomTextEditorNavigation(this._handle);
84
+ this._onDidDispose.fire();
85
+ super.dispose();
86
+ }
87
+ _handleError(error) {
88
+ if (!isCancellationError(error)) {
89
+ onUnexpectedError(error);
90
+ }
91
+ }
92
+ }
93
+
94
+ export { MainThreadCustomTextEditorNavigation };
@@ -54,13 +54,13 @@ let MainThreadDataChannels = class MainThreadDataChannels extends Disposable {
54
54
  kind,
55
55
  status: {
56
56
  kind: "error",
57
- label: ( localize(5070, "Not available"))
57
+ label: ( localize(6391, "Not available"))
58
58
  },
59
59
  tooltip: ( localize(
60
- 5071,
60
+ 6392,
61
61
  "The selected link presentation provider does not accept this resource."
62
62
  )),
63
- ariaLabel: ( localize(5072, "Link presentation is not available"))
63
+ ariaLabel: ( localize(6393, "Link presentation is not available"))
64
64
  });
65
65
  return;
66
66
  }
@@ -105,10 +105,10 @@ let MainThreadDataChannels = class MainThreadDataChannels extends Disposable {
105
105
  kind: "resource",
106
106
  status: {
107
107
  kind: "error",
108
- label: ( localize(5070, "Not available"))
108
+ label: ( localize(6391, "Not available"))
109
109
  },
110
- tooltip: ( localize(5073, "The link presentation provider failed to load.")),
111
- ariaLabel: ( localize(5072, "Link presentation is not available"))
110
+ tooltip: ( localize(6394, "The link presentation provider failed to load.")),
111
+ ariaLabel: ( localize(6393, "Link presentation is not available"))
112
112
  });
113
113
  });
114
114
  return watcher;
@@ -21,6 +21,8 @@ let MainThreadDebugService = class MainThreadDebugService {
21
21
  this.visualizerService = visualizerService;
22
22
  this._toDispose = ( new DisposableStore());
23
23
  this._debugAdaptersHandleCounter = 1;
24
+ this._debugConfigurationProviders = this._toDispose.add(( new DisposableMap()));
25
+ this._debugAdapterDescriptorFactories = this._toDispose.add(( new DisposableMap()));
24
26
  this._visualizerHandles = ( new Map());
25
27
  this._visualizerTreeHandles = ( new Map());
26
28
  this._proxy = ( extHostContext.getProxy(ExtHostContext.ExtHostDebugService));
@@ -69,8 +71,6 @@ let MainThreadDebugService = class MainThreadDebugService {
69
71
  }
70
72
  }));
71
73
  this._debugAdapters = ( new Map());
72
- this._debugConfigurationProviders = ( new Map());
73
- this._debugAdapterDescriptorFactories = ( new Map());
74
74
  this._extHostKnownSessions = ( new Set());
75
75
  const viewModel = this.debugService.getViewModel();
76
76
  this._toDispose.add(
@@ -244,18 +244,14 @@ let MainThreadDebugService = class MainThreadDebugService {
244
244
  return this._proxy.$resolveDebugConfigurationWithSubstitutedVariables(handle, folder, config, token);
245
245
  };
246
246
  }
247
- this._debugConfigurationProviders.set(handle, provider);
248
- this._toDispose.add(
247
+ this._debugConfigurationProviders.set(
248
+ handle,
249
249
  this.debugService.getConfigurationManager().registerDebugConfigurationProvider(provider)
250
250
  );
251
251
  return Promise.resolve(undefined);
252
252
  }
253
253
  $unregisterDebugConfigurationProvider(handle) {
254
- const provider = this._debugConfigurationProviders.get(handle);
255
- if (provider) {
256
- this._debugConfigurationProviders.delete(handle);
257
- this.debugService.getConfigurationManager().unregisterDebugConfigurationProvider(provider);
258
- }
254
+ this._debugConfigurationProviders.deleteAndDispose(handle);
259
255
  }
260
256
  $registerDebugAdapterDescriptorFactory(debugType, handle) {
261
257
  const provider = {
@@ -264,18 +260,14 @@ let MainThreadDebugService = class MainThreadDebugService {
264
260
  return Promise.resolve(this._proxy.$provideDebugAdapter(handle, this.getSessionDto(session)));
265
261
  }
266
262
  };
267
- this._debugAdapterDescriptorFactories.set(handle, provider);
268
- this._toDispose.add(
263
+ this._debugAdapterDescriptorFactories.set(
264
+ handle,
269
265
  this.debugService.getAdapterManager().registerDebugAdapterDescriptorFactory(provider)
270
266
  );
271
267
  return Promise.resolve(undefined);
272
268
  }
273
269
  $unregisterDebugAdapterDescriptorFactory(handle) {
274
- const provider = this._debugAdapterDescriptorFactories.get(handle);
275
- if (provider) {
276
- this._debugAdapterDescriptorFactories.delete(handle);
277
- this.debugService.getAdapterManager().unregisterDebugAdapterDescriptorFactory(provider);
278
- }
270
+ this._debugAdapterDescriptorFactories.deleteAndDispose(handle);
279
271
  }
280
272
  getSession(sessionId) {
281
273
  if (sessionId) {
@@ -15,7 +15,7 @@ import { IWorkbenchEnvironmentService } from "@codingame/monaco-vscode-api/vscod
15
15
  import { IWorkingCopyFileService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/workingCopy/common/workingCopyFileService.service";
16
16
  import { IUriIdentityService } from "@codingame/monaco-vscode-api/vscode/vs/platform/uriIdentity/common/uriIdentity.service";
17
17
  import { IClipboardService } from "@codingame/monaco-vscode-api/vscode/vs/platform/clipboard/common/clipboardService.service";
18
- import { IPathService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/path/common/pathService.service";
18
+ import { IPathService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/path/common/pathService";
19
19
  import { IPaneCompositePartService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/panecomposite/browser/panecomposite.service";
20
20
  import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
21
21
  import { IQuickDiffModelService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/scm/browser/quickDiffModel.service";
@@ -21,12 +21,13 @@ import { IWorkbenchEnvironmentService } from '@codingame/monaco-vscode-api/vscod
21
21
  import { IWorkingCopyFileService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/workingCopy/common/workingCopyFileService.service';
22
22
  import { IUriIdentityService } from '@codingame/monaco-vscode-api/vscode/vs/platform/uriIdentity/common/uriIdentity.service';
23
23
  import { IClipboardService } from '@codingame/monaco-vscode-api/vscode/vs/platform/clipboard/common/clipboardService.service';
24
- import { IPathService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/path/common/pathService.service';
24
+ import '@codingame/monaco-vscode-api/vscode/vs/workbench/services/path/common/pathService';
25
25
  import { diffSets, diffMaps } from '@codingame/monaco-vscode-api/vscode/vs/base/common/collections';
26
26
  import { IPaneCompositePartService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/panecomposite/browser/panecomposite.service';
27
27
  import { ViewContainerLocation } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/views';
28
28
  import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
29
29
  import { IQuickDiffModelService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/scm/browser/quickDiffModel.service';
30
+ import { IPathService } from '@codingame/monaco-vscode-api/vscode/vs/platform/path/common/pathService.service';
30
31
 
31
32
  class TextEditorSnapshot {
32
33
  constructor(editor) {
@@ -14,7 +14,7 @@ class ExtHostEditSessionIdentityCreateParticipant {
14
14
  }
15
15
  async participate(workspaceFolder, token) {
16
16
  const p = ( new Promise((resolve, reject) => {
17
- setTimeout(() => reject(( new Error(( localize(5074, "Aborted onWillCreateEditSessionIdentity-event after 10000ms"))))), this.timeout);
17
+ setTimeout(() => reject(( new Error(( localize(6395, "Aborted onWillCreateEditSessionIdentity-event after 10000ms"))))), this.timeout);
18
18
  this._proxy.$onWillCreateEditSessionIdentity(workspaceFolder.uri, token, this.timeout).then(resolve, reject);
19
19
  }));
20
20
  return raceCancellationError(p, token);
@@ -238,7 +238,7 @@ let MainThreadEditorTabs = class MainThreadEditorTabs {
238
238
  tab: tabObject
239
239
  });
240
240
  if (editorInput instanceof MultiDiffEditorInput) {
241
- this._multiDiffEditorInputListeners.set(editorInput, Event.fromObservableLight(editorInput.resources)(() => {
241
+ this._multiDiffEditorInputListeners.set(tabId, Event.fromObservableLight(editorInput.resources)(() => {
242
242
  const tabInfo = this._tabInfoLookup.get(tabId);
243
243
  if (!tabInfo) {
244
244
  return;
@@ -270,10 +270,8 @@ let MainThreadEditorTabs = class MainThreadEditorTabs {
270
270
  if (removedTab.length === 0) {
271
271
  return;
272
272
  }
273
- this._tabInfoLookup.delete(removedTab[0]?.id ?? "");
274
- if (removedTab[0]?.input instanceof MultiDiffEditorInput) {
275
- this._multiDiffEditorInputListeners.deleteAndDispose(removedTab[0]?.input);
276
- }
273
+ this._tabInfoLookup.delete(removedTab[0].id);
274
+ this._multiDiffEditorInputListeners.deleteAndDispose(removedTab[0].id);
277
275
  this._proxy.$acceptTabOperation({
278
276
  groupId,
279
277
  index: editorIndex,
@@ -111,7 +111,7 @@ let MainThreadExtensionService = class MainThreadExtensionService {
111
111
  this._notificationService.notify({
112
112
  severity: Severity.Error,
113
113
  message: ( localize(
114
- 5075,
114
+ 6396,
115
115
  "Cannot activate the '{0}' extension because it depends on the '{1}' extension, which is not loaded. Would you like to reload the window to load the extension?",
116
116
  extName,
117
117
  missingInstalledDependency.manifest.displayName || missingInstalledDependency.manifest.name
@@ -119,7 +119,7 @@ let MainThreadExtensionService = class MainThreadExtensionService {
119
119
  actions: {
120
120
  primary: [toAction({
121
121
  id: "reload",
122
- label: ( localize(5076, "Reload Window")),
122
+ label: ( localize(6397, "Reload Window")),
123
123
  run: () => this._hostService.reload()
124
124
  })]
125
125
  }
@@ -130,7 +130,7 @@ let MainThreadExtensionService = class MainThreadExtensionService {
130
130
  this._notificationService.notify({
131
131
  severity: Severity.Error,
132
132
  message: ( localize(
133
- 5077,
133
+ 6398,
134
134
  "Cannot activate the '{0}' extension because it depends on the '{1}' extension which is not supported in the current workspace",
135
135
  extName,
136
136
  missingInstalledDependency.manifest.displayName || missingInstalledDependency.manifest.name
@@ -140,7 +140,7 @@ let MainThreadExtensionService = class MainThreadExtensionService {
140
140
  this._notificationService.notify({
141
141
  severity: Severity.Error,
142
142
  message: ( localize(
143
- 5078,
143
+ 6399,
144
144
  "Cannot activate the '{0}' extension because it depends on the '{1}' extension which is not supported in Restricted Mode",
145
145
  extName,
146
146
  missingInstalledDependency.manifest.displayName || missingInstalledDependency.manifest.name
@@ -148,7 +148,7 @@ let MainThreadExtensionService = class MainThreadExtensionService {
148
148
  actions: {
149
149
  primary: [toAction({
150
150
  id: "manageWorkspaceTrust",
151
- label: ( localize(5079, "Manage Workspace Trust")),
151
+ label: ( localize(6400, "Manage Workspace Trust")),
152
152
  run: () => this._commandService.executeCommand("workbench.trust.manage")
153
153
  })]
154
154
  }
@@ -157,7 +157,7 @@ let MainThreadExtensionService = class MainThreadExtensionService {
157
157
  this._notificationService.notify({
158
158
  severity: Severity.Error,
159
159
  message: ( localize(
160
- 5080,
160
+ 6401,
161
161
  "Cannot activate the '{0}' extension because it depends on the '{1}' extension which is disabled. Would you like to enable the extension and reload the window?",
162
162
  extName,
163
163
  missingInstalledDependency.manifest.displayName || missingInstalledDependency.manifest.name
@@ -165,7 +165,7 @@ let MainThreadExtensionService = class MainThreadExtensionService {
165
165
  actions: {
166
166
  primary: [toAction({
167
167
  id: "enable",
168
- label: ( localize(5081, "Enable and Reload")),
168
+ label: ( localize(6402, "Enable and Reload")),
169
169
  enabled: true,
170
170
  run: () => this._extensionEnablementService.setEnablement(
171
171
  [missingInstalledDependency],
@@ -178,7 +178,7 @@ let MainThreadExtensionService = class MainThreadExtensionService {
178
178
  this._notificationService.notify({
179
179
  severity: Severity.Error,
180
180
  message: ( localize(
181
- 5082,
181
+ 6403,
182
182
  "Cannot activate the '{0}' extension because it depends on the '{1}' extension which is disabled.",
183
183
  extName,
184
184
  missingInstalledDependency.manifest.displayName || missingInstalledDependency.manifest.name
@@ -199,7 +199,7 @@ let MainThreadExtensionService = class MainThreadExtensionService {
199
199
  this._notificationService.notify({
200
200
  severity: Severity.Error,
201
201
  message: ( localize(
202
- 5083,
202
+ 6404,
203
203
  "Cannot activate the '{0}' extension because it depends on the '{1}' extension from '{2}', which is not installed. Would you like to install the extension and reload the window?",
204
204
  extName,
205
205
  dependencyExtension.displayName,
@@ -208,14 +208,14 @@ let MainThreadExtensionService = class MainThreadExtensionService {
208
208
  actions: {
209
209
  primary: [toAction({
210
210
  id: "install",
211
- label: ( localize(5084, "Install and Reload")),
211
+ label: ( localize(6405, "Install and Reload")),
212
212
  run: () => this._extensionsWorkbenchService.install(dependencyExtension).then(() => this._hostService.reload(), e => this._notificationService.error(e))
213
213
  })]
214
214
  }
215
215
  });
216
216
  } else {
217
217
  this._notificationService.error(( localize(
218
- 5085,
218
+ 6406,
219
219
  "Cannot activate the '{0}' extension because it depends on an unknown '{1}' extension.",
220
220
  extName,
221
221
  missingDependency