@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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-extensions-service-override",
3
- "version": "7.0.11",
3
+ "version": "7.1.1",
4
4
  "keywords": [],
5
5
  "author": {
6
6
  "name": "CodinGame",
@@ -26,7 +26,7 @@
26
26
  }
27
27
  },
28
28
  "dependencies": {
29
- "vscode": "npm:@codingame/monaco-vscode-api@7.0.11",
30
- "@codingame/monaco-vscode-files-service-override": "7.0.11"
29
+ "vscode": "npm:@codingame/monaco-vscode-api@7.1.1",
30
+ "@codingame/monaco-vscode-files-service-override": "7.1.1"
31
31
  }
32
32
  }
@@ -5,17 +5,15 @@ import { Schemas } from 'vscode/vscode/vs/base/common/network';
5
5
  import { basename } from 'vscode/vscode/vs/base/common/resources';
6
6
  import { semverExports } from 'vscode/external/vscode-semver/semver.js';
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 { InstallOperation, EXTENSION_IDENTIFIER_REGEX } from 'vscode/vscode/vs/platform/extensionManagement/common/extensionManagement';
10
10
  import { IExtensionManagementService, IExtensionGalleryService } from 'vscode/vscode/vs/platform/extensionManagement/common/extensionManagement.service';
11
11
  import { getIdAndVersion, areSameExtensions, getGalleryExtensionId, getExtensionId } from 'vscode/vscode/vs/platform/extensionManagement/common/extensionManagementUtil';
12
12
  import { ExtensionType, EXTENSION_CATEGORIES } from 'vscode/vscode/vs/platform/extensions/common/extensions';
13
13
 
14
- const _moduleId = "vs/platform/extensionManagement/common/extensionManagementCLI";
15
- const notFound = (id) => ( localizeWithPath(_moduleId, 0, "Extension '{0}' not found.", id));
16
- const useId = ( localizeWithPath(
17
- _moduleId,
18
- 1,
14
+ const notFound = (id) => ( localize(9788, "Extension '{0}' not found.", id));
15
+ const useId = ( localize(
16
+ 9789,
19
17
  "Make sure you use the full extension ID, including the publisher, e.g.: {0}",
20
18
  'ms-dotnettools.csharp'
21
19
  ));
@@ -52,7 +50,7 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
52
50
  return;
53
51
  }
54
52
  if (this.location) {
55
- this.logger.info(( localizeWithPath(_moduleId, 2, "Extensions installed on {0}:", this.location)));
53
+ this.logger.info(( localize(9790, "Extensions installed on {0}:", this.location)));
56
54
  }
57
55
  extensions = extensions.sort((e1, e2) => e1.identifier.id.localeCompare(e2.identifier.id));
58
56
  let lastId = undefined;
@@ -67,7 +65,7 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
67
65
  const failed = [];
68
66
  try {
69
67
  if (extensions.length) {
70
- this.logger.info(this.location ? ( localizeWithPath(_moduleId, 3, "Installing extensions on {0}...", this.location)) : ( localizeWithPath(_moduleId, 4, "Installing extensions...")));
68
+ this.logger.info(this.location ? ( localize(9791, "Installing extensions on {0}...", this.location)) : ( localize(9792, "Installing extensions...")));
71
69
  }
72
70
  const installVSIXInfos = [];
73
71
  const installExtensionInfos = [];
@@ -110,18 +108,11 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
110
108
  }
111
109
  }
112
110
  catch (error) {
113
- this.logger.error(( localizeWithPath(
114
- _moduleId,
115
- 5,
116
- "Error while installing extensions: {0}",
117
- getErrorMessage(error)
118
- )));
111
+ this.logger.error(( localize(9793, "Error while installing extensions: {0}", getErrorMessage(error))));
119
112
  throw error;
120
113
  }
121
114
  if (failed.length) {
122
- throw ( (new Error(
123
- localizeWithPath(_moduleId, 6, "Failed Installing Extensions: {0}", failed.join(', '))
124
- )));
115
+ throw ( (new Error(localize(9794, "Failed Installing Extensions: {0}", failed.join(', ')))));
125
116
  }
