@codingame/monaco-vscode-extensions-service-override 32.0.2 → 33.0.5

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 (33) hide show
  1. package/package.json +3 -3
  2. package/vscode/src/vs/platform/extensionManagement/common/extensionManagementCLI.js +29 -29
  3. package/vscode/src/vs/workbench/api/browser/mainThreadAuthentication.js +25 -25
  4. package/vscode/src/vs/workbench/api/browser/mainThreadCLICommands.js +1 -1
  5. package/vscode/src/vs/workbench/api/browser/mainThreadChatOutputRenderer.d.ts +3 -1
  6. package/vscode/src/vs/workbench/api/browser/mainThreadChatOutputRenderer.js +16 -5
  7. package/vscode/src/vs/workbench/api/browser/mainThreadChatSessions.js +2 -2
  8. package/vscode/src/vs/workbench/api/browser/mainThreadChatStatus.js +2 -1
  9. package/vscode/src/vs/workbench/api/browser/mainThreadComments.js +1 -1
  10. package/vscode/src/vs/workbench/api/browser/mainThreadCustomEditors.js +2 -2
  11. package/vscode/src/vs/workbench/api/browser/mainThreadEditSessionIdentityParticipant.js +1 -1
  12. package/vscode/src/vs/workbench/api/browser/mainThreadExtensionService.js +11 -11
  13. package/vscode/src/vs/workbench/api/browser/mainThreadFileSystemEventService.js +20 -20
  14. package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModels.js +2 -2
  15. package/vscode/src/vs/workbench/api/browser/mainThreadMcp.js +16 -12
  16. package/vscode/src/vs/workbench/api/browser/mainThreadMessageService.js +4 -4
  17. package/vscode/src/vs/workbench/api/browser/mainThreadNotebookSaveParticipant.js +1 -1
  18. package/vscode/src/vs/workbench/api/browser/mainThreadOutputService.js +3 -3
  19. package/vscode/src/vs/workbench/api/browser/mainThreadProgress.js +1 -1
  20. package/vscode/src/vs/workbench/api/browser/mainThreadSaveParticipant.js +1 -1
  21. package/vscode/src/vs/workbench/api/browser/mainThreadTask.js +1 -1
  22. package/vscode/src/vs/workbench/api/browser/mainThreadTunnelService.js +2 -2
  23. package/vscode/src/vs/workbench/api/browser/mainThreadUriOpeners.js +2 -2
  24. package/vscode/src/vs/workbench/api/browser/mainThreadWebviews.js +1 -1
  25. package/vscode/src/vs/workbench/api/browser/mainThreadWorkspace.js +5 -5
  26. package/vscode/src/vs/workbench/contrib/customEditor/common/customTextEditorModel.js +1 -1
  27. package/vscode/src/vs/workbench/services/extensionManagement/browser/extensionBisect.js +23 -23
  28. package/vscode/src/vs/workbench/services/extensionManagement/browser/webExtensionsScannerService.js +2 -2
  29. package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.js +12 -12
  30. package/vscode/src/vs/workbench/services/extensions/common/extensionHostManager.js +1 -1
  31. package/vscode/src/vs/workbench/services/extensions/common/extensionsProposedApi.js +1 -1
  32. package/vscode/src/vs/workbench/services/extensions/common/extensionsUtil.js +4 -4
  33. package/vscode/src/vs/workbench/services/themes/browser/cssExtensionPoint.js +5 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-extensions-service-override",
3
- "version": "32.0.2",
3
+ "version": "33.0.5",
4
4
  "private": false,
5
5
  "description": "VSCode public API plugged on the monaco editor - extensions service-override",
6
6
  "keywords": [],
@@ -15,8 +15,8 @@
15
15
  },
16
16
  "type": "module",
17
17
  "dependencies": {
18
- "@codingame/monaco-vscode-api": "32.0.2",
19
- "@codingame/monaco-vscode-files-service-override": "32.0.2"
18
+ "@codingame/monaco-vscode-api": "33.0.5",
19
+ "@codingame/monaco-vscode-files-service-override": "33.0.5"
20
20
  },
