@codingame/monaco-vscode-extensions-service-override 7.0.11 → 7.1.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 (29) hide show
  1. package/package.json +3 -3
  2. package/vscode/src/vs/platform/extensionManagement/common/extensionManagementCLI.js +44 -77
  3. package/vscode/src/vs/workbench/api/browser/mainThreadAuthentication.js +19 -33
  4. package/vscode/src/vs/workbench/api/browser/mainThreadCLICommands.js +3 -5
  5. package/vscode/src/vs/workbench/api/browser/mainThreadComments.js +17 -5
  6. package/vscode/src/vs/workbench/api/browser/mainThreadCustomEditors.js +3 -4
  7. package/vscode/src/vs/workbench/api/browser/mainThreadEditSessionIdentityParticipant.js +2 -7
  8. package/vscode/src/vs/workbench/api/browser/mainThreadEditorTabs.js +3 -3
  9. package/vscode/src/vs/workbench/api/browser/mainThreadExtensionService.js +19 -27
  10. package/vscode/src/vs/workbench/api/browser/mainThreadFileSystemEventService.js +29 -38
  11. package/vscode/src/vs/workbench/api/browser/mainThreadLanguageFeatures.js +4 -3
  12. package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModels.js +2 -3
  13. package/vscode/src/vs/workbench/api/browser/mainThreadMessageService.js +5 -6
  14. package/vscode/src/vs/workbench/api/browser/mainThreadNotebookSaveParticipant.js +2 -3
  15. package/vscode/src/vs/workbench/api/browser/mainThreadProgress.js +2 -3
  16. package/vscode/src/vs/workbench/api/browser/mainThreadSCM.js +21 -36
  17. package/vscode/src/vs/workbench/api/browser/mainThreadSaveParticipant.js +2 -3
  18. package/vscode/src/vs/workbench/api/browser/mainThreadTask.js +2 -3
  19. package/vscode/src/vs/workbench/api/browser/mainThreadTesting.js +19 -13
  20. package/vscode/src/vs/workbench/api/browser/mainThreadTunnelService.js +4 -6
  21. package/vscode/src/vs/workbench/api/browser/mainThreadUriOpeners.js +4 -6
  22. package/vscode/src/vs/workbench/api/browser/mainThreadWebviews.js +2 -8
  23. package/vscode/src/vs/workbench/api/browser/mainThreadWorkspace.js +14 -26
  24. package/vscode/src/vs/workbench/services/extensionManagement/browser/extensionBisect.js +29 -36
  25. package/vscode/src/vs/workbench/services/extensions/browser/webWorkerExtensionHost.js +16 -0
  26. package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.js +27 -32
  27. package/vscode/src/vs/workbench/services/extensions/common/extensionHostManager.js +2 -3
  28. package/vscode/src/vs/workbench/services/extensions/common/extensionsProposedApi.js +4 -5
  29. package/vscode/src/vs/workbench/services/extensions/common/extensionsUtil.js +9 -14
@@ -5,7 +5,7 @@ import { transformErrorFromSerialization } from 'vscode/vscode/vs/base/common/er
5
5
  import { FileAccess } from 'vscode/vscode/vs/base/common/network';
6
6
  import Severity$1 from 'vscode/vscode/vs/base/common/severity';
7
7
  import { URI } from 'vscode/vscode/vs/base/common/uri';
8
- import { localizeWithPath } from 'vscode/vscode/vs/nls';
8
+ import { localize } from 'vscode/vscode/vs/nls';
9
9
  import { ICommandService } from 'vscode/vscode/vs/platform/commands/common/commands.service';
10
10
  import { areSameExtensions } from 'vscode/vscode/vs/platform/extensionManagement/common/extensionManagementUtil';
11
11
  import { INotificationService } from 'vscode/vscode/vs/platform/notification/common/notification.service';
@@ -21,7 +21,6 @@ import { extHostNamedCustomer } from '../../services/extensions/common/extHostCu
21
21
  import { IHostService } from 'vscode/vscode/vs/workbench/services/host/browser/host.service';
22
22
  import { ITimerService } from 'vscode/vscode/vs/workbench/services/timer/browser/timerService.service';
23
23
 
