@codingame/monaco-vscode-extensions-service-override 27.0.0 → 28.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/package.json +3 -3
  2. package/vscode/src/vs/platform/extensionManagement/common/extensionManagementCLI.js +28 -28
  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/mainThreadChatAgents2.d.ts +3 -0
  6. package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents2.js +51 -1
  7. package/vscode/src/vs/workbench/api/browser/mainThreadChatSessions.js +2 -2
  8. package/vscode/src/vs/workbench/api/browser/mainThreadComments.js +1 -1
  9. package/vscode/src/vs/workbench/api/browser/mainThreadCustomEditors.js +2 -2
  10. package/vscode/src/vs/workbench/api/browser/mainThreadEditSessionIdentityParticipant.js +1 -1
  11. package/vscode/src/vs/workbench/api/browser/mainThreadExtensionService.js +11 -11
  12. package/vscode/src/vs/workbench/api/browser/mainThreadFileSystemEventService.js +20 -20
  13. package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModels.js +2 -2
  14. package/vscode/src/vs/workbench/api/browser/mainThreadManagedSockets.d.ts +1 -1
  15. package/vscode/src/vs/workbench/api/browser/mainThreadManagedSockets.js +11 -8
  16. package/vscode/src/vs/workbench/api/browser/mainThreadMcp.js +8 -8
  17. package/vscode/src/vs/workbench/api/browser/mainThreadMessageService.js +4 -4
  18. package/vscode/src/vs/workbench/api/browser/mainThreadNotebookSaveParticipant.js +1 -1
  19. package/vscode/src/vs/workbench/api/browser/mainThreadOutputService.js +3 -3
  20. package/vscode/src/vs/workbench/api/browser/mainThreadProgress.js +1 -1
  21. package/vscode/src/vs/workbench/api/browser/mainThreadSaveParticipant.js +1 -1
  22. package/vscode/src/vs/workbench/api/browser/mainThreadTask.js +1 -1
  23. package/vscode/src/vs/workbench/api/browser/mainThreadTunnelService.js +2 -2
  24. package/vscode/src/vs/workbench/api/browser/mainThreadUriOpeners.js +2 -2
  25. package/vscode/src/vs/workbench/api/browser/mainThreadWebviews.js +1 -1
  26. package/vscode/src/vs/workbench/api/browser/mainThreadWorkspace.js +7 -7
  27. package/vscode/src/vs/workbench/contrib/customEditor/common/customTextEditorModel.js +1 -1
  28. package/vscode/src/vs/workbench/services/extensionManagement/browser/extensionBisect.js +23 -23
  29. package/vscode/src/vs/workbench/services/extensionManagement/browser/webExtensionsScannerService.js +2 -2
  30. package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.js +12 -12
  31. package/vscode/src/vs/workbench/services/extensions/common/extensionHostManager.js +1 -1
  32. package/vscode/src/vs/workbench/services/extensions/common/extensionsProposedApi.js +1 -1
  33. package/vscode/src/vs/workbench/services/extensions/common/extensionsUtil.js +4 -4
  34. package/vscode/src/vs/workbench/services/themes/browser/cssExtensionPoint.js +13 -9
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-extensions-service-override",
3
- "version": "27.0.0",
3
+ "version": "28.0.0",
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": "27.0.0",
19
- "@codingame/monaco-vscode-files-service-override": "27.0.0"
18
+ "@codingame/monaco-vscode-api": "28.0.0",
19
+ "@codingame/monaco-vscode-files-service-override": "28.0.0"
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(1878, "Extension '{0}' not found.", id));
16
+ const notFound = id => ( localize(1880, "Extension '{0}' not found.", id));
17
17
  const useId = ( localize(
18
- 1879,
18
+ 1881,
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(1880, "Extensions installed on {0}:", this.location)));
65
+ this.logger.info(( localize(1882, "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(1881, "Installing extensions on {0}...", this.location)) : ( localize(1882, "Installing extensions...")));
80
+ this.logger.info(this.location ? ( localize(1883, "Installing extensions on {0}...", this.location)) : ( localize(1884, "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(1883, "Error while installing extensions: {0}", getErrorMessage(error))));
145
+ this.logger.error(( localize(1885, "Error while installing extensions: {0}", getErrorMessage(error))));
146
146
  throw error;
147
147
  }
148
148
  if (failed.length) {
149
- throw ( new Error(( localize(1884, "Failed Installing Extensions: {0}", failed.join(", ")))));
149
+ throw ( new Error(( localize(1886, "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
- 1885,
164
+ 1887,
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(1886, "No extension to update")));
188
+ this.logger.info(( localize(1888, "No extension to update")));
189
189
  return;
190
190
  }
191
191
  this.logger.info(( localize(
192
- 1887,
192
+ 1889,
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
- 1888,
200
+ 1890,
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
- 1889,
207
+ 1891,
208
208
  "Extension '{0}' v{1} was successfully updated.",
209
209
  extensionResult.identifier.id,
210
210
  extensionResult.local?.manifest.version
@@ -225,7 +225,7 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
225
225
  if (installedExtension) {
226
226
  if (!force && (!version || (version === "prerelease" && installedExtension.preRelease))) {
227
227
  this.logger.info(( localize(
228
- 1890,
228
+ 1892,
229
229
  "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'.",
230
230
  id,
231
231
  installedExtension.manifest.version,
@@ -234,7 +234,7 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
234
234
  return false;
235
235
  }
236
236
  if (version && installedExtension.manifest.version === version) {
237
- this.logger.info(( localize(1891, "Extension '{0}' is already installed.", `${id}@${version}`)));
237
+ this.logger.info(( localize(1893, "Extension '{0}' is already installed.", `${id}@${version}`)));
238
238
  return false;
239
239
  }
240
240
  if (installedExtension.preRelease && version !== "prerelease") {
@@ -276,23 +276,23 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
276
276
  if (installedExtension) {
277
277
  if (gallery.version === installedExtension.manifest.version) {
278
278
  this.logger.info(( localize(
279
- 1891,
279
+ 1893,
280
280
  "Extension '{0}' is already installed.",
281
281
  version ? `${id}@${version}` : id
282
282
  )));
283
283
  return;
284
284
  }
285
285
  this.logger.info(( localize(
286
- 1892,
286
+ 1894,
287
287
  "Updating the extension '{0}' to the version {1}",
288
288
  id,
289
289
  gallery.version
290
290
  )));
291
291
  }
292
292
  if (installOptions.isBuiltin) {
293
- this.logger.info(version ? ( localize(1893, "Installing builtin extension '{0}' v{1}...", id, version)) : ( localize(1894, "Installing builtin extension '{0}'...", id)));
293
+ this.logger.info(version ? ( localize(1895, "Installing builtin extension '{0}' v{1}...", id, version)) : ( localize(1896, "Installing builtin extension '{0}'...", id)));
294
294
  } else {
295
- this.logger.info(version ? ( localize(1895, "Installing extension '{0}' v{1}...", id, version)) : ( localize(1896, "Installing extension '{0}'...", id)));
295
+ this.logger.info(version ? ( localize(1897, "Installing extension '{0}' v{1}...", id, version)) : ( localize(1898, "Installing extension '{0}'...", id)));
296
296
  }
297
297
  extensionsToInstall.push({
298
298
  extension: gallery,
@@ -308,7 +308,7 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
308
308
  for (const extensionResult of installationResult) {
309
309
  if (extensionResult.error) {
310
310
  this.logger.error(( localize(
311
- 1897,
311
+ 1899,
312
312
  "Error while installing extension {0}: {1}",
313
313
  extensionResult.identifier.id,
314
314
  getErrorMessage(extensionResult.error)
@@ -316,7 +316,7 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
316
316
  failed.push(extensionResult.identifier.id);
317
317
  } else {
318
318
  this.logger.info(( localize(
319
- 1898,
319
+ 1900,
320
320
  "Extension '{0}' v{1} was successfully installed.",
321
321
  extensionResult.identifier.id,
322
322
  extensionResult.local?.manifest.version
@@ -338,10 +338,10 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
338
338
  ...installOptions,
339
339
  installGivenVersion: true
340
340
  });
341
- this.logger.info(( localize(1899, "Extension '{0}' was successfully installed.", basename(vsix))));
341
+ this.logger.info(( localize(1901, "Extension '{0}' was successfully installed.", basename(vsix))));
342
342
  } catch (error) {
343
343
  if (isCancellationError(error)) {
344
- this.logger.info(( localize(1900, "Cancelled installing extension '{0}'.", basename(vsix))));
344
+ this.logger.info(( localize(1902, "Cancelled installing extension '{0}'.", basename(vsix))));
345
345
  } else {
346
346
  throw error;
347
347
  }
@@ -384,7 +384,7 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
384
384
  );
385
385
  if (newer) {
386
386
  this.logger.info(( localize(
387
- 1901,
387
+ 1903,
388
388
  "A newer version of extension '{0}' v{1} is already installed. Use '--force' option to downgrade to older version.",
389
389
  newer.identifier.id,
390
390
  newer.manifest.version,
@@ -414,7 +414,7 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
414
414
  }
415
415
  if (( extensionsToUninstall.some(e => e.type === ExtensionType.System))) {
416
416
  this.logger.info(( localize(
417
- 1902,
417
+ 1904,
418
418
  "Extension '{0}' is a Built-in extension and cannot be uninstalled",
419
419
  id
420
420
  )));
@@ -422,13 +422,13 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
422
422
  }
423
423
  if (!force && ( extensionsToUninstall.some(e => e.isBuiltin))) {
424
424
  this.logger.info(( localize(
425
- 1903,
425
+ 1905,
426
426
  "Extension '{0}' is marked as a Built-in extension by user. Please use '--force' option to uninstall it.",
427
427
  id
428
428
  )));
429
429
  return;
430
430
  }
431
- this.logger.info(( localize(1904, "Uninstalling {0}...", id)));
431
+ this.logger.info(( localize(1906, "Uninstalling {0}...", id)));
432
432
  for (const extensionToUninstall of extensionsToUninstall) {
433
433
  await this.extensionManagementService.uninstall(extensionToUninstall, {
434
434
  profileLocation
@@ -436,13 +436,13 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
436
436
  }
437
437
  if (this.location) {
438
438
  this.logger.info(( localize(
439
- 1905,
439
+ 1907,
440
440
  "Extension '{0}' was successfully uninstalled from {1}!",
441
441
  id,
442
442
  this.location
443
443
  )));
444
444
  } else {
445
- this.logger.info(( localize(1906, "Extension '{0}' was successfully uninstalled!", id)));
445
+ this.logger.info(( localize(1908, "Extension '{0}' was successfully uninstalled!", id)));
446
446
  }
447
447
  }
448
448
  }
@@ -460,7 +460,7 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
460
460
  });
461
461
  }
462
462
  notInstalled(id) {
463
- return this.location ? ( localize(1907, "Extension '{0}' is not installed on {1}.", id, this.location)) : ( localize(1908, "Extension '{0}' is not installed.", id));
463
+ return this.location ? ( localize(1909, "Extension '{0}' is not installed on {1}.", id, this.location)) : ( localize(1910, "Extension '{0}' is not installed.", id));
464
464
  }
465
465
  };
466
466
  ExtensionManagementCLI = ( __decorate([( __param(2, IExtensionManagementService)), ( __param(3, IExtensionGalleryService)), ( __param(4, IProductService))], ExtensionManagementCLI));
@@ -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(2515, "Yes"));
249
- const no = ( localize(2516, "No"));
248
+ const yes = ( localize(2520, "Yes"));
249
+ const no = ( localize(2521, "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
- 2517,
305
+ 2522,
306
306
  "The extension '{0}' wants you to sign in again using {1}.",
307
307
  extensionName,
308
308
  provider.label
309
309
  )) : ( localize(
310
- 2518,
310
+ 2523,
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(2519, "&&Allow")),
317
+ label: ( localize(2524, "&&Allow")),
318
318
  run() {
319
319
  return true;
320
320
  }
321
321
  }];
322
322
  if (options?.learnMore) {
323
323
  buttons.push({
324
- label: ( localize(2520, "Learn more")),
324
+ label: ( localize(2525, "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(2521, "Incorrect account detected")),
347
+ message: ( localize(2526, "Incorrect account detected")),
348
348
  detail: ( localize(
349
- 2522,
349
+ 2527,
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(2523, "Keep {0}", chosenAccountLabel)),
357
+ label: ( localize(2528, "Keep {0}", chosenAccountLabel)),
358
358
  run: () => chosenAccountLabel
359
359
  }, {
360
- label: ( localize(2524, "Login with {0}", requestedAccountLabel)),
360
+ label: ( localize(2529, "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(2525, "Device Code Authentication")),
513
+ message: ( localize(2530, "Device Code Authentication")),
514
514
  detail: ( localize(
515
- 2526,
515
+ 2531,
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(2527, "Copy & Continue")),
521
+ label: ( localize(2532, "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(2528, "Failed to open {0}", verificationUri)));
531
+ this.notificationService.error(( localize(2533, "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(2529, "Dynamic Client Registration not supported")),
540
+ message: ( localize(2534, "Dynamic Client Registration not supported")),
541
541
  detail: ( localize(
542
- 2530,
542
+ 2535,
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(2531, "Copy URIs & Proceed")),
548
+ label: ( localize(2536, "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(2532, "Failed to copy redirect URIs to clipboard.")));
553
+ this.notificationService.error(( localize(2537, "Failed to copy redirect URIs to clipboard.")));
554
554
  }
555
555
  return true;
556
556
  }
557
557
  }],
558
558
  cancelButton: {
559
- label: ( localize(2533, "Cancel")),
559
+ label: ( localize(2538, "Cancel")),
560
560
  run: () => false
561
561
  }
562
562
  });
563
563
  if (!result) {
564
564
  return undefined;
565
565
  }
566
- const sharedTitle = ( localize(2534, "Add Client Registration Details"));
566
+ const sharedTitle = ( localize(2539, "Add Client Registration Details"));
567
567
  const clientId = await this.quickInputService.input({
568
568
  title: sharedTitle,
569
569
  prompt: ( localize(
570
- 2535,
570
+ 2540,
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(2536, "OAuth client ID (azye39d...)")),
573
+ placeHolder: ( localize(2541, "OAuth client ID (azye39d...)")),
574
574
  ignoreFocusLost: true,
575
575
  validateInput: async value => {
576
576
  if (!value || value.trim().length === 0) {
577
- return localize(2537, "Client ID is required");
577
+ return localize(2542, "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
- 2538,
588
+ 2543,
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(2539, "OAuth client secret (wer32o50f...) or leave it blank")),
592
+ placeHolder: ( localize(2544, "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
- 2540,
111
+ 2545,
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
  )));
@@ -58,6 +58,9 @@ export declare class MainThreadChatAgents2 extends Disposable implements MainThr
58
58
  private readonly _unresolvedAnchors;
59
59
  constructor(extHostContext: IExtHostContext, _chatAgentService: IChatAgentService, _chatSessionService: IChatSessionsService, _chatService: IChatService, _languageFeaturesService: ILanguageFeaturesService, _chatWidgetService: IChatWidgetService, _instantiationService: IInstantiationService, _logService: ILogService, _extensionService: IExtensionService, _uriIdentityService: IUriIdentityService, _promptsService: IPromptsService, _languageModelToolsService: ILanguageModelToolsService);
60
60
  private _acceptActiveChatSession;
61
+ private _pushCustomAgents;
62
+ private _pushInstructions;
63
+ private _pushSkills;
61
64
  $unregisterAgent(handle: number): void;
62
65
  $transferActiveChatSession(toWorkspace: UriComponents): Promise<void>;
63
66
  $registerAgent(handle: number, extension: ExtensionIdentifier, id: string, metadata: IExtensionChatAgentMetadata, dynamicProps: IDynamicChatAgentProps | undefined): Promise<void>;
@@ -23,6 +23,7 @@ import { IPromptsService } from '@codingame/monaco-vscode-api/vscode/vs/workbenc
23
23
  import { isValidPromptType } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/promptTypes';
24
24
  import { ChatRequestAgentPart } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/requestParser/chatParserTypes';
25
25
  import { ChatRequestParser } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/requestParser/chatRequestParser';
26
+ import { getDynamicVariablesForWidget, getSelectedToolAndToolSetsForWidget } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/attachments/chatVariables';
26
27
  import { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService.service';
27
28
  import { IChatSessionsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService.service';
28
29
  import { ChatModeKind, ChatAgentLocation } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
@@ -130,12 +131,57 @@ let MainThreadChatAgents2 = class MainThreadChatAgents2 extends Disposable {
130
131
  this._acceptActiveChatSession(this._chatWidgetService.lastFocusedWidget);
131
132
  }));
132
133
  this._acceptActiveChatSession(this._chatWidgetService.lastFocusedWidget);
134
+ void this._pushCustomAgents();
135
+ this._register(this._promptsService.onDidChangeCustomAgents(() => {
136
+ void this._pushCustomAgents();
137
+ }));
138
+ void this._pushInstructions();
139
+ this._register(this._promptsService.onDidChangeInstructions(() => {
140
+ void this._pushInstructions();
141
+ }));
142
+ void this._pushSkills();
143
+ this._register(this._promptsService.onDidChangeSkills(() => {
144
+ void this._pushSkills();
145
+ }));
133
146
  }
134
147
  _acceptActiveChatSession(widget) {
135
148
  const sessionResource = widget?.viewModel?.sessionResource;
136
149
  const isLocal = sessionResource && getAgentSessionProvider(sessionResource) === AgentSessionProviders.Local;
137
150
  this._proxy.$acceptActiveChatSession(isLocal ? sessionResource : undefined);
138
151
  }
152
+ async _pushCustomAgents() {
153
+ try {
154
+ const customAgents = await this._promptsService.getCustomAgents(CancellationToken.None);
155
+ const dtos = ( customAgents.map(agent => ({
156
+ uri: agent.uri
157
+ })));
158
+ this._proxy.$acceptCustomAgents(dtos);
159
+ } catch (error) {
160
+ this._logService.error("[chat] Failed to push custom agents to extension host", error);
161
+ }
162
+ }
163
+ async _pushInstructions() {
164
+ try {
165
+ const instructions = await this._promptsService.getInstructionFiles(CancellationToken.None);
166
+ const dtos = ( instructions.map(instruction => ({
167
+ uri: instruction.uri
168
+ })));
169
+ this._proxy.$acceptInstructions(dtos);
170
+ } catch (error) {
171
+ this._logService.error("[chat] Failed to push instructions to extension host", error);
172
+ }
173
+ }
174
+ async _pushSkills() {
175
+ try {
176
+ const skills = (await this._promptsService.findAgentSkills(CancellationToken.None)) ?? [];
177
+ const dtos = ( skills.map(skill => ({
178
+ uri: skill.uri
179
+ })));
180
+ this._proxy.$acceptSkills(dtos);
181
+ } catch (error) {
182
+ this._logService.error("[chat] Failed to push skills to extension host", error);
183
+ }
184
+ }
139
185
  $unregisterAgent(handle) {
140
186
  this._agents.deleteAndDispose(handle);
141
187
  }
@@ -404,7 +450,11 @@ let MainThreadChatAgents2 = class MainThreadChatAgents2 extends Disposable {
404
450
  if (query && !( triggerCharacters.some(c => query.startsWith(c)))) {
405
451
  return;
406
452
  }
407
- const parsedRequest = this._instantiationService.createInstance(ChatRequestParser).parseChatRequest(widget.viewModel.sessionResource, model.getValue()).parts;
453
+ const parsedRequest = this._instantiationService.createInstance(ChatRequestParser).parseChatRequestWithReferences(
454
+ getDynamicVariablesForWidget(widget),
455
+ getSelectedToolAndToolSetsForWidget(widget),
456
+ model.getValue()
457
+ ).parts;
408
458
  const agentPart = parsedRequest.find(part => part instanceof ChatRequestAgentPart);
409
459
  const thisAgentId = this._agents.get(handle)?.id;
410
460
  if (agentPart?.agent.id !== thisAgentId) {
@@ -116,7 +116,7 @@ class ObservableChatSession extends Disposable {
116
116
  return confirmInterrupt();
117
117
  }
118
118
  return this._dialogService.confirm({
119
- message: ( localize(2541, "Are you sure you want to interrupt the active session?"))
119
+ message: ( localize(2546, "Are you sure you want to interrupt the active session?"))
120
120
  }).then(confirmed => {
121
121
  if (confirmed.confirmed) {
122
122
  return confirmInterrupt();
@@ -440,7 +440,7 @@ let MainThreadChatSessions = class MainThreadChatSessions extends Disposable {
440
440
  const options = {
441
441
  title: {
442
442
  preferred: originalEditor?.getName() || undefined,
443
- fallback: ( localize(2542, "{0}", contribution?.displayName))
443
+ fallback: ( localize(2547, "{0}", contribution?.displayName))
444
444
  }
445
445
  };
446
446
  const newSession = await this._chatSessionsService.getOrCreateChatSession(URI.revive(modifiedResource), CancellationToken.None);
@@ -456,7 +456,7 @@ class MainThreadCommentController extends Disposable {
456
456
  };
457
457
  }
458
458
  }
459
- const commentsViewIcon = registerIcon("comments-view-icon", Codicon.commentDiscussion, ( localize(2543, "View icon of the comments view.")));
459
+ const commentsViewIcon = registerIcon("comments-view-icon", Codicon.commentDiscussion, ( localize(2548, "View icon of the comments view.")));
460
460
  let MainThreadComments = class MainThreadComments extends Disposable {
461
461
  constructor(
462
462
  extHostContext,
@@ -405,7 +405,7 @@ let MainThreadCustomEditorModel = MainThreadCustomEditorModel_1 = class MainThre
405
405
  this._register(workingCopyService.registerWorkingCopy(this));
406
406
  this._register(extensionService.onWillStop(e => {
407
407
  e.veto(true, ( localize(
408
- 2544,
408
+ 2549,
409
409
  "An extension provided editor for '{0}' is still open that would close otherwise.",
410
410
  this.name
411
411
  )));
@@ -473,7 +473,7 @@ let MainThreadCustomEditorModel = MainThreadCustomEditorModel_1 = class MainThre
473
473
  this._undoService.pushElement({
474
474
  type: UndoRedoElementType.Resource,
475
475
  resource: this._editorResource,
476
- label: label ?? ( localize(2545, "Edit")),
476
+ label: label ?? ( localize(2550, "Edit")),
477
477
  code: "undoredo.customEditorEdit",
478
478
  undo: () => this.undo(),
479
479
  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(2546, "Aborted onWillCreateEditSessionIdentity-event after 10000ms"))))), this.timeout);
17
+ setTimeout(() => reject(( new Error(( localize(2551, "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);