21
21
  "main": "index.js",
22
22
  "module": "index.js",
@@ -13,9 +13,9 @@ import { getIdAndVersion, areSameExtensions, getGalleryExtensionId, getExtension
13
13
  import { ExtensionType, EXTENSION_CATEGORIES } from '@codingame/monaco-vscode-api/vscode/vs/platform/extensions/common/extensions';
14
14
  import { IProductService } from '@codingame/monaco-vscode-api/vscode/vs/platform/product/common/productService.service';
15
15
 
16
- const notFound = id => ( localize(1898, "Extension '{0}' not found.", id));
16
+ const notFound = id => ( localize(1920, "Extension '{0}' not found.", id));
17
17
  const useId = ( localize(
18
- 1899,
18
+ 1921,
19
19
  "Make sure you use the full extension ID, including the publisher, e.g.: {0}",
20
20
  "ms-dotnettools.csharp"
21
21
  ));
@@ -62,7 +62,7 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
62
62
  return;
63
63
  }
64
64
  if (this.location) {
65
- this.logger.info(( localize(1900, "Extensions installed on {0}:", this.location)));
65
+ this.logger.info(( localize(1922, "Extensions installed on {0}:", this.location)));
66
66
  }
67
67
  extensions = extensions.sort((e1, e2) => e1.identifier.id.localeCompare(e2.identifier.id));
68
68
  let lastId = undefined;
@@ -77,7 +77,7 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
77
77
  const failed = [];
78
78
  try {
79
79
  if (extensions.length) {
80
- this.logger.info(this.location ? ( localize(1901, "Installing extensions on {0}...", this.location)) : ( localize(1902, "Installing extensions...")));
80
+ this.logger.info(this.location ? ( localize(1923, "Installing extensions on {0}...", this.location)) : ( localize(1924, "Installing extensions...")));
81
81
  }
82
82
  const installVSIXInfos = [];
83
83
  const installExtensionInfos = [];
@@ -142,11 +142,11 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
142
142
  failed.push(...failedGalleryExtensions);
143
143
  }
144
144
  } catch (error) {
145
- this.logger.error(( localize(1903, "Error while installing extensions: {0}", getErrorMessage(error))));
145
+ this.logger.error(( localize(1925, "Error while installing extensions: {0}", getErrorMessage(error))));
146
146
  throw error;
147
147
  }
148
148
  if (failed.length) {
149
- throw ( new Error(( localize(1904, "Failed Installing Extensions: {0}", failed.join(", ")))));
149
+ throw ( new Error(( localize(1926, "Failed Installing Extensions: {0}", failed.join(", ")))));
150
150
  }
151
151
  }
152
152
  async updateExtensions(profileLocation) {
@@ -161,7 +161,7 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
161
161
  }
162
162
  }
163
163
  this.logger.trace(( localize(
164
- 1905,
164
+ 1927,
165
165
  "Fetching latest versions for {0} extensions",
166
166
  installedExtensionsQuery.length
167
167
  )));
@@ -185,11 +185,11 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
185
185
  }
186
186
  }
187
187
  if (!extensionsToUpdate.length) {
188
- this.logger.info(( localize(1906, "No extension to update")));
188
+ this.logger.info(( localize(1928, "No extension to update")));
189
189
  return;
190
190
  }
191
191
  this.logger.info(( localize(
192
- 1907,
192
+ 1929,
193
193
  "Updating extensions: {0}",
194
194
  ( extensionsToUpdate.map(ext => ext.extension.identifier.id)).join(", ")
195
195
  )));