126
117
  }
127
118
  async updateExtensions(profileLocation) {
@@ -132,9 +123,8 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
132
123
  installedExtensionsQuery.push({ ...extension.identifier, preRelease: extension.preRelease });
133
124
  }
134
125
  }
135
- this.logger.trace(( localizeWithPath(
136
- _moduleId,
137
- 7,
126
+ this.logger.trace(( localize(
127
+ 9795,
138
128
  "Fetching latest versions for {0} extensions",
139
129
  installedExtensionsQuery.length
140
130
  )));
@@ -151,30 +141,27 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
151
141
  }
152
142
  }
153
143
  if (!extensionsToUpdate.length) {
154
- this.logger.info(( localizeWithPath(_moduleId, 8, "No extension to update")));
144
+ this.logger.info(( localize(9796, "No extension to update")));
155
145
  return;
156
146
  }
157
- this.logger.info(( localizeWithPath(
158
- _moduleId,
159
- 9,
147
+ this.logger.info(( localize(
148
+ 9797,
160
149
  "Updating extensions: {0}",
161
150
  ( (extensionsToUpdate.map(ext => ext.extension.identifier.id))).join(', ')
162
151
  )));
163
152
  const installationResult = await this.extensionManagementService.installGalleryExtensions(extensionsToUpdate);
164
153
  for (const extensionResult of installationResult) {
165
154
  if (extensionResult.error) {
166
- this.logger.error(( localizeWithPath(
167
- _moduleId,
168
- 10,
155
+ this.logger.error(( localize(
156
+ 9798,
169
157
  "Error while updating extension {0}: {1}",
170
158
  extensionResult.identifier.id,
171
159
  getErrorMessage(extensionResult.error)
172
160
  )));
173
161
  }
174
162
  else {
175
- this.logger.info(( localizeWithPath(
176
- _moduleId,
177
- 11,
163
+ this.logger.info(( localize(
164
+ 9799,
178
165
  "Extension '{0}' v{1} was successfully updated.",
179
166
  extensionResult.identifier.id,
180
167
  extensionResult.local?.manifest.version
@@ -187,9 +174,8 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
187
174
  const installedExtension = installed.find(i => areSameExtensions(i.identifier, { id }));
188
175
  if (installedExtension) {
189
176
  if (!force && (!version || (version === 'prerelease' && installedExtension.preRelease))) {
190
- this.logger.info(( localizeWithPath(
191
- _moduleId,
192
- 12,
177
+ this.logger.info(( localize(
178
+ 9800,
193
179
  "Extension '{0}' v{1} is already installed. Use '--force' option to update to latest version or provide '@<version>' to install a specific version, for example: '{2}@1.2.3'.",
194
180
  id,
195
181
  installedExtension.manifest.version,
@@ -198,7 +184,7 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
198
184
  return false;
199
185
  }
200
186
  if (version && installedExtension.manifest.version === version) {
201
- this.logger.info(( localizeWithPath(_moduleId, 13, "Extension '{0}' is already installed.", `${id}@${version}`)));
187
+ this.logger.info(( localize(9801, "Extension '{0}' is already installed.", `${id}@${version}`)));
202
188
  return false;
203
189
  }
204
190
  }
@@ -231,27 +217,25 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
231
217
  const installedExtension = installed.find(e => areSameExtensions(e.identifier, gallery.identifier));
232
218
  if (installedExtension) {
233
219
  if (gallery.version === installedExtension.manifest.version) {
234
- this.logger.info(( localizeWithPath(
235
- _moduleId,
236
- 13,
220
+ this.logger.info(( localize(
221
+ 9801,
237
222
  "Extension '{0}' is already installed.",
238
223
  version ? `${id}@${version}` : id
239
224
  )));
240
225
  return;
241
226
  }
242
- this.logger.info(( localizeWithPath(
243
- _moduleId,
244
- 14,
227
+ this.logger.info(( localize(
228
+ 9802,
245
229
  "Updating the extension '{0}' to the version {1}",
246
230
  id,
247
231
  gallery.version
248
232
  )));
249
233
  }
250
234
  if (installOptions.isBuiltin) {
251
- this.logger.info(version ? ( localizeWithPath(_moduleId, 15, "Installing builtin extension '{0}' v{1}...", id, version)) : ( localizeWithPath(_moduleId, 16, "Installing builtin extension '{0}'...", id)));
235
+ this.logger.info(version ? ( localize(9803, "Installing builtin extension '{0}' v{1}...", id, version)) : ( localize(9804, "Installing builtin extension '{0}'...", id)));
252
236
  }
253
237
  else {
254
- this.logger.info(version ? ( localizeWithPath(_moduleId, 17, "Installing extension '{0}' v{1}...", id, version)) : ( localizeWithPath(_moduleId, 18, "Installing extension '{0}'...", id)));
238
+ this.logger.info(version ? ( localize(9805, "Installing extension '{0}' v{1}...", id, version)) : ( localize(9806, "Installing extension '{0}'...", id)));
255
239
  }
256
240
  extensionsToInstall.push({
257
241
  extension: gallery,
@@ -262,9 +246,8 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
262
246
  const installationResult = await this.extensionManagementService.installGalleryExtensions(extensionsToInstall);
263
247
  for (const extensionResult of installationResult) {
264
248
  if (extensionResult.error) {
265
- this.logger.error(( localizeWithPath(
266
- _moduleId,
267
- 19,
249
+ this.logger.error(( localize(
250
+ 9807,
268
251
  "Error while installing extension {0}: {1}",
269
252
  extensionResult.identifier.id,
270
253
  getErrorMessage(extensionResult.error)
@@ -272,9 +255,8 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
272
255
  failed.push(extensionResult.identifier.id);
273
256
  }
274
257
  else {
275
- this.logger.info(( localizeWithPath(
276
- _moduleId,
277
- 20,
258
+ this.logger.info(( localize(
259
+ 9808,
278
260
  "Extension '{0}' v{1} was successfully installed.",
279
261
  extensionResult.identifier.id,
280
262
  extensionResult.local?.manifest.version
@@ -292,17 +274,12 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
292
274
  const valid = await this.validateVSIX(manifest, force, installOptions.profileLocation, installedExtensions);
293
275
  if (valid) {
294
276
  try {
295
- await this.extensionManagementService.install(vsix, installOptions);
296
- this.logger.info(( localizeWithPath(
297
- _moduleId,
298
- 21,
299
- "Extension '{0}' was successfully installed.",
300
- basename(vsix)
301
- )));
277
+ await this.extensionManagementService.install(vsix, { ...installOptions, installGivenVersion: true });
278
+ this.logger.info(( localize(9809, "Extension '{0}' was successfully installed.", basename(vsix))));
302
279
  }
303
280
  catch (error) {
304
281
  if (isCancellationError(error)) {
305
- this.logger.info(( localizeWithPath(_moduleId, 22, "Cancelled installing extension '{0}'.", basename(vsix))));
282
+ this.logger.info(( localize(9810, "Cancelled installing extension '{0}'.", basename(vsix))));
306
283
  }
307
284
  else {
308
285
  throw error;
@@ -336,9 +313,8 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
336
313
  const extensionIdentifier = { id: getGalleryExtensionId(manifest.publisher, manifest.name) };
337
314
  const newer = installedExtensions.find(local => areSameExtensions(extensionIdentifier, local.identifier) && semverExports.gt(local.manifest.version, manifest.version));
338
315
  if (newer) {
339
- this.logger.info(( localizeWithPath(
340
- _moduleId,
341
- 23,
316
+ this.logger.info(( localize(
317
+ 9811,
342
318
  "A newer version of extension '{0}' v{1} is already installed. Use '--force' option to downgrade to older version.",
343
319
  newer.identifier.id,
344
320
  newer.manifest.version,
@@ -365,38 +341,35 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
365
341
  throw ( (new Error(`${this.notInstalled(id)}\n${useId}`)));
366
342
  }
367
343
  if (( (extensionsToUninstall.some(e => e.type === ExtensionType.System)))) {
368
- this.logger.info(( localizeWithPath(
369
- _moduleId,
370
- 24,
344
+ this.logger.info(( localize(
345
+ 9812,
371
346
  "Extension '{0}' is a Built-in extension and cannot be uninstalled",
372
347
  id
373
348
  )));
374
349
  return;
375
350
  }
376
351
  if (!force && ( (extensionsToUninstall.some(e => e.isBuiltin)))) {
377
- this.logger.info(( localizeWithPath(
378
- _moduleId,
379
- 25,
352
+ this.logger.info(( localize(
353
+ 9813,
380
354
  "Extension '{0}' is marked as a Built-in extension by user. Please use '--force' option to uninstall it.",
381
355
  id
382
356
  )));
383
357
  return;
384
358
  }
385
- this.logger.info(( localizeWithPath(_moduleId, 26, "Uninstalling {0}...", id)));
359
+ this.logger.info(( localize(9814, "Uninstalling {0}...", id)));
386
360
  for (const extensionToUninstall of extensionsToUninstall) {
387
361
  await this.extensionManagementService.uninstall(extensionToUninstall, { profileLocation });
388
362
  }
389
363
  if (this.location) {
390
- this.logger.info(( localizeWithPath(
391
- _moduleId,
392
- 27,
364
+ this.logger.info(( localize(
365
+ 9815,
393
366
  "Extension '{0}' was successfully uninstalled from {1}!",
394
367
  id,
395
368
  this.location
396
369
  )));
397
370
  }
398
371
  else {
399
- this.logger.info(( localizeWithPath(_moduleId, 28, "Extension '{0}' was successfully uninstalled!", id)));
372
+ this.logger.info(( localize(9816, "Extension '{0}' was successfully uninstalled!", id)));
400
373
  }
401
374
  }
402
375
  }
@@ -414,13 +387,7 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
414
387
  });
415
388
  }
416
389
  notInstalled(id) {
417
- return this.location ? ( localizeWithPath(
418
- _moduleId,
419
- 29,
420
- "Extension '{0}' is not installed on {1}.",
421
- id,
422
- this.location
423
- )) : ( localizeWithPath(_moduleId, 30, "Extension '{0}' is not installed.", id));
390
+ return this.location ? ( localize(9817, "Extension '{0}' is not installed on {1}.", id, this.location)) : ( localize(9818, "Extension '{0}' is not installed.", id));
424
391
  }
425
392
  };
426
393
  ExtensionManagementCLI = ( (__decorate([
@@ -1,6 +1,6 @@
1
1
  import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
2
2
  import { Disposable, DisposableMap } from 'vscode/vscode/vs/base/common/lifecycle';
3
- import { localizeWithPath } from 'vscode/vscode/vs/nls';
3
+ import { localize } from 'vscode/vscode/vs/nls';
4
4
  import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
5
5
  import { INTERNAL_AUTH_PROVIDER_PREFIX } from 'vscode/vscode/vs/workbench/services/authentication/common/authentication';
6
6
  import { IAuthenticationService, IAuthenticationExtensionsService } from 'vscode/vscode/vs/workbench/services/authentication/common/authentication.service';
@@ -18,7 +18,6 @@ import { getAuthenticationProviderActivationEvent } from 'vscode/vscode/vs/workb
18
18
  import { URI } from 'vscode/vscode/vs/base/common/uri';
19
19
  import { IOpenerService } from 'vscode/vscode/vs/platform/opener/common/opener.service';
20
20
 
21
- const _moduleId = "vs/workbench/api/browser/mainThreadAuthentication";
22
21
  class MainThreadAuthenticationProvider extends Disposable {
23
22
  constructor(_proxy, id, label, supportsMultipleAccounts, notificationService, onDidChangeSessionsEmitter) {
24
23
  super();
@@ -37,7 +36,7 @@ class MainThreadAuthenticationProvider extends Disposable {
37
36
  }
38
37
  async removeSession(sessionId) {
39
38
  await this._proxy.$removeSession(this.id, sessionId);
40
- this.notificationService.info(( localizeWithPath(_moduleId, 0, "Successfully signed out.")));
39
+ this.notificationService.info(( localize(4548, "Successfully signed out.")));
41
40
  }
42
41
  }
43
42
  let MainThreadAuthentication = class MainThreadAuthentication extends Disposable {
@@ -92,9 +91,8 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
92
91
  async loginPrompt(provider, extensionName, recreatingSession, options) {
93
92
  let message;
94
93
  if (provider.id.startsWith(INTERNAL_AUTH_PROVIDER_PREFIX)) {
95
- message = ( localizeWithPath(
96
- _moduleId,
97
- 1,
94
+ message = ( localize(
95
+ 4549,
98
96
  "The extension '{0}' wants to access the language models provided by {1}.",
99
97
  extensionName,
100
98
  provider.label
@@ -102,16 +100,14 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
102
100
  }
103
101
  else {
104
102
  message = recreatingSession
105
- ? ( localizeWithPath(
106
- _moduleId,
107
- 2,
103
+ ? ( localize(
104
+ 4550,
108
105
  "The extension '{0}' wants you to sign in again using {1}.",
109
106
  extensionName,
110
107
  provider.label
111
108
  ))
112
- : ( localizeWithPath(
113
- _moduleId,
114
- 3,
109
+ : ( localize(
110
+ 4551,
115
111
  "The extension '{0}' wants to sign in using {1}.",
116
112
  extensionName,
117
113
  provider.label
@@ -119,7 +115,7 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
119
115
  }
120
116
  const buttons = [
121
117
  {
122
- label: ( localizeWithPath(_moduleId, 4, "&&Allow")),
118
+ label: ( localize(4552, "&&Allow")),
123
119
  run() {
124
120
  return true;
125
121
  },
@@ -127,7 +123,7 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
127
123
  ];
128
124
  if (options?.learnMore) {
129
125
  buttons.push({
130
- label: ( localizeWithPath(_moduleId, 5, "Learn more")),
126
+ label: ( localize(4553, "Learn more")),
131
127
  run: async () => {
132
128
  const result = this.loginPrompt(provider, extensionName, recreatingSession, options);
133
129
  await this.openerService.open(URI.revive(options.learnMore), { allowCommands: true });
@@ -162,18 +158,16 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
162
158
  'Invalid combination of options. Please remove one of the following: createIfNone, silent'
163
159
  )));
164
160
  }
161
+ if (options.clearSessionPreference) {
162
+ this.authenticationExtensionsService.removeSessionPreference(providerId, extensionId, scopes);
163
+ }
165
164
  if (!options.forceNewSession && sessions.length) {
166
165
  if (provider.supportsMultipleAccounts) {
167
- if (options.clearSessionPreference) {
168
- this.authenticationExtensionsService.removeSessionPreference(providerId, extensionId, scopes);
169
- }
170
- else {
171
- const existingSessionPreference = this.authenticationExtensionsService.getSessionPreference(providerId, extensionId, scopes);
172
- if (existingSessionPreference) {
173
- const matchingSession = sessions.find(session => session.id === existingSessionPreference);
174
- if (matchingSession && this.authenticationAccessService.isAccessAllowed(providerId, matchingSession.account.label, extensionId)) {
175
- return matchingSession;
176
- }
166
+ const existingSessionPreference = this.authenticationExtensionsService.getSessionPreference(providerId, extensionId, scopes);
167
+ if (existingSessionPreference) {
168
+ const matchingSession = sessions.find(session => session.id === existingSessionPreference);
169
+ if (matchingSession && this.authenticationAccessService.isAccessAllowed(providerId, matchingSession.account.label, extensionId)) {
170
+ return matchingSession;
177
171
  }
178
172
  }
179
173
  }
@@ -229,15 +223,7 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
229
223
  return session;
230
224
  }
231
225
  async $getAccounts(providerId) {
232
- const sessions = await this.authenticationService.getSessions(providerId);
233
- const accounts = ( (new Array()));
234
- const seenAccounts = ( (new Set()));
235
- for (const session of sessions) {
236
- if (!( (seenAccounts.has(session.account.label)))) {
237
- seenAccounts.add(session.account.label);
238
- accounts.push(session.account);
239
- }
240
- }
226
+ const accounts = await this.authenticationService.getAccounts(providerId);
241
227
  return accounts;
242
228
  }
243
229
  sendProviderUsageTelemetry(extensionId, providerId) {
@@ -3,7 +3,7 @@ import { Schemas } from 'vscode/vscode/vs/base/common/network';
3
3
  import { isWeb } from 'vscode/vscode/vs/base/common/platform';
4
4
  import { isString } from 'vscode/vscode/vs/base/common/types';
5
5
  import { URI } from 'vscode/vscode/vs/base/common/uri';
6
- import { localizeWithPath } from 'vscode/vscode/vs/nls';
6
+ import { localize } from 'vscode/vscode/vs/nls';
7
7
  import { CommandsRegistry } from 'vscode/vscode/vs/platform/commands/common/commands';
8
8
  import { ICommandService } from 'vscode/vscode/vs/platform/commands/common/commands.service';
9
9
  import { IExtensionManagementService, IExtensionGalleryService } from 'vscode/vscode/vs/platform/extensionManagement/common/extensionManagement.service';
@@ -18,7 +18,6 @@ import { IWorkbenchEnvironmentService } from 'vscode/vscode/vs/workbench/service
18
18
  import { IExtensionManagementServerService } from 'vscode/vscode/vs/workbench/services/extensionManagement/common/extensionManagement.service';
19
19
  import { IExtensionManifestPropertiesService } from 'vscode/vscode/vs/workbench/services/extensions/common/extensionManifestPropertiesService.service';
20
20
 
21
- const _moduleId = "vs/workbench/api/browser/mainThreadCLICommands";
22
21
  CommandsRegistry.registerCommand('_remoteCLI.openExternal', function (accessor, uri) {
23
22
  const openerService = accessor.get(IOpenerService);
24
23
  return openerService.open(isString(uri) ? uri : URI.revive(uri), { openExternal: true, allowTunneling: true });
@@ -85,9 +84,8 @@ let RemoteExtensionManagementCLI = class RemoteExtensionManagementCLI extends Ex
85
84
  validateExtensionKind(manifest) {
86
85
  if (!this._extensionManifestPropertiesService.canExecuteOnWorkspace(manifest)
87
86
  && !(isWeb && this._extensionManifestPropertiesService.canExecuteOnWeb(manifest))) {
88
- this.logger.info(( localizeWithPath(
89
- _moduleId,
90
- 0,
87
+ this.logger.info(( localize(
88
+ 4499,
91
89
  "Cannot install the '{0}' extension because it is declared to not run in this setup.",
92
90
  getExtensionId(manifest.publisher, manifest.name)
93
91
  )));
@@ -3,6 +3,7 @@ import { Emitter } from 'vscode/vscode/vs/base/common/event';
3
3
  import { Disposable, DisposableStore } from 'vscode/vscode/vs/base/common/lifecycle';
4
4
  import { URI } from 'vscode/vscode/vs/base/common/uri';
5
5
  import { Range } from 'vscode/vscode/vs/editor/common/core/range';
6
+ import { CommentThreadCollapsibleState } from 'vscode/vscode/vs/editor/common/languages';
6
7
  import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
7
8
  import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
8
9
  import { ICommentService } from 'vscode/vscode/vs/workbench/contrib/comments/browser/commentService.service';
@@ -15,7 +16,7 @@ import { SyncDescriptor } from 'vscode/vscode/vs/platform/instantiation/common/d
15
16
  import { ViewPaneContainer } from 'vscode/vscode/vs/workbench/browser/parts/views/viewPaneContainer';
16
17
  import { Codicon } from 'vscode/vscode/vs/base/common/codicons';
17
18
  import { registerIcon } from 'vscode/vscode/vs/platform/theme/common/iconRegistry';
18
- import { localizeWithPath } from 'vscode/vscode/vs/nls';
19
+ import { localize } from 'vscode/vscode/vs/nls';
19
20
  import { MarshalledId } from 'vscode/vscode/vs/base/common/marshallingIds';
20
21
  import { Schemas } from 'vscode/vscode/vs/base/common/network';
21
22
  import { IViewsService } from 'vscode/vscode/vs/workbench/services/views/common/viewsService.service';
@@ -23,7 +24,6 @@ import { revealCommentThread } from 'vscode/vscode/vs/workbench/contrib/comments
23
24
  import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
24
25
  import { IUriIdentityService } from 'vscode/vscode/vs/platform/uriIdentity/common/uriIdentity.service';
25
26
 
26
- const _moduleId = "vs/workbench/api/browser/mainThreadComments";
27
27
  class MainThreadCommentThread {
28
28
  get input() {
29
29
  return this._input;
@@ -416,7 +416,7 @@ class MainThreadCommentController {
416
416
  };
417
417
  }
418
418
  }
419
- const commentsViewIcon = registerIcon('comments-view-icon', Codicon.commentDiscussion, ( localizeWithPath(_moduleId, 0, 'View icon of the comments view.')));
419
+ const commentsViewIcon = registerIcon('comments-view-icon', Codicon.commentDiscussion, ( localize(4543, 'View icon of the comments view.')));
420
420
  let MainThreadComments = class MainThreadComments extends Disposable {
421
421
  constructor(extHostContext, _commentService, _viewsService, _viewDescriptorService, _uriIdentityService, _editorService) {
422
422
  super();
@@ -501,7 +501,7 @@ let MainThreadComments = class MainThreadComments extends Disposable {
501
501
  }
502
502
  provider.updateCommentingRanges(resourceHints);
503
503
  }
504
- async $revealCommentThread(handle, commentThreadHandle, options) {
504
+ async $revealCommentThread(handle, commentThreadHandle, commentUniqueIdInThread, options) {
505
505
  const provider = this._commentControllers.get(handle);
506
506
  if (!provider) {
507
507
  return Promise.resolve();
@@ -510,7 +510,19 @@ let MainThreadComments = class MainThreadComments extends Disposable {
510
510
  if (!thread || !thread.isDocumentCommentThread()) {
511
511
  return Promise.resolve();
512
512
  }
513
- revealCommentThread(this._commentService, this._editorService, this._uriIdentityService, thread, undefined, options.focusReply, undefined, options.preserveFocus);
513
+ const comment = thread.comments?.find(comment => comment.uniqueIdInThread === commentUniqueIdInThread);
514
+ revealCommentThread(this._commentService, this._editorService, this._uriIdentityService, thread, comment, options.focusReply, undefined, options.preserveFocus);
515
+ }
516
+ async $hideCommentThread(handle, commentThreadHandle) {
517
+ const provider = this._commentControllers.get(handle);
518
+ if (!provider) {
519
+ return Promise.resolve();
520
+ }
521
+ const thread = provider.getAllComments().find(thread => thread.commentThreadHandle === commentThreadHandle);
522
+ if (!thread || !thread.isDocumentCommentThread()) {
523
+ return Promise.resolve();
524
+ }
525
+ thread.collapsibleState = CommentThreadCollapsibleState.Collapsed;
514
526
  }
515
527
  registerView(commentsViewAlreadyRegistered) {
516
528
  if (!commentsViewAlreadyRegistered) {
@@ -10,7 +10,7 @@ import { basename } from 'vscode/vscode/vs/base/common/path';
10
10
  import { isEqualOrParent, isEqual, toLocalResource } from 'vscode/vscode/vs/base/common/resources';
11
11
  import { URI } from 'vscode/vscode/vs/base/common/uri';
12
12
  import { generateUuid } from 'vscode/vscode/vs/base/common/uuid';
13
- import { localizeWithPath } from 'vscode/vscode/vs/nls';
13
+ import { localize } from 'vscode/vscode/vs/nls';
14
14
  import { IFileDialogService } from 'vscode/vscode/vs/platform/dialogs/common/dialogs.service';
15
15
  import { FileOperation } from 'vscode/vscode/vs/platform/files/common/files';
16
16
  import { IFileService } from 'vscode/vscode/vs/platform/files/common/files.service';
@@ -38,7 +38,6 @@ import { IWorkingCopyFileService } from 'vscode/vscode/vs/workbench/services/wor
38
38
  import { IWorkingCopyService } from 'vscode/vscode/vs/workbench/services/workingCopy/common/workingCopyService.service';
39
39
 
40
40
  var MainThreadCustomEditorModel_1;
41
- const _moduleId = "vs/workbench/api/browser/mainThreadCustomEditors";
42
41
  var CustomEditorModelType;
43
42
  ( ((function(CustomEditorModelType) {
44
43
  CustomEditorModelType[CustomEditorModelType["Custom"] = 0] = "Custom";
@@ -306,7 +305,7 @@ let MainThreadCustomEditorModel = MainThreadCustomEditorModel_1 = class MainThre
306
305
  return true;
307
306
  }
308
307
  return false;
309
- })(), ( localizeWithPath(_moduleId, 0, "Custom editor '{0}' could not be saved.", this.name)));
308
+ })(), ( localize(9819, "Custom editor '{0}' could not be saved.", this.name)));
310
309
  }));
311
310
  }
312
311
  if (startDirty) {
@@ -373,7 +372,7 @@ let MainThreadCustomEditorModel = MainThreadCustomEditorModel_1 = class MainThre
373
372
  this._undoService.pushElement({
374
373
  type: UndoRedoElementType.Resource,
375
374
  resource: this._editorResource,
376
- label: label ?? ( localizeWithPath(_moduleId, 1, "Edit")),
375
+ label: label ?? ( localize(9820, "Edit")),
377
376
  code: 'undoredo.customEditorEdit',
378
377
  undo: () => this.undo(),
379
378
  redo: () => this.redo(),
@@ -1,12 +1,11 @@
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 { raceCancellationError } from 'vscode/vscode/vs/base/common/async';
6
6
  import { IEditSessionIdentityService } from 'vscode/vscode/vs/platform/workspace/common/editSessions.service';
7
7
  import { ExtHostContext } from 'vscode/vscode/vs/workbench/api/common/extHost.protocol';
8
8
 
9
- const _moduleId = "vs/workbench/api/browser/mainThreadEditSessionIdentityParticipant";
10
9
  class ExtHostEditSessionIdentityCreateParticipant {
11
10
  constructor(extHostContext) {
12
11
  this.timeout = 10000;
@@ -14,11 +13,7 @@ class ExtHostEditSessionIdentityCreateParticipant {
14
13
  }
15
14
  async participate(workspaceFolder, token) {
16
15
  const p = ( (new Promise((resolve, reject) => {
17
- setTimeout(() => reject(( (new Error(( localizeWithPath(
18
- _moduleId,
19
- 0,
20
- "Aborted onWillCreateEditSessionIdentity-event after 10000ms"
21
- )))))), this.timeout);
16
+ setTimeout(() => reject(( (new Error(( localize(4535, "Aborted onWillCreateEditSessionIdentity-event after 10000ms")))))), this.timeout);
22
17
  this._proxy.$onWillCreateEditSessionIdentity(workspaceFolder.uri, token, this.timeout).then(resolve, reject);
23
18
  })));
24
19
  return raceCancellationError(p, token);
@@ -158,11 +158,11 @@ let MainThreadEditorTabs = class MainThreadEditorTabs {
158
158
  if (editor instanceof MultiDiffEditorInput) {
159
159
  const diffEditors = [];
160
160
  for (const resource of (editor?.resources.get() ?? [])) {
161
- if (resource.original && resource.modified) {
161
+ if (resource.originalUri && resource.modifiedUri) {
162
162
  diffEditors.push({
163
163
  kind: TabInputKind.TextDiffInput,
164
- original: resource.original,
165
- modified: resource.modified
164
+ original: resource.originalUri,
165
+ modified: resource.modifiedUri
166
166
  });
167
167
  }
168
168
  }