@codingame/monaco-vscode-extensions-service-override 10.1.4 → 11.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 (35) hide show
  1. package/assets/{webWorkerExtensionHostIframe.esm.html → webWorkerExtensionHostIframe.html} +5 -12
  2. package/extensions.js +2 -2
  3. package/package.json +7 -3
  4. package/vscode/src/vs/platform/extensionManagement/common/extensionManagementCLI.js +28 -28
  5. package/vscode/src/vs/workbench/api/browser/mainThreadAuthentication.js +11 -11
  6. package/vscode/src/vs/workbench/api/browser/mainThreadCLICommands.js +26 -20
  7. package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents2.js +26 -8
  8. package/vscode/src/vs/workbench/api/browser/mainThreadComments.js +35 -22
  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/mainThreadEditor.js +1 -1
  12. package/vscode/src/vs/workbench/api/browser/mainThreadEditorTabs.js +2 -2
  13. package/vscode/src/vs/workbench/api/browser/mainThreadExtensionService.js +11 -11
  14. package/vscode/src/vs/workbench/api/browser/mainThreadFileSystemEventService.js +20 -20
  15. package/vscode/src/vs/workbench/api/browser/mainThreadLanguageFeatures.js +10 -6
  16. package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModelTools.js +3 -3
  17. package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModels.js +21 -4
  18. package/vscode/src/vs/workbench/api/browser/mainThreadMessageService.js +4 -4
  19. package/vscode/src/vs/workbench/api/browser/mainThreadNotebookSaveParticipant.js +1 -1
  20. package/vscode/src/vs/workbench/api/browser/mainThreadProgress.js +1 -1
  21. package/vscode/src/vs/workbench/api/browser/mainThreadSCM.js +5 -4
  22. package/vscode/src/vs/workbench/api/browser/mainThreadSaveParticipant.js +1 -1
  23. package/vscode/src/vs/workbench/api/browser/mainThreadTask.js +6 -2
  24. package/vscode/src/vs/workbench/api/browser/mainThreadTreeViews.js +13 -9
  25. package/vscode/src/vs/workbench/api/browser/mainThreadTunnelService.js +2 -2
  26. package/vscode/src/vs/workbench/api/browser/mainThreadUriOpeners.js +2 -2
  27. package/vscode/src/vs/workbench/api/browser/mainThreadWebviews.js +1 -1
  28. package/vscode/src/vs/workbench/api/browser/mainThreadWorkspace.js +5 -5
  29. package/vscode/src/vs/workbench/contrib/customEditor/common/customTextEditorModel.js +1 -1
  30. package/vscode/src/vs/workbench/services/extensionManagement/browser/extensionBisect.js +23 -23
  31. package/vscode/src/vs/workbench/services/extensions/browser/webWorkerExtensionHost.js +2 -4
  32. package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.js +21 -16
  33. package/vscode/src/vs/workbench/services/extensions/common/extensionHostManager.js +1 -1
  34. package/vscode/src/vs/workbench/services/extensions/common/extensionsProposedApi.js +1 -1
  35. package/vscode/src/vs/workbench/services/extensions/common/extensionsUtil.js +4 -4
@@ -4,7 +4,7 @@
4
4
  <meta http-equiv="Content-Security-Policy" content="
5
5
  default-src 'none';
6
6
  child-src 'self' data: blob:;
7
- script-src 'self' 'unsafe-eval' 'sha256-fCnZ3iXydTZHO961jO3ioYDdWSfm8PZg/rI6zFX/SE0=' https: http://localhost:* blob:;
7
+ script-src 'self' 'unsafe-eval' 'sha256-xM2KVDKIoeb8vVxk4ezEUsxdTZh5wFnKO3YmFhy9tkk=' https: http://localhost:* blob:;
8
8
  connect-src 'self' data: https: wss: http://localhost:* http://127.0.0.1:* ws://localhost:* ws://127.0.0.1:*;"/>
9
9
  </head>
10
10
  <body>
@@ -78,7 +78,7 @@
78
78
  return;
79
79
  }
80
80
  const { data } = event.data;