@@ -197,14 +197,14 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
197
197
  for (const extensionResult of installationResult) {
198
198
  if (extensionResult.error) {
199
199
  this.logger.error(( localize(
200
- 1908,
200
+ 1930,
201
201
  "Error while updating extension {0}: {1}",
202
202
  extensionResult.identifier.id,
203
203
  getErrorMessage(extensionResult.error)
204
204
  )));
205
205
  } else {
206
206
  this.logger.info(( localize(
207
- 1909,
207
+ 1931,
208
208
  "Extension '{0}' v{1} was successfully updated.",
209
209
  extensionResult.identifier.id,
210
210
  extensionResult.local?.manifest.version
@@ -230,7 +230,7 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
230
230
  }
231
231
  if (!force && (!version || (version === "prerelease" && installedExtension.preRelease))) {
232
232
  this.logger.info(( localize(
233
- 1910,
233
+ 1932,
234
234
  "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'.",
235
235
  id,
236
236
  installedExtension.manifest.version,
@@ -239,7 +239,7 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
239
239
  return false;
240
240
  }
241
241
  if (version && installedExtension.manifest.version === version) {
242
- this.logger.info(( localize(1911, "Extension '{0}' is already installed.", `${id}@${version}`)));
242
+ this.logger.info(( localize(1933, "Extension '{0}' is already installed.", `${id}@${version}`)));
243
243
  return false;
244
244
  }
245
245
  if (installedExtension.preRelease && version !== "prerelease") {
@@ -281,23 +281,23 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
281
281
  if (installedExtension) {
282
282
  if (gallery.version === installedExtension.manifest.version) {
283
283
  this.logger.info(( localize(
284
- 1911,
284
+ 1933,
285
285
  "Extension '{0}' is already installed.",
286
286
  version ? `${id}@${version}` : id
287
287
  )));
288
288
  return;
289
289
  }
290
290
  this.logger.info(( localize(
291
- 1912,
291
+ 1934,
292
292
  "Updating the extension '{0}' to the version {1}",
293
293
  id,
294
294
  gallery.version
295
295
  )));
296
296
  }
297
297
  if (installOptions.isBuiltin) {
298
- this.logger.info(version ? ( localize(1913, "Installing builtin extension '{0}' v{1}...", id, version)) : ( localize(1914, "Installing builtin extension '{0}'...", id)));
298
+ this.logger.info(version ? ( localize(1935, "Installing builtin extension '{0}' v{1}...", id, version)) : ( localize(1936, "Installing builtin extension '{0}'...", id)));
299
299
  } else {
300
- this.logger.info(version ? ( localize(1915, "Installing extension '{0}' v{1}...", id, version)) : ( localize(1916, "Installing extension '{0}'...", id)));
300
+ this.logger.info(version ? ( localize(1937, "Installing extension '{0}' v{1}...", id, version)) : ( localize(1938, "Installing extension '{0}'...", id)));
301
301
  }
302
302
  extensionsToInstall.push({
303
303
  extension: gallery,
@@ -313,7 +313,7 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
313
313
  for (const extensionResult of installationResult) {
314
314
  if (extensionResult.error) {
315
315
  this.logger.error(( localize(
316
- 1917,
316
+ 1939,
317
317
  "Error while installing extension {0}: {1}",
318
318
  extensionResult.identifier.id,
319
319
  getErrorMessage(extensionResult.error)
@@ -321,7 +321,7 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
321
321
  failed.push(extensionResult.identifier.id);
322
322
  } else {
323
323
  this.logger.info(( localize(
324
- 1918,
324
+ 1940,
325
325
  "Extension '{0}' v{1} was successfully installed.",
326
326
  extensionResult.identifier.id,
327
327
  extensionResult.local?.manifest.version
@@ -343,10 +343,10 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
343
343
  ...installOptions,
344
344
  installGivenVersion: true
345
345
  });
346
- this.logger.info(( localize(1919, "Extension '{0}' was successfully installed.", basename(vsix))));
346
+ this.logger.info(( localize(1941, "Extension '{0}' was successfully installed.", basename(vsix))));
347
347
  } catch (error) {
348
348
  if (isCancellationError(error)) {
349
- this.logger.info(( localize(1920, "Cancelled installing extension '{0}'.", basename(vsix))));
349
+ this.logger.info(( localize(1942, "Cancelled installing extension '{0}'.", basename(vsix))));
350
350
  } else {
351
351
  throw error;
352
352
  }
@@ -393,7 +393,7 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
393
393
  if (!force) {
394
394
  if (semverExports.gt(existingExtension.manifest.version, manifest.version)) {
395
395
  this.logger.info(( localize(
396
- 1921,
396
+ 1943,
397
397
  "A newer version of extension '{0}' v{1} is already installed. Use '--force' option to downgrade to older version.",
398
398
  existingExtension.identifier.id,
399
399
  existingExtension.manifest.version,
@@ -424,7 +424,7 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
424
424
  }
425
425
  if (( extensionsToUninstall.some(e => e.type === ExtensionType.System))) {
426
426
  this.logger.info(( localize(
427
- 1922,
427
+ 1944,
428
428
  "Extension '{0}' is a Built-in extension and cannot be uninstalled",
429
429
  id
430
430
  )));
@@ -432,13 +432,13 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
432
432
  }
433
433
  if (!force && ( extensionsToUninstall.some(e => e.isBuiltin))) {
434
434
  this.logger.info(( localize(
435
- 1923,
435
+ 1945,
436
436
  "Extension '{0}' is marked as a Built-in extension by user. Please use '--force' option to uninstall it.",
437
437
  id
438
438
  )));
439
439
  return;
440
440
  }
441
- this.logger.info(( localize(1924, "Uninstalling {0}...", id)));
441
+ this.logger.info(( localize(1946, "Uninstalling {0}...", id)));
442
442
  for (const extensionToUninstall of extensionsToUninstall) {
443
443
  await this.extensionManagementService.uninstall(extensionToUninstall, {
444
444
  profileLocation
@@ -446,13 +446,13 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
446
446
  }
447
447
  if (this.location) {
448
448
  this.logger.info(( localize(
449
- 1925,
449
+ 1947,
450
450
  "Extension '{0}' was successfully uninstalled from {1}!",
451
451
  id,
452
452
  this.location
453
453
  )));
454
454
  } else {
455
- this.logger.info(( localize(1926, "Extension '{0}' was successfully uninstalled!", id)));
455
+ this.logger.info(( localize(1948, "Extension '{0}' was successfully uninstalled!", id)));
456
456
  }
457
457
  }
458
458
  }
@@ -470,12 +470,12 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
470
470
  });
471
471
  }
472
472
  notInstalled(id) {
473
- return this.location ? ( localize(1927, "Extension '{0}' is not installed on {1}.", id, this.location)) : ( localize(1928, "Extension '{0}' is not installed.", id));
473
+ return this.location ? ( localize(1949, "Extension '{0}' is not installed on {1}.", id, this.location)) : ( localize(1950, "Extension '{0}' is not installed.", id));
474
474
  }
475
475
  validateBuiltinExtensionEnabledWithAutoUpdates(extension) {
476
476
  if (extension.isBuiltin && ( this.productService.builtInExtensionsEnabledWithAutoUpdates.some(e => e.toLowerCase() === extension.identifier.id.toLowerCase())) && !extension.forceAutoUpdate) {
477
477
  return localize(
478
- 1929,
478
+ 1951,
479
479
  "Extension '{0}' is a built-in extension and not allowed to be updated in the current product quality '{1}'.",
480
480
  extension.identifier.id,
481
481
  this.productService.quality
@@ -245,8 +245,8 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
245
245
  return await deferredPromise.p;
246
246
  }
247
247
  $showContinueNotification(message) {
248
- const yes = ( localize(2562, "Yes"));
249
- const no = ( localize(2563, "No"));
248
+ const yes = ( localize(2584, "Yes"));
249
+ const no = ( localize(2585, "No"));
250
250
  const deferredPromise = ( new DeferredPromise());
251
251
  let result = false;
252
252
  const handle = this.notificationService.prompt(Severity.Warning, message, [{
@@ -302,26 +302,26 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
302
302
  message = customMessage;
303
303
  } else {
304
304
  message = recreatingSession ? ( localize(
305
- 2564,
305
+ 2586,
306
306
  "The extension '{0}' wants you to sign in again using {1}.",
307
307
  extensionName,
308
308
  provider.label
309
309
  )) : ( localize(
310
- 2565,
310
+ 2587,
311
311
  "The extension '{0}' wants to sign in using {1}.",
312
312
  extensionName,
313
313
  provider.label
314
314
  ));
315
315
  }
316
316
  const buttons = [{
317
- label: ( localize(2566, "&&Allow")),
317
+ label: ( localize(2588, "&&Allow")),
318
318
  run() {
319
319
  return true;
320
320
  }
321
321
  }];
322
322
  if (options?.learnMore) {
323
323
  buttons.push({
324
- label: ( localize(2567, "Learn more")),
324
+ label: ( localize(2589, "Learn more")),
325
325
  run: async () => {
326
326
  const result = this.loginPrompt(provider, extensionName, recreatingSession, options);
327
327
  await this.openerService.open(URI.revive(options.learnMore), {
@@ -344,9 +344,9 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
344
344
  }
345
345
  async continueWithIncorrectAccountPrompt(chosenAccountLabel, requestedAccountLabel) {
346
346
  const result = await this.dialogService.prompt({
347
- message: ( localize(2568, "Incorrect account detected")),
347
+ message: ( localize(2590, "Incorrect account detected")),
348
348
  detail: ( localize(
349
- 2569,
349
+ 2591,
350
350
  "The chosen account, {0}, does not match the requested account, {1}.",
351
351
  chosenAccountLabel,
352
352
  requestedAccountLabel
@@ -354,10 +354,10 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
354
354
  type: Severity.Warning,
355
355
  cancelButton: true,
356
356
  buttons: [{
357
- label: ( localize(2570, "Keep {0}", chosenAccountLabel)),
357
+ label: ( localize(2592, "Keep {0}", chosenAccountLabel)),
358
358
  run: () => chosenAccountLabel
359
359
  }, {
360
- label: ( localize(2571, "Login with {0}", requestedAccountLabel)),
360
+ label: ( localize(2593, "Login with {0}", requestedAccountLabel)),
361
361
  run: () => requestedAccountLabel
362
362
  }]
363
363
  });
@@ -510,15 +510,15 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
510
510
  result
511
511
  } = await this.dialogService.prompt({
512
512
  type: Severity.Info,
513
- message: ( localize(2572, "Device Code Authentication")),
513
+ message: ( localize(2594, "Device Code Authentication")),
514
514
  detail: ( localize(
515
- 2573,
515
+ 2595,
516
516
  "Your code: {0}\n\nTo complete authentication, navigate to {1} and enter the code above.",
517
517
  userCode,
518
518
  verificationUri
519
519
  )),
520
520
  buttons: [{
521
- label: ( localize(2574, "Copy & Continue")),
521
+ label: ( localize(2596, "Copy & Continue")),
522
522
  run: () => true
523
523
  }],
524
524
  cancelButton: true
@@ -528,7 +528,7 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
528
528
  await this.clipboardService.writeText(userCode);
529
529
  return await this.openerService.open(( URI.parse(verificationUri)));
530
530
  } catch (error) {
531
- this.notificationService.error(( localize(2575, "Failed to open {0}", verificationUri)));
531
+ this.notificationService.error(( localize(2597, "Failed to open {0}", verificationUri)));
532
532
  }
533
533
  }
534
534
  return false;
@@ -537,44 +537,44 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
537
537
  const redirectUrls = "http://127.0.0.1:33418\nhttps://vscode.dev/redirect";
538
538
  const result = await this.dialogService.prompt({
539
539
  type: Severity.Info,
540
- message: ( localize(2576, "Dynamic Client Registration not supported")),
540
+ message: ( localize(2598, "Dynamic Client Registration not supported")),
541
541
  detail: ( localize(
542
- 2577,
542
+ 2599,
543
543
  "The authorization server '{0}' does not support automatic client registration. Do you want to proceed by manually providing a client registration (client ID)?\n\nNote: When registering your OAuth application, make sure to include these redirect URIs:\n{1}",
544
544
  authorizationServerUrl,
545
545
  redirectUrls
546
546
  )),
547
547
  buttons: [{
548
- label: ( localize(2578, "Copy URIs & Proceed")),
548
+ label: ( localize(2600, "Copy URIs & Proceed")),
549
549
  run: async () => {
550
550
  try {
551
551
  await this.clipboardService.writeText(redirectUrls);
552
552
  } catch (error) {
553
- this.notificationService.error(( localize(2579, "Failed to copy redirect URIs to clipboard.")));
553
+ this.notificationService.error(( localize(2601, "Failed to copy redirect URIs to clipboard.")));
554
554
  }
555
555
  return true;
556
556
  }
557
557
  }],
558
558
  cancelButton: {
559
- label: ( localize(2580, "Cancel")),
559
+ label: ( localize(2602, "Cancel")),
560
560
  run: () => false
561
561
  }
562
562
  });
563
563
  if (!result) {
564
564
  return undefined;
565
565
  }
566
- const sharedTitle = ( localize(2581, "Add Client Registration Details"));
566
+ const sharedTitle = ( localize(2603, "Add Client Registration Details"));
567
567
  const clientId = await this.quickInputService.input({
568
568
  title: sharedTitle,
569
569
  prompt: ( localize(
570
- 2582,
570
+ 2604,
571
571
  "Enter an existing client ID that has been registered with the following redirect URIs: http://127.0.0.1:33418, https://vscode.dev/redirect"
572
572
  )),
573
- placeHolder: ( localize(2583, "OAuth client ID (azye39d...)")),
573
+ placeHolder: ( localize(2605, "OAuth client ID (azye39d...)")),
574
574
  ignoreFocusLost: true,
575
575
  validateInput: async value => {
576
576
  if (!value || value.trim().length === 0) {
577
- return localize(2584, "Client ID is required");
577
+ return localize(2606, "Client ID is required");
578
578
  }
579
579
  return undefined;
580
580
  }
@@ -585,11 +585,11 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
585
585
  const clientSecret = await this.quickInputService.input({
586
586
  title: sharedTitle,
587
587
  prompt: ( localize(
588
- 2585,
588
+ 2607,
589
589
  "(optional) Enter an existing client secret associated with the client id '{0}' or leave this field blank",
590
590
  clientId
591
591
  )),
592
- placeHolder: ( localize(2586, "OAuth client secret (wer32o50f...) or leave it blank")),
592
+ placeHolder: ( localize(2608, "OAuth client secret (wer32o50f...) or leave it blank")),
593
593
  password: true,
594
594
  ignoreFocusLost: true
595
595
  });
@@ -108,7 +108,7 @@ let RemoteExtensionManagementCLI = class RemoteExtensionManagementCLI extends Ex
108
108
  if (
109
109
  !this._extensionManifestPropertiesService.canExecuteOnWorkspace(manifest) && !(isWeb && this._extensionManifestPropertiesService.canExecuteOnWeb(manifest))) {
110
110
  this.logger.info(( localize(
111
- 2587,
111
+ 2609,
112
112
  "Cannot install the '{0}' extension because it is declared to not run in this setup.",
113
113
  getExtensionId(manifest.publisher, manifest.name)
114
114
  )));
@@ -1,6 +1,7 @@
1
1
  import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
2
2
  import { UriComponents } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
3
3
  import { ExtensionIdentifier } from "@codingame/monaco-vscode-api/vscode/vs/platform/extensions/common/extensions";
4
+ import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
4
5
  import { IChatOutputRendererService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.service";
5
6
  import { IExtHostContext } from "../../services/extensions/common/extHostCustomers.js";
6
7
  import { MainThreadChatOutputRendererShape } from "@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol";
@@ -8,10 +9,11 @@ import { MainThreadWebviews } from "./mainThreadWebviews.js";
8
9
  export declare class MainThreadChatOutputRenderer extends Disposable implements MainThreadChatOutputRendererShape {
9
10
  private readonly _mainThreadWebview;
10
11
  private readonly _rendererService;
12
+ private readonly _logService;
11
13
  private readonly _proxy;
12
14
  private _webviewHandlePool;
13
15
  private readonly registeredRenderers;
14
- constructor(extHostContext: IExtHostContext, _mainThreadWebview: MainThreadWebviews, _rendererService: IChatOutputRendererService);
16
+ constructor(extHostContext: IExtHostContext, _mainThreadWebview: MainThreadWebviews, _rendererService: IChatOutputRendererService, _logService: ILogService);
15
17
  dispose(): void;
16
18
  $registerChatOutputRenderer(viewType: string, extensionId: ExtensionIdentifier, extensionLocation: UriComponents): void;
17
19
  $unregisterChatOutputRenderer(viewType: string): void;
@@ -3,14 +3,16 @@ import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib
3
3
  import { VSBuffer } from '@codingame/monaco-vscode-api/vscode/vs/base/common/buffer';
4
4
  import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
5
5
  import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
6
+ import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
6
7
  import { IChatOutputRendererService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.service';
7
8
  import { ExtHostContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol';
8
9
 
9
10
  let MainThreadChatOutputRenderer = class MainThreadChatOutputRenderer extends Disposable {
10
- constructor(extHostContext, _mainThreadWebview, _rendererService) {
11
+ constructor(extHostContext, _mainThreadWebview, _rendererService, _logService) {
11
12
  super();
12
13
  this._mainThreadWebview = _mainThreadWebview;
13
14
  this._rendererService = _rendererService;
15
+ this._logService = _logService;
14
16
  this._webviewHandlePool = 0;
15
17
  this.registeredRenderers = ( new Map());
16
18
  this._proxy = ( extHostContext.getProxy(ExtHostContext.ExtHostChatOutputRenderer));
@@ -21,13 +23,20 @@ let MainThreadChatOutputRenderer = class MainThreadChatOutputRenderer extends Di
21
23
  this.registeredRenderers.clear();
22
24
  }
23
25
  $registerChatOutputRenderer(viewType, extensionId, extensionLocation) {
24
- this._rendererService.registerRenderer(viewType, {
25
- renderOutputPart: async (mime, data, webview, token) => {
26
+ const existingRegistration = this.registeredRenderers.get(viewType);
27
+ if (existingRegistration) {
28
+ this._logService.warn(
29
+ `Re-registering chat output renderer for view type '${viewType}' from extension '${extensionId.value}'.`
30
+ );
31
+ existingRegistration.dispose();
32
+ }
33
+ const disposable = this._rendererService.registerRenderer(viewType, {
34
+ renderOutputPart: async (mime, data, webview, context, token) => {
26
35
  const webviewHandle = `chat-output-${++this._webviewHandlePool}`;
27
36
  this._mainThreadWebview.addWebview(webviewHandle, webview, {
28
37
  serializeBuffersForPostMessage: true
29
38
  });
30
- return this._proxy.$renderChatOutput(viewType, mime, VSBuffer.wrap(data), webviewHandle, token);
39
+ return this._proxy.$renderChatOutput(viewType, mime, VSBuffer.wrap(data), webviewHandle, context, token);
31
40
  }
32
41
  }, {
33
42
  extension: {
@@ -35,11 +44,13 @@ let MainThreadChatOutputRenderer = class MainThreadChatOutputRenderer extends Di
35
44
  location: URI.revive(extensionLocation)
36
45
  }
37
46
  });
47
+ this.registeredRenderers.set(viewType, disposable);
38
48
  }
39
49
  $unregisterChatOutputRenderer(viewType) {
40
50
  this.registeredRenderers.get(viewType)?.dispose();
51
+ this.registeredRenderers.delete(viewType);
41
52
  }
42
53
  };
43
- MainThreadChatOutputRenderer = ( __decorate([( __param(2, IChatOutputRendererService))], MainThreadChatOutputRenderer));
54
+ MainThreadChatOutputRenderer = ( __decorate([( __param(2, IChatOutputRendererService)), ( __param(3, ILogService))], MainThreadChatOutputRenderer));
44
55
 
45
56
  export { MainThreadChatOutputRenderer };
@@ -136,7 +136,7 @@ class ObservableChatSession extends Disposable {
136
136
  return confirmInterrupt();
137
137
  }
138
138
  return this._dialogService.confirm({
139
- message: ( localize(2588, "Are you sure you want to interrupt the active session?"))
139
+ message: ( localize(2610, "Are you sure you want to interrupt the active session?"))
140
140
  }).then(confirmed => {
141
141
  if (confirmed.confirmed) {
142
142
  return confirmInterrupt();
@@ -652,7 +652,7 @@ let MainThreadChatSessions = class MainThreadChatSessions extends Disposable {
652
652
  const options = {
653
653
  title: {
654
654
  preferred: originalEditor?.getName() || undefined,
655
- fallback: ( localize(2589, "{0}", contribution?.displayName))
655
+ fallback: ( localize(2611, "{0}", contribution?.displayName))
656
656
  }
657
657
  };
658
658
  const newSession = await this._chatSessionsService.getOrCreateChatSession(URI.revive(modifiedResource), CancellationToken.None);
@@ -15,7 +15,8 @@ let MainThreadChatStatus = class MainThreadChatStatus extends Disposable {
15
15
  id,
16
16
  label: entry.title,
17
17
  description: entry.description,
18
- detail: entry.detail
18
+ detail: entry.detail,
19
+ tooltip: entry.tooltip
19
20
  });
20
21
  }
21
22
  $disposeEntry(id) {
@@ -468,7 +468,7 @@ let MainThreadCommentController = class MainThreadCommentController extends Disp
468
468
  }
469
469
  };
470
470
  MainThreadCommentController = ( __decorate([( __param(6, ICommentService)), ( __param(7, IUriIdentityService))], MainThreadCommentController));
471
- const commentsViewIcon = registerIcon("comments-view-icon", Codicon.commentDiscussion, ( localize(2590, "View icon of the comments view.")));
471
+ const commentsViewIcon = registerIcon("comments-view-icon", Codicon.commentDiscussion, ( localize(2612, "View icon of the comments view.")));
472
472
  let MainThreadComments = class MainThreadComments extends Disposable {
473
473
  constructor(
474
474
  extHostContext,
@@ -532,7 +532,7 @@ let MainThreadCustomEditorModel = MainThreadCustomEditorModel_1 = class MainThre
532
532
  this._register(workingCopyService.registerWorkingCopy(this));
533
533
  this._register(extensionService.onWillStop(e => {
534
534
  e.veto(true, ( localize(
535
- 2591,
535
+ 2613,
536
536
  "An extension provided editor for '{0}' is still open that would close otherwise.",
537
537
  this.name
538
538
  )));
@@ -600,7 +600,7 @@ let MainThreadCustomEditorModel = MainThreadCustomEditorModel_1 = class MainThre
600
600
  this._undoService.pushElement({
601
601
  type: UndoRedoElementType.Resource,
602
602
  resource: this._editorResource,
603
- label: label ?? ( localize(2592, "Edit")),
603
+ label: label ?? ( localize(2614, "Edit")),
604
604
  code: "undoredo.customEditorEdit",
605
605
  undo: () => this.undo(),
606
606
  redo: () => this.redo()
@@ -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(2593, "Aborted onWillCreateEditSessionIdentity-event after 10000ms"))))), this.timeout);
17
+ setTimeout(() => reject(( new Error(( localize(2615, "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);