24
- const _moduleId = "vs/workbench/api/browser/mainThreadExtensionService";
25
24
  let MainThreadExtensionService = class MainThreadExtensionService {
26
25
  constructor(extHostContext, _extensionService, _notificationService, _extensionsWorkbenchService, _hostService, _extensionEnablementService, _timerService, _commandService, _environmentService) {
27
26
  this._extensionService = _extensionService;
@@ -90,15 +89,14 @@ let MainThreadExtensionService = class MainThreadExtensionService {
90
89
  if (this._extensionEnablementService.isEnabled(missingInstalledDependency)) {
91
90
  this._notificationService.notify({
92
91
  severity: Severity$1.Error,
93
- message: ( localizeWithPath(
94
- _moduleId,
95
- 0,
92
+ message: ( localize(
93
+ 4500,
96
94
  "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?",
97
95
  extName,
98
96
  missingInstalledDependency.manifest.displayName || missingInstalledDependency.manifest.name
99
97
  )),
100
98
  actions: {
101
- primary: [( (new Action('reload', ( localizeWithPath(_moduleId, 1, "Reload Window")), '', true, () => this._hostService.reload())))]
99
+ primary: [( (new Action('reload', ( localize(4501, "Reload Window")), '', true, () => this._hostService.reload())))]
102
100
  }
103
101
  });
104
102
  }
@@ -107,9 +105,8 @@ let MainThreadExtensionService = class MainThreadExtensionService {
107
105
  if (enablementState === EnablementState.DisabledByVirtualWorkspace) {
108
106
  this._notificationService.notify({
109
107
  severity: Severity$1.Error,
110
- message: ( localizeWithPath(
111
- _moduleId,
112
- 2,
108
+ message: ( localize(
109
+ 4502,
113
110
  "Cannot activate the '{0}' extension because it depends on the '{1}' extension which is not supported in the current workspace",
114
111
  extName,
115
112
  missingInstalledDependency.manifest.displayName || missingInstalledDependency.manifest.name
@@ -119,30 +116,28 @@ let MainThreadExtensionService = class MainThreadExtensionService {
119
116
  else if (enablementState === EnablementState.DisabledByTrustRequirement) {
120
117
  this._notificationService.notify({
121
118
  severity: Severity$1.Error,
122
- message: ( localizeWithPath(
123
- _moduleId,
124
- 3,
119
+ message: ( localize(
120
+ 4503,
125
121
  "Cannot activate the '{0}' extension because it depends on the '{1}' extension which is not supported in Restricted Mode",
126
122
  extName,
127
123
  missingInstalledDependency.manifest.displayName || missingInstalledDependency.manifest.name
128
124
  )),
129
125
  actions: {
130
- primary: [( (new Action('manageWorkspaceTrust', ( localizeWithPath(_moduleId, 4, "Manage Workspace Trust")), '', true, () => this._commandService.executeCommand('workbench.trust.manage'))))]
126
+ primary: [( (new Action('manageWorkspaceTrust', ( localize(4504, "Manage Workspace Trust")), '', true, () => this._commandService.executeCommand('workbench.trust.manage'))))]
131
127
  }
132
128
  });
133
129
  }
134
130
  else if (this._extensionEnablementService.canChangeEnablement(missingInstalledDependency)) {
135
131
  this._notificationService.notify({
136
132
  severity: Severity$1.Error,
137
- message: ( localizeWithPath(
138
- _moduleId,
139
- 5,
133
+ message: ( localize(
134
+ 4505,
140
135
  "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?",
141
136
  extName,
142
137
  missingInstalledDependency.manifest.displayName || missingInstalledDependency.manifest.name
143
138
  )),
144
139
  actions: {
145
- primary: [( (new Action('enable', ( localizeWithPath(_moduleId, 6, "Enable and Reload")), '', true, () => this._extensionEnablementService.setEnablement([missingInstalledDependency], enablementState === EnablementState.DisabledGlobally ? EnablementState.EnabledGlobally : EnablementState.EnabledWorkspace)
140
+ primary: [( (new Action('enable', ( localize(4506, "Enable and Reload")), '', true, () => this._extensionEnablementService.setEnablement([missingInstalledDependency], enablementState === EnablementState.DisabledGlobally ? EnablementState.EnabledGlobally : EnablementState.EnabledWorkspace)
146
141
  .then(() => this._hostService.reload(), e => this._notificationService.error(e)))))]
147
142
  }
148
143
  });
@@ -150,9 +145,8 @@ let MainThreadExtensionService = class MainThreadExtensionService {
150
145
  else {
151
146
  this._notificationService.notify({
152
147
  severity: Severity$1.Error,
153
- message: ( localizeWithPath(
154
- _moduleId,
155
- 7,
148
+ message: ( localize(
149
+ 4507,
156
150
  "Cannot activate the '{0}' extension because it depends on the '{1}' extension which is disabled.",
157
151
  extName,
158
152
  missingInstalledDependency.manifest.displayName || missingInstalledDependency.manifest.name
@@ -172,24 +166,22 @@ let MainThreadExtensionService = class MainThreadExtensionService {
172
166
  if (dependencyExtension) {
173
167
  this._notificationService.notify({
174
168
  severity: Severity$1.Error,
175
- message: ( localizeWithPath(
176
- _moduleId,
177
- 8,
169
+ message: ( localize(
170
+ 4508,
178
171
  "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?",
179
172
  extName,
180
173
  dependencyExtension.displayName,
181
174
  dependencyExtension.publisherDisplayName
182
175
  )),
183
176
  actions: {
184
- primary: [( (new Action('install', ( localizeWithPath(_moduleId, 9, "Install and Reload")), '', true, () => this._extensionsWorkbenchService.install(dependencyExtension)
177
+ primary: [( (new Action('install', ( localize(4509, "Install and Reload")), '', true, () => this._extensionsWorkbenchService.install(dependencyExtension)
185
178
  .then(() => this._hostService.reload(), e => this._notificationService.error(e)))))]
186
179
  }
187
180
  });
188
181
  }
189
182
  else {
190
- this._notificationService.error(( localizeWithPath(
191
- _moduleId,
192
- 10,
183
+ this._notificationService.error(( localize(
184
+ 4510,
193
185
  "Cannot activate the '{0}' extension because it depends on an unknown '{1}' extension.",
194
186
  extName,
195
187
  missingDependency
@@ -4,7 +4,7 @@ import { FileOperation } from 'vscode/vscode/vs/platform/files/common/files';
4
4
  import { IFileService } from 'vscode/vscode/vs/platform/files/common/files.service';
5
5
  import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
6
6
  import { ExtHostContext, MainContext } from 'vscode/vscode/vs/workbench/api/common/extHost.protocol';
7
- import { localizeWithPath } from 'vscode/vscode/vs/nls';
7
+ import { localize } from 'vscode/vscode/vs/nls';
8
8
  import { IWorkingCopyFileService } from 'vscode/vscode/vs/workbench/services/workingCopy/common/workingCopyFileService.service';
9
9
  import { IBulkEditService } from 'vscode/vscode/vs/editor/browser/services/bulkEditService';
10
10
  import { ProgressLocation } from 'vscode/vscode/vs/platform/progress/common/progress';
@@ -28,7 +28,6 @@ import { normalizeWatcherPattern } from 'vscode/vscode/vs/platform/files/common/
28
28
  import { IWorkspaceContextService } from 'vscode/vscode/vs/platform/workspace/common/workspace.service';
29
29
 
30
30
  var MainThreadFileSystemEventService_1;
31
- const _moduleId = "vs/workbench/api/browser/mainThreadFileSystemEventService";
32
31
  let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
33
32
  static { MainThreadFileSystemEventService_1 = this; }
34
33
  static { this.MementoKeyAdditionalEdits = `file.particpants.additionalEdits`; }
@@ -81,33 +80,29 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
81
80
  let message;
82
81
  if (data.extensionNames.length === 1) {
83
82
  if (operation === FileOperation.CREATE) {
84
- message = ( localizeWithPath(
85
- _moduleId,
86
- 0,
83
+ message = ( localize(
84
+ 4511,
87
85
  "Extension '{0}' wants to make refactoring changes with this file creation",
88
86
  data.extensionNames[0]
89
87
  ));
90
88
  }
91
89
  else if (operation === FileOperation.COPY) {
92
- message = ( localizeWithPath(
93
- _moduleId,
94
- 1,
90
+ message = ( localize(
91
+ 4512,
95
92
  "Extension '{0}' wants to make refactoring changes with this file copy",
96
93
  data.extensionNames[0]
97
94
  ));
98
95
  }
99
96
  else if (operation === FileOperation.MOVE) {
100
- message = ( localizeWithPath(
101
- _moduleId,
102
- 2,
97
+ message = ( localize(
98
+ 4513,
103
99
  "Extension '{0}' wants to make refactoring changes with this file move",
104
100
  data.extensionNames[0]
105
101
  ));
106
102
  }
107
103
  else {
108
- message = ( localizeWithPath(
109
- _moduleId,
110
- 3,
104
+ message = ( localize(
105
+ 4514,
111
106
  "Extension '{0}' wants to make refactoring changes with this file deletion",
112
107
  data.extensionNames[0]
113
108
  ));
@@ -115,33 +110,29 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
115
110
  }
116
111
  else {
117
112
  if (operation === FileOperation.CREATE) {
118
- message = ( localizeWithPath(
119
- _moduleId,
120
- 4,
113
+ message = ( localize(
114
+ 4515,
121
115
  "{0} extensions want to make refactoring changes with this file creation",
122
116
  data.extensionNames.length
123
117
  ));
124
118
  }
125
119
  else if (operation === FileOperation.COPY) {
126
- message = ( localizeWithPath(
127
- _moduleId,
128
- 5,
120
+ message = ( localize(
121
+ 4516,
129
122
  "{0} extensions want to make refactoring changes with this file copy",
130
123
  data.extensionNames.length
131
124
  ));
132
125
  }
133
126
  else if (operation === FileOperation.MOVE) {
134
- message = ( localizeWithPath(
135
- _moduleId,
136
- 6,
127
+ message = ( localize(
128
+ 4517,
137
129
  "{0} extensions want to make refactoring changes with this file move",
138
130
  data.extensionNames.length
139
131
  ));
140
132
  }
141
133
  else {
142
- message = ( localizeWithPath(
143
- _moduleId,
144
- 7,
134
+ message = ( localize(
135
+ 4518,
145
136
  "{0} extensions want to make refactoring changes with this file deletion",
146
137
  data.extensionNames.length
147
138
  ));
@@ -151,8 +142,8 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
151
142
  const { confirmed } = await dialogService.confirm({
152
143
  type: Severity$1.Info,
153
144
  message,
154
- primaryButton: ( localizeWithPath(_moduleId, 8, "Show &&Preview")),
155
- cancelButton: ( localizeWithPath(_moduleId, 9, "Skip Changes"))
145
+ primaryButton: ( localize(4519, "Show &&Preview")),
146
+ cancelButton: ( localize(4520, "Skip Changes"))
156
147
  });
157
148
  showPreview = true;
158
149
  if (!confirmed) {
@@ -171,19 +162,19 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
171
162
  message,
172
163
  buttons: [
173
164
  {
174
- label: ( localizeWithPath(_moduleId, 10, "&&OK")),
165
+ label: ( localize(4521, "&&OK")),
175
166
  run: () => Choice.OK
176
167
  },
177
168
  {
178
- label: ( localizeWithPath(_moduleId, 8, "Show &&Preview")),
169
+ label: ( localize(4521, "Show &&Preview")),
179
170
  run: () => Choice.Preview
180
171
  }
181
172
  ],
182
173
  cancelButton: {
183
- label: ( localizeWithPath(_moduleId, 9, "Skip Changes")),
174
+ label: ( localize(4521, "Skip Changes")),
184
175
  run: () => Choice.Cancel
185
176
  },
186
- checkbox: { label: ( localizeWithPath(_moduleId, 11, "Do not ask me again")) }
177
+ checkbox: { label: ( localize(4522, "Do not ask me again")) }
187
178
  });
188
179
  if (result === Choice.Cancel) {
189
180
  return;
@@ -200,15 +191,15 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
200
191
  _progressLabel(operation) {
201
192
  switch (operation) {
202
193
  case FileOperation.CREATE:
203
- return ( localizeWithPath(_moduleId, 12, "Running 'File Create' participants..."));
194
+ return ( localize(4523, "Running 'File Create' participants..."));
204
195
  case FileOperation.MOVE:
205
- return ( localizeWithPath(_moduleId, 13, "Running 'File Rename' participants..."));
196
+ return ( localize(4524, "Running 'File Rename' participants..."));
206
197
  case FileOperation.COPY:
207
- return ( localizeWithPath(_moduleId, 14, "Running 'File Copy' participants..."));
198
+ return ( localize(4525, "Running 'File Copy' participants..."));
208
199
  case FileOperation.DELETE:
209
- return ( localizeWithPath(_moduleId, 15, "Running 'File Delete' participants..."));
200
+ return ( localize(4526, "Running 'File Delete' participants..."));
210
201
  case FileOperation.WRITE:
211
- return ( localizeWithPath(_moduleId, 16, "Running 'File Write' participants..."));
202
+ return ( localize(4527, "Running 'File Write' participants..."));
212
203
  }
213
204
  }
214
205
  });
@@ -310,7 +301,7 @@ registerAction2(class ResetMemento extends Action2 {
310
301
  super({
311
302
  id: 'files.participants.resetChoice',
312
303
  title: {
313
- value: ( localizeWithPath(_moduleId, 17, "Reset choice for 'File operation needs preview'")),
304
+ value: ( localize(4528, "Reset choice for 'File operation needs preview'")),
314
305
  original: `Reset choice for 'File operation needs preview'`
315
306
  },
316
307
  f1: true
@@ -822,8 +822,8 @@ let MainThreadLanguageFeatures = MainThreadLanguageFeatures_1 = class MainThread
822
822
  }
823
823
  return provider.resolveDocumentOnDropFileData(requestId, dataId);
824
824
  }
825
- $registerMappedEditsProvider(handle, selector) {
826
- const provider = ( new MainThreadMappedEditsProvider(handle, this._proxy, this._uriIdentService));
825
+ $registerMappedEditsProvider(handle, selector, displayName) {
826
+ const provider = ( new MainThreadMappedEditsProvider(displayName, handle, this._proxy, this._uriIdentService));
827
827
  this._registrations.set(handle, this._languageFeaturesService.mappedEditsProvider.register(selector, provider));
828
828
  }
829
829
  };
@@ -1029,7 +1029,8 @@ class MainThreadDocumentRangeSemanticTokensProvider {
1029
1029
  }
1030
1030
  }
1031
1031
  class MainThreadMappedEditsProvider {
1032
- constructor(_handle, _proxy, _uriService) {
1032
+ constructor(displayName, _handle, _proxy, _uriService) {
1033
+ this.displayName = displayName;
1033
1034
  this._handle = _handle;
1034
1035
  this._proxy = _proxy;
1035
1036
  this._uriService = _uriService;
@@ -3,7 +3,7 @@ import { DeferredPromise, AsyncIterableSource } from 'vscode/vscode/vs/base/comm
3
3
  import { transformErrorFromSerialization, transformErrorForSerialization } from 'vscode/vscode/vs/base/common/errors';
4
4
  import { Emitter } from 'vscode/vscode/vs/base/common/event';
5
5
  import { DisposableStore, DisposableMap, Disposable, toDisposable } from 'vscode/vscode/vs/base/common/lifecycle';
6
- import { localizeWithPath } from 'vscode/vscode/vs/nls';
6
+ import { localize } from 'vscode/vscode/vs/nls';
7
7
  import { ILogService } from 'vscode/vscode/vs/platform/log/common/log.service';
8
8
  import { ExtHostContext, MainContext } from 'vscode/vscode/vs/workbench/api/common/extHost.protocol';
9
9
  import { ILanguageModelStatsService } from 'vscode/vscode/vs/workbench/contrib/chat/common/languageModelStats.service';
@@ -14,7 +14,6 @@ import { IAuthenticationService } from 'vscode/vscode/vs/workbench/services/auth
14
14
  import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
15
15
  import { IExtensionService } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions.service';
16
16
 
17
- const _moduleId = "vs/workbench/api/browser/mainThreadLanguageModels";
18
17
  let MainThreadLanguageModels = class MainThreadLanguageModels {
19
18
  constructor(extHostContext, _chatProviderService, _languageModelStatsService, _logService, _authenticationService, _authenticationAccessService, _extensionService) {
20
19
  this._chatProviderService = _chatProviderService;
@@ -130,7 +129,7 @@ let MainThreadLanguageModels = class MainThreadLanguageModels {
130
129
  if (this._authenticationService.getProviderIds().includes(authProviderId)) {
131
130
  return Disposable.None;
132
131
  }
133
- const accountLabel = auth.accountLabel ?? ( localizeWithPath(_moduleId, 0, 'Language Models'));
132
+ const accountLabel = auth.accountLabel ?? ( localize(4498, 'Language Models'));
134
133
  const disposables = ( (new DisposableStore()));
135
134
  this._authenticationService.registerAuthenticationProvider(authProviderId, ( (new LanguageModelAccessAuthProvider(authProviderId, auth.providerLabel, accountLabel))));
136
135
  disposables.add(toDisposable(() => {
@@ -1,5 +1,5 @@
1
1
  import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
2
- import { localizeWithPath } from 'vscode/vscode/vs/nls';
2
+ import { localize } from 'vscode/vscode/vs/nls';
3
3
  import { toAction } from 'vscode/vscode/vs/base/common/actions';
4
4
  import { MainContext } from 'vscode/vscode/vs/workbench/api/common/extHost.protocol';
5
5
  import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
@@ -9,7 +9,6 @@ import { Event } from 'vscode/vscode/vs/base/common/event';
9
9
  import { ICommandService } from 'vscode/vscode/vs/platform/commands/common/commands.service';
10
10
  import { IExtensionService } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions.service';
11
11
 
12
- const _moduleId = "vs/workbench/api/browser/mainThreadMessageService";
13
12
  let MainThreadMessageService = class MainThreadMessageService {
14
13
  constructor(extHostContext, _notificationService, _commandService, _dialogService, extensionService) {
15
14
  this._notificationService = _notificationService;
@@ -52,13 +51,13 @@ let MainThreadMessageService = class MainThreadMessageService {
52
51
  };
53
52
  }
54
53
  if (!source) {
55
- source = ( localizeWithPath(_moduleId, 0, "Extension"));
54
+ source = ( localize(4529, "Extension"));
56
55
  }
57
56
  const secondaryActions = [];
58
57
  if (options.source) {
59
58
  secondaryActions.push(toAction({
60
59
  id: options.source.identifier.value,
61
- label: ( localizeWithPath(_moduleId, 1, "Manage Extension")),
60
+ label: ( localize(4530, "Manage Extension")),
62
61
  run: () => {
63
62
  return this._commandService.executeCommand('_extensions.manage', options.source.identifier.value);
64
63
  }
@@ -94,13 +93,13 @@ let MainThreadMessageService = class MainThreadMessageService {
94
93
  if (!cancelButton) {
95
94
  if (buttons.length > 0) {
96
95
  cancelButton = {
97
- label: ( localizeWithPath(_moduleId, 2, "Cancel")),
96
+ label: ( localize(4531, "Cancel")),
98
97
  run: () => undefined
99
98
  };
100
99
  }
101
100
  else {
102
101
  cancelButton = {
103
- label: ( localizeWithPath(_moduleId, 3, "&&OK")),
102
+ label: ( localize(4532, "&&OK")),
104
103
  run: () => undefined
105
104
  };
106
105
  }
@@ -1,5 +1,5 @@
1
1
  import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
2
- import { localizeWithPath } from 'vscode/vscode/vs/nls';
2
+ import { localize } from 'vscode/vscode/vs/nls';
3
3
  import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
4
4
  import { extHostCustomer } from '../../services/extensions/common/extHostCustomers.js';
5
5
  import { ExtHostContext } from 'vscode/vscode/vs/workbench/api/common/extHost.protocol';
@@ -7,7 +7,6 @@ import { raceCancellationError } from 'vscode/vscode/vs/base/common/async';
7
7
  import { IWorkingCopyFileService } from 'vscode/vscode/vs/workbench/services/workingCopy/common/workingCopyFileService.service';
8
8
  import { NotebookFileWorkingCopyModel } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookEditorModel';
9
9
 
10
- const _moduleId = "vs/workbench/api/browser/mainThreadNotebookSaveParticipant";
11
10
  class ExtHostNotebookDocumentSaveParticipant {
12
11
  constructor(extHostContext) {
13
12
  this._proxy = ( (extHostContext.getProxy(ExtHostContext.ExtHostNotebookDocumentSaveParticipant)));
@@ -18,7 +17,7 @@ class ExtHostNotebookDocumentSaveParticipant {
18
17
  }
19
18
  let _warningTimeout;
20
19
  const p = ( (new Promise((resolve, reject) => {
21
- _warningTimeout = setTimeout(() => reject(( (new Error(( localizeWithPath(_moduleId, 0, "Aborted onWillSaveNotebookDocument-event after 1750ms")))))), 1750);
20
+ _warningTimeout = setTimeout(() => reject(( (new Error(( localize(4544, "Aborted onWillSaveNotebookDocument-event after 1750ms")))))), 1750);
22
21
  this._proxy.$participateInSave(workingCopy.resource, context.reason, token).then(_ => {
23
22
  clearTimeout(_warningTimeout);
24
23
  return undefined;
@@ -5,9 +5,8 @@ import { ExtHostContext, MainContext } from 'vscode/vscode/vs/workbench/api/comm
5
5
  import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
6
6
  import { Action } from 'vscode/vscode/vs/base/common/actions';
7
7
  import { ICommandService } from 'vscode/vscode/vs/platform/commands/common/commands.service';
8
- import { localizeWithPath } from 'vscode/vscode/vs/nls';
8
+ import { localize } from 'vscode/vscode/vs/nls';
9
9
 
10
- const _moduleId = "vs/workbench/api/browser/mainThreadProgress";
11
10
  class ManageExtensionAction extends Action {
12
11
  constructor(extensionId, label, commandService) {
13
12
  super(extensionId, label, undefined, true, () => {
@@ -32,7 +31,7 @@ let MainThreadProgress = class MainThreadProgress {
32
31
  const notificationOptions = {
33
32
  ...options,
34
33
  location: ProgressLocation.Notification,
35
- secondaryActions: [( (new ManageExtensionAction(extensionId, ( localizeWithPath(_moduleId, 0, "Manage Extension")), this._commandService)))]
34
+ secondaryActions: [( (new ManageExtensionAction(extensionId, ( localize(4533, "Manage Extension")), this._commandService)))]
36
35
  };
37
36
  options = notificationOptions;
38
37
  }
@@ -3,11 +3,12 @@ import { Barrier } from 'vscode/vscode/vs/base/common/async';
3
3
  import { URI } from 'vscode/vscode/vs/base/common/uri';
4
4
  import { Emitter, Event } from 'vscode/vscode/vs/base/common/event';
5
5
  import { observableValue } from 'vscode/vscode/vs/base/common/observableInternal/base';
6
- import 'vscode/vscode/vs/base/common/observableInternal/derived';
6
+ import { derived } from 'vscode/vscode/vs/base/common/observableInternal/derived';
7
7
  import 'vscode/vscode/vs/base/common/observableInternal/autorun';
8
8
  import 'vscode/vscode/vs/base/common/observableInternal/utils';
9
9
  import { CancellationToken } from 'vscode/vscode/vs/base/common/cancellation';
10
10
  import 'vscode/vscode/vs/base/common/arrays';
11
+ import { observableValueOpts } from 'vscode/vscode/vs/base/common/observableInternal/api';
11
12
  import { Disposable, DisposableStore, dispose, combinedDisposable } from 'vscode/vscode/vs/base/common/lifecycle';
12
13
  import { ISCMService, ISCMViewService } from 'vscode/vscode/vs/workbench/contrib/scm/common/scm.service';
13
14
  import { ExtHostContext, MainContext } from 'vscode/vscode/vs/workbench/api/common/extHost.protocol';
@@ -23,7 +24,6 @@ import { ILanguageService } from 'vscode/vscode/vs/editor/common/languages/langu
23
24
  import { IModelService } from 'vscode/vscode/vs/editor/common/services/model';
24
25
  import { ITextModelService } from 'vscode/vscode/vs/editor/common/services/resolverService';
25
26
  import { Schemas } from 'vscode/vscode/vs/base/common/network';
26
- import { ILogService } from 'vscode/vscode/vs/platform/log/common/log.service';
27
27
 
28
28
  function getIconFromIconDto(iconDto) {
29
29
  if (iconDto === undefined) {
@@ -136,21 +136,19 @@ class MainThreadSCMResource {
136
136
  }
137
137
  class MainThreadSCMHistoryProvider {
138
138
  get currentHistoryItemGroup() { return this._currentHistoryItemGroup; }
139
- set currentHistoryItemGroup(historyItemGroup) {
140
- this._currentHistoryItemGroup = historyItemGroup;
141
- this._onDidChangeCurrentHistoryItemGroup.fire();
142
- }
143
- get currentHistoryItemGroupObs() { return this._currentHistoryItemGroupObs; }
144
139
  constructor(proxy, handle) {
145
140
  this.proxy = proxy;
146
141
  this.handle = handle;
147
- this._onDidChangeCurrentHistoryItemGroup = ( new Emitter());
148
- this.onDidChangeCurrentHistoryItemGroup = this._onDidChangeCurrentHistoryItemGroup.event;
149
- this._currentHistoryItemGroupObs = observableValue(this, undefined);
142
+ this.currentHistoryItemGroupId = derived(this, reader => this.currentHistoryItemGroup.read(reader)?.id);
143
+ this.currentHistoryItemGroupName = derived(this, reader => this.currentHistoryItemGroup.read(reader)?.name);
144
+ this._currentHistoryItemGroup = observableValueOpts({ owner: this, equalsFn: () => false }, undefined);
150
145
  }
151
146
  async resolveHistoryItemGroupCommonAncestor(historyItemGroupId1, historyItemGroupId2) {
152
147
  return this.proxy.$resolveHistoryItemGroupCommonAncestor(this.handle, historyItemGroupId1, historyItemGroupId2, CancellationToken.None);
153
148
  }
149
+ async resolveHistoryItemGroupCommonAncestor2(historyItemGroupIds) {
150
+ return this.proxy.$resolveHistoryItemGroupCommonAncestor2(this.handle, historyItemGroupIds, CancellationToken.None);
151
+ }
154
152
  async provideHistoryItems(historyItemGroupId, options) {
155
153
  const historyItems = await this.proxy.$provideHistoryItems(this.handle, historyItemGroupId, options, CancellationToken.None);
156
154
  return historyItems?.map(historyItem => toISCMHistoryItem(historyItem));
@@ -173,7 +171,7 @@ class MainThreadSCMHistoryProvider {
173
171
  }));
174
172
  }
175
173
  $onDidChangeCurrentHistoryItemGroup(historyItemGroup) {
176
- this._currentHistoryItemGroupObs.set(historyItemGroup, undefined);
174
+ this._currentHistoryItemGroup.set(historyItemGroup, undefined);
177
175
  }
178
176
  }
179
177
  class MainThreadSCMProvider {
@@ -184,15 +182,14 @@ class MainThreadSCMProvider {
184
182
  get rootUri() { return this._rootUri; }
185
183
  get inputBoxTextModel() { return this._inputBoxTextModel; }
186
184
  get contextValue() { return this._providerId; }
187
- get historyProvider() { return this._historyProvider; }
188
185
  get acceptInputCommand() { return this.features.acceptInputCommand; }
189
186
  get actionButton() { return this.features.actionButton ?? undefined; }
190
187
  get count() { return this._count; }
191
188
  get statusBarCommands() { return this._statusBarCommands; }
192
189
  get name() { return this._name ?? this._label; }
193
190
  get commitTemplate() { return this._commitTemplate; }
194
- get historyProviderObs() { return this._historyProviderObs; }
195
- constructor(proxy, _handle, _providerId, _label, _rootUri, _inputBoxTextModel, _quickDiffService, _uriIdentService, _workspaceContextService, _logService) {
191
+ get historyProvider() { return this._historyProvider; }
192
+ constructor(proxy, _handle, _providerId, _label, _rootUri, _inputBoxTextModel, _quickDiffService, _uriIdentService, _workspaceContextService) {
196
193
  this.proxy = proxy;
197
194
  this._handle = _handle;
198
195
  this._providerId = _providerId;
@@ -202,7 +199,6 @@ class MainThreadSCMProvider {
202
199
  this._quickDiffService = _quickDiffService;
203
200
  this._uriIdentService = _uriIdentService;
204
201
  this._workspaceContextService = _workspaceContextService;
205
- this._logService = _logService;
206
202
  this._id = `scm${MainThreadSCMProvider.ID_HANDLE++}`;
207
203
  this.groups = [];
208
204
  this._onDidChangeResourceGroups = ( new Emitter());
@@ -214,12 +210,10 @@ class MainThreadSCMProvider {
214
210
  this._count = observableValue(this, undefined);
215
211
  this._statusBarCommands = observableValue(this, undefined);
216
212
  this._commitTemplate = observableValue(this, '');
217
- this._onDidChangeHistoryProvider = ( new Emitter());
218
- this.onDidChangeHistoryProvider = this._onDidChangeHistoryProvider.event;
219
213
  this._onDidChange = ( new Emitter());
220
214
  this.onDidChange = this._onDidChange.event;
221
215
  this.isSCM = true;
222
- this._historyProviderObs = observableValue(this, undefined);
216
+ this._historyProvider = observableValue(this, undefined);
223
217
  if (_rootUri) {
224
218
  const folder = this._workspaceContextService.getWorkspaceFolder(_rootUri);
225
219
  if (folder?.uri.toString() === ( _rootUri.toString())) {
@@ -240,7 +234,6 @@ class MainThreadSCMProvider {
240
234
  this._count.set(features.count, undefined);
241
235
  }
242
236
  if (typeof features.statusBarCommands !== 'undefined') {
243
- this._logService.trace(`MainThreadSCMProvider#updateSourceControl (${this._id}): ${( features.statusBarCommands.map(c => c.title)).join(', ')}`);
244
237
  this._statusBarCommands.set(features.statusBarCommands, undefined);
245
238
  }
246
239
  if (features.hasQuickDiffProvider && !this._quickDiff) {
@@ -255,16 +248,12 @@ class MainThreadSCMProvider {
255
248
  this._quickDiff.dispose();
256
249
  this._quickDiff = undefined;
257
250
  }
258
- if (features.hasHistoryProvider && !this._historyProvider) {
251
+ if (features.hasHistoryProvider && !this.historyProvider.get()) {
259
252
  const historyProvider = ( new MainThreadSCMHistoryProvider(this.proxy, this.handle));
260
- this._historyProviderObs.set(historyProvider, undefined);
261
- this._historyProvider = historyProvider;
262
- this._onDidChangeHistoryProvider.fire();
253
+ this._historyProvider.set(historyProvider, undefined);
263
254
  }
264
- else if (features.hasHistoryProvider === false && this._historyProvider) {
265
- this._historyProviderObs.set(undefined, undefined);
266
- this._historyProvider = undefined;
267
- this._onDidChangeHistoryProvider.fire();
255
+ else if (features.hasHistoryProvider === false && this.historyProvider.get()) {
256
+ this._historyProvider.set(undefined, undefined);
268
257
  }
269
258
  }
270
259
  $registerGroups(_groups) {
@@ -356,11 +345,10 @@ class MainThreadSCMProvider {
356
345
  return result && URI.revive(result);
357
346
  }
358
347
  $onDidChangeHistoryProviderCurrentHistoryItemGroup(currentHistoryItemGroup) {
359
- if (!this._historyProvider) {
348
+ if (!this.historyProvider.get()) {
360
349
  return;
361
350
  }
362
- this._historyProvider.currentHistoryItemGroup = currentHistoryItemGroup ?? undefined;
363
- this._historyProviderObs.get()?.$onDidChangeCurrentHistoryItemGroup(currentHistoryItemGroup);
351
+ this._historyProvider.get()?.$onDidChangeCurrentHistoryItemGroup(currentHistoryItemGroup);
364
352
  }
365
353
  toJSON() {
366
354
  return {
@@ -373,7 +361,7 @@ class MainThreadSCMProvider {
373
361
  }
374
362
  }
375
363
  let MainThreadSCM = class MainThreadSCM {
376
- constructor(extHostContext, scmService, scmViewService, languageService, modelService, textModelService, quickDiffService, _uriIdentService, workspaceContextService, logService) {
364
+ constructor(extHostContext, scmService, scmViewService, languageService, modelService, textModelService, quickDiffService, _uriIdentService, workspaceContextService) {
377
365
  this.scmService = scmService;
378
366
  this.scmViewService = scmViewService;
379
367
  this.languageService = languageService;
@@ -382,7 +370,6 @@ let MainThreadSCM = class MainThreadSCM {
382
370
  this.quickDiffService = quickDiffService;
383
371
  this._uriIdentService = _uriIdentService;
384
372
  this.workspaceContextService = workspaceContextService;
385
- this.logService = logService;
386
373
  this._repositories = ( new Map());
387
374
  this._repositoryBarriers = ( new Map());
388
375
  this._repositoryDisposables = ( new Map());
@@ -409,8 +396,7 @@ let MainThreadSCM = class MainThreadSCM {
409
396
  inputBoxTextModelRef.object.textEditorModel,
410
397
  this.quickDiffService,
411
398
  this._uriIdentService,
412
- this.workspaceContextService,
413
- this.logService
399
+ this.workspaceContextService
414
400
  ));
415
401
  const repository = this.scmService.registerSCMProvider(provider);
416
402
  this._repositories.set(handle, repository);
@@ -565,8 +551,7 @@ MainThreadSCM = __decorate([
565
551
  ( __param(5, ITextModelService)),
566
552
  ( __param(6, IQuickDiffService)),
567
553
  ( __param(7, IUriIdentityService)),
568
- ( __param(8, IWorkspaceContextService)),
569
- ( __param(9, ILogService))
554
+ ( __param(8, IWorkspaceContextService))
570
555
  ], MainThreadSCM);
571
556
 
572
557
  export { MainThreadSCM };
@@ -1,13 +1,12 @@
1
1
  import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
2
2
  import { shouldSynchronizeModel } from 'vscode/vscode/vs/editor/common/model';
3
- import { localizeWithPath } from 'vscode/vscode/vs/nls';
3
+ import { localize } from 'vscode/vscode/vs/nls';
4
4
  import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
5
5
  import { extHostCustomer } from '../../services/extensions/common/extHostCustomers.js';
6
6
  import { ITextFileService } from 'vscode/vscode/vs/workbench/services/textfile/common/textfiles.service';
7
7
  import { ExtHostContext } from 'vscode/vscode/vs/workbench/api/common/extHost.protocol';
8
8
  import { raceCancellationError } from 'vscode/vscode/vs/base/common/async';
9
9
 
10
- const _moduleId = "vs/workbench/api/browser/mainThreadSaveParticipant";
11
10
  class ExtHostSaveParticipant {
12
11
  constructor(extHostContext) {
13
12
  this._proxy = ( (extHostContext.getProxy(ExtHostContext.ExtHostDocumentSaveParticipant)));
@@ -17,7 +16,7 @@ class ExtHostSaveParticipant {
17
16
  return undefined;
18
17
  }
19
18
  const p = ( (new Promise((resolve, reject) => {
20
- setTimeout(() => reject(( (new Error(( localizeWithPath(_moduleId, 0, "Aborted onWillSaveTextDocument-event after 1750ms")))))), 1750);
19
+ setTimeout(() => reject(( (new Error(( localize(4534, "Aborted onWillSaveTextDocument-event after 1750ms")))))), 1750);
21
20
  this._proxy.$participateInSave(editorModel.resource, context.reason).then(values => {
22
21
  if (!values.every(success => success)) {
23
22
  return Promise.reject(( (new Error('listener failed'))));