81
- createWorker(data.baseUrl, data.workerUrl, data.fileRoot, data.nls.messages, data.nls.language);
81
+ createWorker(data.workerUrl, data.fileRoot, data.nls.messages, data.nls.language);
82
82
  };
83
83
 
84
84
  window.parent.postMessage({
@@ -87,33 +87,26 @@
87
87
  }, '*');
88
88
  }
89
89
 
90
- function createWorker(baseUrl, workerUrl, fileRoot, nlsMessages, nlsLanguage) {
90
+ function createWorker(workerUrl, fileRoot, nlsMessages, nlsLanguage) {
91
91
  try {
92
92
  if (globalThis.crossOriginIsolated) {
93
93
  workerUrl += '?vscode-coi=2'; // COEP
94
94
  }
95
95
 
96
- const isESM = true;
97
-
98
96
  // In below blob code, we are using JSON.stringify to ensure the passed
99
97
  // in values are not breaking our script. The values may contain string
100
98
  // terminating characters (such as ' or ").
101
99
 
102
100
  const blob = new Blob([[
103
101
  `/*extensionHostWorker*/`,
104
- `globalThis.MonacoEnvironment = { baseUrl: ${JSON.stringify(baseUrl)} };`,
105
102
  `globalThis._VSCODE_NLS_MESSAGES = ${JSON.stringify(nlsMessages)};`,
106
103
  `globalThis._VSCODE_NLS_LANGUAGE = ${JSON.stringify(nlsLanguage)};`,
107
104
  `globalThis._VSCODE_FILE_ROOT = ${JSON.stringify(fileRoot)};`,
108
- isESM ? `await import(${JSON.stringify(workerUrl)});` : `importScripts(${JSON.stringify(workerUrl)});`,
105
+ `await import(${JSON.stringify(workerUrl)});`,
109
106
  `/*extensionHostWorker*/`
110
107
  ].join('')], { type: 'application/javascript' });
111
108
 
112
- const worker = new Worker(URL.createObjectURL(blob), { name, type: isESM ? 'module' : undefined });
113
- if (!isESM) {
114
- // Note: cannot postMessage into a worker that is ESM because imports are async
115
- worker.postMessage('vs/workbench/api/worker/extensionHostWorker');
116
- }
109
+ const worker = new Worker(URL.createObjectURL(blob), { name, type: 'module' });
117
110
  const nestedWorkers = new Map();
118
111
 
119
112
  worker.onmessage = (event) => {
package/extensions.js CHANGED
@@ -229,7 +229,7 @@ class ExtensionResourceLoaderServiceOverride extends ExtensionResourceLoaderServ
229
229
  }
230
230
  let iframeAlternateDomains;
231
231
  registerAssets({
232
- 'vs/workbench/services/extensions/worker/webWorkerExtensionHostIframe.esm.html': () => changeUrlDomain(new URL('./assets/webWorkerExtensionHostIframe.esm.html', import.meta.url).href, iframeAlternateDomains)
232
+ 'vs/workbench/services/extensions/worker/webWorkerExtensionHostIframe.html': () => changeUrlDomain(new URL('./assets/webWorkerExtensionHostIframe.html', import.meta.url).href, iframeAlternateDomains)
233
233
  });
234
234
  function getServiceOverride(workerConfig, _iframeAlternateDomains) {
235
235
  if (_iframeAlternateDomains != null) {
@@ -243,7 +243,7 @@ function getServiceOverride(workerConfig, _iframeAlternateDomains) {
243
243
  : undefined;
244
244
  if (workerConfig != null) {
245
245
  registerAssets({
246
- 'vs/workbench/api/worker/extensionHostWorker.esm.js': () => workerConfig.url
246
+ 'vs/workbench/api/worker/extensionHostWorkerMain.js': () => workerConfig.url
247
247
  });
248
248
  }
249
249
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-extensions-service-override",
3
- "version": "10.1.4",
3
+ "version": "11.0.0",
4
4
  "keywords": [],
5
5
  "author": {
6
6
  "name": "CodinGame",
@@ -26,7 +26,11 @@
26
26
  }
27
27
  },
28
28
  "dependencies": {
29
- "vscode": "npm:@codingame/monaco-vscode-api@10.1.4",
30
- "@codingame/monaco-vscode-files-service-override": "10.1.4"
29
+ "vscode": "npm:@codingame/monaco-vscode-api@11.0.0",
30
+ "@codingame/monaco-vscode-files-service-override": "11.0.0",
31
+ "@codingame/monaco-vscode-chat-extensions-notebook-common": "11.0.0",
32
+ "@codingame/monaco-vscode-chat-extensions-interactive-notebook-quickaccess-search-terminal-common": "11.0.0",
33
+ "@codingame/monaco-vscode-chat-extensions-notebook-terminal-common": "11.0.0",
34
+ "@codingame/monaco-vscode-comments-extensions-common": "11.0.0"
31
35
  }
32
36
  }
@@ -11,9 +11,9 @@ import { IExtensionManagementService, IExtensionGalleryService } from 'vscode/vs
11
11
  import { getIdAndVersion, areSameExtensions, getGalleryExtensionId, getExtensionId } from 'vscode/vscode/vs/platform/extensionManagement/common/extensionManagementUtil';
12
12
  import { EXTENSION_CATEGORIES } from 'vscode/vscode/vs/platform/extensions/common/extensions';
13
13
 
14
- const notFound = (id) => ( localize(9912, "Extension '{0}' not found.", id));
14
+ const notFound = (id) => ( localize(10002, "Extension '{0}' not found.", id));
15
15
  const useId = ( localize(
16
- 9913,
16
+ 10003,
17
17
  "Make sure you use the full extension ID, including the publisher, e.g.: {0}",
18
18
  'ms-dotnettools.csharp'
19
19
  ));
@@ -50,7 +50,7 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
50
50
  return;
51
51
  }
52
52
  if (this.location) {
53
- this.logger.info(( localize(9914, "Extensions installed on {0}:", this.location)));
53
+ this.logger.info(( localize(10004, "Extensions installed on {0}:", this.location)));
54
54
  }
55
55
  extensions = extensions.sort((e1, e2) => e1.identifier.id.localeCompare(e2.identifier.id));
56
56
  let lastId = undefined;
@@ -65,7 +65,7 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
65
65
  const failed = [];
66
66
  try {
67
67
  if (extensions.length) {
68
- this.logger.info(this.location ? ( localize(9915, "Installing extensions on {0}...", this.location)) : ( localize(9916, "Installing extensions...")));
68
+ this.logger.info(this.location ? ( localize(10005, "Installing extensions on {0}...", this.location)) : ( localize(10006, "Installing extensions...")));
69
69
  }
70
70
  const installVSIXInfos = [];
71
71
  const installExtensionInfos = [];
@@ -108,11 +108,11 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
108
108
  }
109
109
  }
110
110
  catch (error) {
111
- this.logger.error(( localize(9917, "Error while installing extensions: {0}", getErrorMessage(error))));
111
+ this.logger.error(( localize(10007, "Error while installing extensions: {0}", getErrorMessage(error))));
112
112
  throw error;
113
113
  }
114
114
  if (failed.length) {
115
- throw ( (new Error(localize(9918, "Failed Installing Extensions: {0}", failed.join(', ')))));
115
+ throw ( (new Error(localize(10008, "Failed Installing Extensions: {0}", failed.join(', ')))));
116
116
  }
117
117
  }
118
118
  async updateExtensions(profileLocation) {
@@ -124,7 +124,7 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
124
124
  }
125
125
  }
126
126
  this.logger.trace(( localize(
127
- 9919,
127
+ 10009,
128
128
  "Fetching latest versions for {0} extensions",
129
129
  installedExtensionsQuery.length
130
130
  )));
@@ -141,11 +141,11 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
141
141
  }
142
142
  }
143
143
  if (!extensionsToUpdate.length) {
144
- this.logger.info(( localize(9920, "No extension to update")));
144
+ this.logger.info(( localize(10010, "No extension to update")));
145
145
  return;
146
146
  }
147
147
  this.logger.info(( localize(
148
- 9921,
148
+ 10011,
149
149
  "Updating extensions: {0}",
150
150
  ( (extensionsToUpdate.map(ext => ext.extension.identifier.id))).join(', ')
151
151
  )));
@@ -153,7 +153,7 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
153
153
  for (const extensionResult of installationResult) {
154
154
  if (extensionResult.error) {
155
155
  this.logger.error(( localize(
156
- 9922,
156
+ 10012,
157
157
  "Error while updating extension {0}: {1}",
158
158
  extensionResult.identifier.id,
159
159
  getErrorMessage(extensionResult.error)
@@ -161,7 +161,7 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
161
161
  }
162
162
  else {
163
163
  this.logger.info(( localize(
164
- 9923,
164
+ 10013,
165
165
  "Extension '{0}' v{1} was successfully updated.",
166
166
  extensionResult.identifier.id,
167
167
  extensionResult.local?.manifest.version
@@ -175,7 +175,7 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
175
175
  if (installedExtension) {
176
176
  if (!force && (!version || (version === 'prerelease' && installedExtension.preRelease))) {
177
177
  this.logger.info(( localize(
178
- 9924,
178
+ 10014,
179
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'.",
180
180
  id,
181
181
  installedExtension.manifest.version,
@@ -184,7 +184,7 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
184
184
  return false;
185
185
  }
186
186
  if (version && installedExtension.manifest.version === version) {
187
- this.logger.info(( localize(9925, "Extension '{0}' is already installed.", `${id}@${version}`)));
187
+ this.logger.info(( localize(10015, "Extension '{0}' is already installed.", `${id}@${version}`)));
188
188
  return false;
189
189
  }
190
190
  }
@@ -218,24 +218,24 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
218
218
  if (installedExtension) {
219
219
  if (gallery.version === installedExtension.manifest.version) {
220
220
  this.logger.info(( localize(
221
- 9925,
221
+ 10015,
222
222
  "Extension '{0}' is already installed.",
223
223
  version ? `${id}@${version}` : id
224
224
  )));
225
225
  return;
226
226
  }
227
227
  this.logger.info(( localize(
228
- 9926,
228
+ 10016,
229
229
  "Updating the extension '{0}' to the version {1}",
230
230
  id,
231
231
  gallery.version
232
232
  )));
233
233
  }
234
234
  if (installOptions.isBuiltin) {
235
- this.logger.info(version ? ( localize(9927, "Installing builtin extension '{0}' v{1}...", id, version)) : ( localize(9928, "Installing builtin extension '{0}'...", id)));
235
+ this.logger.info(version ? ( localize(10017, "Installing builtin extension '{0}' v{1}...", id, version)) : ( localize(10018, "Installing builtin extension '{0}'...", id)));
236
236
  }
237
237
  else {
238
- this.logger.info(version ? ( localize(9929, "Installing extension '{0}' v{1}...", id, version)) : ( localize(9930, "Installing extension '{0}'...", id)));
238
+ this.logger.info(version ? ( localize(10019, "Installing extension '{0}' v{1}...", id, version)) : ( localize(10020, "Installing extension '{0}'...", id)));
239
239
  }
240
240
  extensionsToInstall.push({
241
241
  extension: gallery,
@@ -247,7 +247,7 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
247
247
  for (const extensionResult of installationResult) {
248
248
  if (extensionResult.error) {
249
249
  this.logger.error(( localize(
250
- 9931,
250
+ 10021,
251
251
  "Error while installing extension {0}: {1}",
252
252
  extensionResult.identifier.id,
253
253
  getErrorMessage(extensionResult.error)
@@ -256,7 +256,7 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
256
256
  }
257
257
  else {
258
258
  this.logger.info(( localize(
259
- 9932,
259
+ 10022,
260
260
  "Extension '{0}' v{1} was successfully installed.",
261
261
  extensionResult.identifier.id,
262
262
  extensionResult.local?.manifest.version
@@ -275,11 +275,11 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
275
275
  if (valid) {
276
276
  try {
277
277
  await this.extensionManagementService.install(vsix, { ...installOptions, installGivenVersion: true });
278
- this.logger.info(( localize(9933, "Extension '{0}' was successfully installed.", basename(vsix))));
278
+ this.logger.info(( localize(10023, "Extension '{0}' was successfully installed.", basename(vsix))));
279
279
  }
280
280
  catch (error) {
281
281
  if (isCancellationError(error)) {
282
- this.logger.info(( localize(9934, "Cancelled installing extension '{0}'.", basename(vsix))));
282
+ this.logger.info(( localize(10024, "Cancelled installing extension '{0}'.", basename(vsix))));
283
283
  }
284
284
  else {
285
285
  throw error;
@@ -314,7 +314,7 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
314
314
  const newer = installedExtensions.find(local => areSameExtensions(extensionIdentifier, local.identifier) && semverExports.gt(local.manifest.version, manifest.version));
315
315
  if (newer) {
316
316
  this.logger.info(( localize(
317
- 9935,
317
+ 10025,
318
318
  "A newer version of extension '{0}' v{1} is already installed. Use '--force' option to downgrade to older version.",
319
319
  newer.identifier.id,
320
320
  newer.manifest.version,
@@ -342,7 +342,7 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
342
342
  }
343
343
  if (( (extensionsToUninstall.some(e => e.type === 0 )))) {
344
344
  this.logger.info(( localize(
345
- 9936,
345
+ 10026,
346
346
  "Extension '{0}' is a Built-in extension and cannot be uninstalled",
347
347
  id
348
348
  )));
@@ -350,26 +350,26 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
350
350
  }
351
351
  if (!force && ( (extensionsToUninstall.some(e => e.isBuiltin)))) {
352
352
  this.logger.info(( localize(
353
- 9937,
353
+ 10027,
354
354
  "Extension '{0}' is marked as a Built-in extension by user. Please use '--force' option to uninstall it.",
355
355
  id
356
356
  )));
357
357
  return;
358
358
  }
359
- this.logger.info(( localize(9938, "Uninstalling {0}...", id)));
359
+ this.logger.info(( localize(10028, "Uninstalling {0}...", id)));
360
360
  for (const extensionToUninstall of extensionsToUninstall) {
361
361
  await this.extensionManagementService.uninstall(extensionToUninstall, { profileLocation });
362
362
  }
363
363
  if (this.location) {
364
364
  this.logger.info(( localize(
365
- 9939,
365
+ 10029,
366
366
  "Extension '{0}' was successfully uninstalled from {1}!",
367
367
  id,
368
368
  this.location
369
369
  )));
370
370
  }
371
371
  else {
372
- this.logger.info(( localize(9940, "Extension '{0}' was successfully uninstalled!", id)));
372
+ this.logger.info(( localize(10030, "Extension '{0}' was successfully uninstalled!", id)));
373
373
  }
374
374
  }
375
375
  }
@@ -387,7 +387,7 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
387
387
  });
388
388
  }
389
389
  notInstalled(id) {
390
- return this.location ? ( localize(9941, "Extension '{0}' is not installed on {1}.", id, this.location)) : ( localize(9942, "Extension '{0}' is not installed.", id));
390
+ return this.location ? ( localize(10031, "Extension '{0}' is not installed on {1}.", id, this.location)) : ( localize(10032, "Extension '{0}' is not installed.", id));
391
391
  }
392
392
  };
393
393
  ExtensionManagementCLI = ( (__decorate([
@@ -36,7 +36,7 @@ class MainThreadAuthenticationProvider extends Disposable {
36
36
  }
37
37
  async removeSession(sessionId) {
38
38
  await this._proxy.$removeSession(this.id, sessionId);
39
- this.notificationService.info(( localize(4859, "Successfully signed out.")));
39
+ this.notificationService.info(( localize(4984, "Successfully signed out.")));
40
40
  }
41
41
  }
42
42
  let MainThreadAuthentication = class MainThreadAuthentication extends Disposable {
@@ -96,7 +96,7 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
96
96
  let message;
97
97
  if (provider.id.startsWith(INTERNAL_AUTH_PROVIDER_PREFIX)) {
98
98
  message = ( localize(
99
- 4860,
99
+ 4985,
100
100
  "The extension '{0}' wants to access the language models provided by {1}.",
101
101
  extensionName,
102
102
  provider.label
@@ -105,13 +105,13 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
105
105
  else {
106
106
  message = recreatingSession
107
107
  ? ( localize(
108
- 4861,
108
+ 4986,
109
109
  "The extension '{0}' wants you to sign in again using {1}.",
110
110
  extensionName,
111
111
  provider.label
112
112
  ))
113
113
  : ( localize(
114
- 4862,
114
+ 4987,
115
115
  "The extension '{0}' wants to sign in using {1}.",
116
116
  extensionName,
117
117
  provider.label
@@ -119,7 +119,7 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
119
119
  }
120
120
  const buttons = [
121
121
  {
122
- label: ( localize(4863, "&&Allow")),
122
+ label: ( localize(4988, "&&Allow")),
123
123
  run() {
124
124
  return true;
125
125
  },
@@ -127,7 +127,7 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
127
127
  ];
128
128
  if (options?.learnMore) {
129
129
  buttons.push({
130
- label: ( localize(4864, "Learn more")),
130
+ label: ( localize(4989, "Learn more")),
131
131
  run: async () => {
132
132
  const result = this.loginPrompt(provider, extensionName, recreatingSession, options);
133
133
  await this.openerService.open(URI.revive(options.learnMore), { allowCommands: true });
@@ -146,9 +146,9 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
146
146
  }
147
147
  async continueWithIncorrectAccountPrompt(chosenAccountLabel, requestedAccountLabel) {
148
148
  const result = await this.dialogService.prompt({
149
- message: ( localize(4865, "Incorrect account detected")),
149
+ message: ( localize(4990, "Incorrect account detected")),
150
150
  detail: ( localize(
151
- 4866,
151
+ 4991,
152
152
  "The chosen account, {0}, does not match the requested account, {1}.",
153
153
  chosenAccountLabel,
154
154
  requestedAccountLabel
@@ -157,11 +157,11 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
157
157
  cancelButton: true,
158
158
  buttons: [
159
159
  {
160
- label: ( localize(4867, 'Keep {0}', chosenAccountLabel)),
160
+ label: ( localize(4992, 'Keep {0}', chosenAccountLabel)),
161
161
  run: () => chosenAccountLabel
162
162
  },
163
163
  {
164
- label: ( localize(4868, 'Login with {0}', requestedAccountLabel)),
164
+ label: ( localize(4993, 'Login with {0}', requestedAccountLabel)),
165
165
  run: () => requestedAccountLabel
166
166
  }
167
167
  ],
@@ -249,7 +249,7 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
249
249
  const session = await this.doGetSession(providerId, scopes, extensionId, extensionName, options);
250
250
  if (session) {
251
251
  this.sendProviderUsageTelemetry(extensionId, providerId);
252
- this.authenticationUsageService.addAccountUsage(providerId, session.account.label, extensionId, extensionName);
252
+ this.authenticationUsageService.addAccountUsage(providerId, session.account.label, scopes, extensionId, extensionName);
253
253
  }
254
254
  return session;
255
255
  }
@@ -46,30 +46,36 @@ CommandsRegistry.registerCommand('_remoteCLI.manageExtensions', async function (
46
46
  lines.push(message);
47
47
  }
48
48
  })();
49
- const cliService = instantiationService.createChild(( (new ServiceCollection([IExtensionManagementService, remoteExtensionManagementService])))).createInstance(RemoteExtensionManagementCLI, logger);
50
- if (args.list) {
51
- await cliService.listExtensions(!!args.list.showVersions, args.list.category, undefined);
52
- }
53
- else {
54
- const revive = (inputs) => ( (inputs.map(input => isString(input) ? input : URI.revive(input))));
55
- if (Array.isArray(args.install) && args.install.length) {
56
- try {
57
- await cliService.installExtensions(revive(args.install), [], { isMachineScoped: true }, !!args.force);
58
- }
59
- catch (e) {
60
- lines.push(e.message);
61
- }
49
+ const childInstantiationService = instantiationService.createChild(( (new ServiceCollection([IExtensionManagementService, remoteExtensionManagementService]))));
50
+ try {
51
+ const cliService = childInstantiationService.createInstance(RemoteExtensionManagementCLI, logger);
52
+ if (args.list) {
53
+ await cliService.listExtensions(!!args.list.showVersions, args.list.category, undefined);
62
54
  }
63
- if (Array.isArray(args.uninstall) && args.uninstall.length) {
64
- try {
65
- await cliService.uninstallExtensions(revive(args.uninstall), !!args.force, undefined);
55
+ else {
56
+ const revive = (inputs) => ( (inputs.map(input => isString(input) ? input : URI.revive(input))));
57
+ if (Array.isArray(args.install) && args.install.length) {
58
+ try {
59
+ await cliService.installExtensions(revive(args.install), [], { isMachineScoped: true }, !!args.force);
60
+ }
61
+ catch (e) {
62
+ lines.push(e.message);
63
+ }
66
64
  }
67
- catch (e) {
68
- lines.push(e.message);
65
+ if (Array.isArray(args.uninstall) && args.uninstall.length) {
66
+ try {
67
+ await cliService.uninstallExtensions(revive(args.uninstall), !!args.force, undefined);
68
+ }
69
+ catch (e) {
70
+ lines.push(e.message);
71
+ }
69
72
  }
70
73
  }
74
+ return lines.join('\n');
75
+ }
76
+ finally {
77
+ childInstantiationService.dispose();
71
78
  }
72
- return lines.join('\n');
73
79
  });
74
80
  let RemoteExtensionManagementCLI = class RemoteExtensionManagementCLI extends ExtensionManagementCLI {
75
81
  constructor(logger, extensionManagementService, extensionGalleryService, labelService, envService, _extensionManifestPropertiesService) {
@@ -85,7 +91,7 @@ let RemoteExtensionManagementCLI = class RemoteExtensionManagementCLI extends Ex
85
91
  if (!this._extensionManifestPropertiesService.canExecuteOnWorkspace(manifest)
86
92
  && !(isWeb && this._extensionManifestPropertiesService.canExecuteOnWeb(manifest))) {
87
93
  this.logger.info(( localize(
88
- 4810,
94
+ 4935,
89
95
  "Cannot install the '{0}' extension because it is declared to not run in this setup.",
90
96
  getExtensionId(manifest.publisher, manifest.name)
91
97
  )));
@@ -12,17 +12,17 @@ import { ILanguageFeaturesService } from 'vscode/vscode/vs/editor/common/service
12
12
  import { ExtensionIdentifier } from 'vscode/vscode/vs/platform/extensions/common/extensions';
13
13
  import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
14
14
  import { ILogService } from 'vscode/vscode/vs/platform/log/common/log.service';
15
- import { ExtHostContext, MainContext } from 'vscode/vscode/vs/workbench/api/common/extHost.protocol';
16
15
  import { IChatWidgetService } from 'vscode/vscode/vs/workbench/contrib/chat/browser/chat.service';
17
- import { ChatInputPart } from 'vscode/vscode/vs/workbench/contrib/chat/browser/chatInputPart';
16
+ import { ChatInputPart } from '@codingame/monaco-vscode-chat-extensions-notebook-common/vscode/vs/workbench/contrib/chat/browser/chatInputPart';
17
+ import { AddDynamicVariableAction } from '@codingame/monaco-vscode-chat-extensions-notebook-common/vscode/vs/workbench/contrib/chat/browser/contrib/chatDynamicVariables';
18
18
  import { ChatAgentLocation } from 'vscode/vscode/vs/workbench/contrib/chat/common/chatAgents';
19
19
  import { IChatAgentService } from 'vscode/vscode/vs/workbench/contrib/chat/common/chatAgents.service';
20
- import { ChatRequestAgentPart } from 'vscode/vscode/vs/workbench/contrib/chat/common/chatParserTypes';
21
- import { ChatRequestParser } from 'vscode/vscode/vs/workbench/contrib/chat/common/chatRequestParser';
20
+ import { ChatRequestAgentPart } from '@codingame/monaco-vscode-chat-extensions-interactive-notebook-quickaccess-search-terminal-common/vscode/vs/workbench/contrib/chat/common/chatParserTypes';
21
+ import { ChatRequestParser } from '@codingame/monaco-vscode-chat-extensions-notebook-common/vscode/vs/workbench/contrib/chat/common/chatRequestParser';
22
22
  import { IChatService } from 'vscode/vscode/vs/workbench/contrib/chat/common/chatService.service';
23
23
  import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
24
24
  import { IExtensionService } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions.service';
25
- import { addDynamicVariableActionId } from 'vscode/vscode/vs/workbench/contrib/chat/browser/contrib/chatDynamicVariablesConstant';
25
+ import { ExtHostContext, MainContext } from 'vscode/vscode/vs/workbench/api/common/extHost.protocol';
26
26
 
27
27
  class MainThreadChatTask {
28
28
  get onDidAddProgress() { return this._onDidAddProgress.event; }
@@ -64,6 +64,7 @@ let MainThreadChatAgents2 = class MainThreadChatAgents2 extends Disposable {
64
64
  this._pendingProgress = ( new Map());
65
65
  this._responsePartHandlePool = 0;
66
66
  this._activeTasks = ( new Map());
67
+ this._unresolvedAnchors = ( new Map());
67
68
  this._proxy = ( extHostContext.getProxy(ExtHostContext.ExtHostChatAgents2));
68
69
  this._register(this._chatService.onDidDisposeSession(e => {
69
70
  this._proxy.$releaseSession(e.sessionId);
@@ -98,7 +99,7 @@ let MainThreadChatAgents2 = class MainThreadChatAgents2 extends Disposable {
98
99
  this._chatService.transferChatSession({ sessionId, inputValue }, URI.revive(toWorkspace));
99
100
  }
100
101
  $registerAgent(handle, extension, id, metadata, dynamicProps) {
101
- const staticAgentRegistration = this._chatAgentService.getAgent(id);
102
+ const staticAgentRegistration = this._chatAgentService.getAgent(id, true);
102
103
  if (!staticAgentRegistration && !dynamicProps) {
103
104
  if (this._chatAgentService.getAgentsByName(id).length) {
104
105
  throw ( new Error(
@@ -148,7 +149,7 @@ let MainThreadChatAgents2 = class MainThreadChatAgents2 extends Disposable {
148
149
  metadata: revive(metadata),
149
150
  slashCommands: [],
150
151
  disambiguation: [],
151
- locations: [ChatAgentLocation.Panel]
152
+ locations: [ChatAgentLocation.Panel],
152
153
  }, impl);
153
154
  }
154
155
  else {
@@ -199,8 +200,25 @@ let MainThreadChatAgents2 = class MainThreadChatAgents2 extends Disposable {
199
200
  return;
200
201
  }
201
202
  }
203
+ if (revivedProgress.kind === 'inlineReference' && revivedProgress.resolveId) {
204
+ if (!( this._unresolvedAnchors.has(requestId))) {
205
+ this._unresolvedAnchors.set(requestId, ( new Map()));
206
+ }
207
+ this._unresolvedAnchors.get(requestId)?.set(revivedProgress.resolveId, revivedProgress);
208
+ }
202
209
  this._pendingProgress.get(requestId)?.(revivedProgress);
203
210
  }
211
+ $handleAnchorResolve(requestId, handle, resolveAnchor) {
212
+ const anchor = this._unresolvedAnchors.get(requestId)?.get(handle);
213
+ if (!anchor) {
214
+ return;
215
+ }
216
+ this._unresolvedAnchors.get(requestId)?.delete(handle);
217
+ if (resolveAnchor) {
218
+ const revivedAnchor = revive(resolveAnchor);
219
+ anchor.inlineReference = revivedAnchor.inlineReference;
220
+ }
221
+ }
204
222
  $registerAgentCompletionsProvider(handle, id, triggerCharacters) {
205
223
  const provide = async (query, token) => {
206
224
  const completions = await this._proxy.$invokeCompletionProvider(handle, query, token);
@@ -247,7 +265,7 @@ let MainThreadChatAgents2 = class MainThreadChatAgents2 extends Disposable {
247
265
  kind: 18 ,
248
266
  detail: v.detail,
249
267
  documentation: v.documentation,
250
- command: { id: addDynamicVariableActionId, title: '', arguments: [{ id: v.id, widget, range: rangeAfterInsert, variableData: revive(v.value), command: v.command }] }
268
+ command: { id: AddDynamicVariableAction.ID, title: '', arguments: [{ id: v.id, widget, range: rangeAfterInsert, variableData: revive(v.value), command: v.command }] }
251
269
  };
252
270
  }));
253
271
  return {