@codingame/monaco-vscode-extensions-service-override 20.5.0 → 21.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/package.json +28 -27
  2. package/vscode/src/vs/platform/extensionManagement/common/extensionManagementCLI.js +28 -28
  3. package/vscode/src/vs/workbench/api/browser/mainThreadAuthentication.d.ts +6 -24
  4. package/vscode/src/vs/workbench/api/browser/mainThreadAuthentication.js +74 -74
  5. package/vscode/src/vs/workbench/api/browser/mainThreadCLICommands.js +1 -1
  6. package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents2.js +2 -4
  7. package/vscode/src/vs/workbench/api/browser/mainThreadChatSessions.d.ts +52 -9
  8. package/vscode/src/vs/workbench/api/browser/mainThreadChatSessions.js +271 -134
  9. package/vscode/src/vs/workbench/api/browser/mainThreadComments.js +2 -2
  10. package/vscode/src/vs/workbench/api/browser/mainThreadCustomEditors.js +4 -4
  11. package/vscode/src/vs/workbench/api/browser/mainThreadDataChannels.d.ts +1 -1
  12. package/vscode/src/vs/workbench/api/browser/mainThreadDataChannels.js +1 -1
  13. package/vscode/src/vs/workbench/api/browser/mainThreadDocumentsAndEditors.js +1 -1
  14. package/vscode/src/vs/workbench/api/browser/mainThreadEditSessionIdentityParticipant.js +1 -1
  15. package/vscode/src/vs/workbench/api/browser/mainThreadEditorTabs.d.ts +1 -1
  16. package/vscode/src/vs/workbench/api/browser/mainThreadEditorTabs.js +2 -2
  17. package/vscode/src/vs/workbench/api/browser/mainThreadEditors.d.ts +1 -1
  18. package/vscode/src/vs/workbench/api/browser/mainThreadEditors.js +1 -1
  19. package/vscode/src/vs/workbench/api/browser/mainThreadExtensionService.js +11 -11
  20. package/vscode/src/vs/workbench/api/browser/mainThreadFileSystemEventService.js +20 -20
  21. package/vscode/src/vs/workbench/api/browser/mainThreadLanguageFeatures.d.ts +4 -2
  22. package/vscode/src/vs/workbench/api/browser/mainThreadLanguageFeatures.js +58 -8
  23. package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModels.d.ts +2 -2
  24. package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModels.js +6 -6
  25. package/vscode/src/vs/workbench/api/browser/mainThreadMcp.js +7 -7
  26. package/vscode/src/vs/workbench/api/browser/mainThreadMessageService.js +4 -4
  27. package/vscode/src/vs/workbench/api/browser/mainThreadNotebook.js +7 -0
  28. package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDocumentsAndEditors.js +1 -1
  29. package/vscode/src/vs/workbench/api/browser/mainThreadNotebookEditors.js +1 -1
  30. package/vscode/src/vs/workbench/api/browser/mainThreadNotebookSaveParticipant.js +2 -2
  31. package/vscode/src/vs/workbench/api/browser/mainThreadOutputService.js +3 -3
  32. package/vscode/src/vs/workbench/api/browser/mainThreadProgress.js +1 -1
  33. package/vscode/src/vs/workbench/api/browser/mainThreadSaveParticipant.js +1 -1
  34. package/vscode/src/vs/workbench/api/browser/mainThreadSearch.js +1 -1
  35. package/vscode/src/vs/workbench/api/browser/mainThreadTask.js +1 -1
  36. package/vscode/src/vs/workbench/api/browser/mainThreadTerminalService.js +3 -2
  37. package/vscode/src/vs/workbench/api/browser/mainThreadTunnelService.js +2 -2
  38. package/vscode/src/vs/workbench/api/browser/mainThreadUriOpeners.js +2 -2
  39. package/vscode/src/vs/workbench/api/browser/mainThreadWebviewPanels.js +1 -1
  40. package/vscode/src/vs/workbench/api/browser/mainThreadWebviews.js +1 -1
  41. package/vscode/src/vs/workbench/api/browser/mainThreadWorkspace.js +5 -5
  42. package/vscode/src/vs/workbench/contrib/customEditor/common/customTextEditorModel.js +1 -1
  43. package/vscode/src/vs/workbench/contrib/externalUriOpener/common/contributedOpeners.js +1 -1
  44. package/vscode/src/vs/workbench/services/extensionManagement/browser/extensionBisect.js +23 -23
  45. package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.js +12 -12
  46. package/vscode/src/vs/workbench/services/extensions/common/extensionHostManager.js +1 -1
  47. package/vscode/src/vs/workbench/services/extensions/common/extensionsProposedApi.js +1 -1
  48. package/vscode/src/vs/workbench/services/extensions/common/extensionsUtil.js +4 -4
  49. package/vscode/src/vs/workbench/contrib/editTelemetry/browser/telemetry/forwardingTelemetryService.d.ts +0 -30
  50. package/vscode/src/vs/workbench/contrib/editTelemetry/browser/telemetry/forwardingTelemetryService.js +0 -67
@@ -3,18 +3,16 @@ import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib
3
3
  import { Disposable, DisposableMap } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
4
4
  import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
5
5
  import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
6
+ import { isAuthenticationWWWAuthenticateRequest } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/authentication/common/authentication';
6
7
  import { IAuthenticationService, IAuthenticationExtensionsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/authentication/common/authentication.service';
7
8
  import { ExtHostContext, MainContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol';
8
9
  import { IDialogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service';
9
10
  import Severity from '@codingame/monaco-vscode-api/vscode/vs/base/common/severity';
10
11
  import { INotificationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/notification/common/notification.service';
11
- import { ActivationKind } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions';
12
- import { IExtensionService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions.service';
13
12
  import { ITelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service';
14
13
  import { Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
15
14
  import { IAuthenticationAccessService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/authentication/browser/authenticationAccessService.service';
16
15
  import { IAuthenticationUsageService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/authentication/browser/authenticationUsageService.service';
17
- import { getAuthenticationProviderActivationEvent } from '@codingame/monaco-vscode-f22e7e55-aee8-5b52-a6bc-950efd9f5890-common/vscode/vs/workbench/services/authentication/browser/authenticationService';
18
16
  import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
19
17
  import { IOpenerService } from '@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service';
20
18
  import { CancellationError } from '@codingame/monaco-vscode-api/vscode/vs/base/common/errors';
@@ -46,8 +44,19 @@ class MainThreadAuthenticationProvider extends Disposable {
46
44
  await this._proxy.$removeSession(this.id, sessionId);
47
45
  }
48
46
  }
47
+ class MainThreadAuthenticationProviderWithChallenges extends MainThreadAuthenticationProvider {
48
+ constructor(proxy, id, label, supportsMultipleAccounts, authorizationServers, onDidChangeSessionsEmitter) {
49
+ super(proxy, id, label, supportsMultipleAccounts, authorizationServers, onDidChangeSessionsEmitter);
50
+ }
51
+ getSessionsFromChallenges(constraint, options) {
52
+ return this._proxy.$getSessionsFromChallenges(this.id, constraint, options);
53
+ }
54
+ createSessionFromChallenges(constraint, options) {
55
+ return this._proxy.$createSessionFromChallenges(this.id, constraint, options);
56
+ }
57
+ }
49
58
  let MainThreadAuthentication = class MainThreadAuthentication extends Disposable {
50
- constructor(extHostContext, authenticationService, authenticationExtensionsService, authenticationAccessService, authenticationUsageService, dialogService, notificationService, extensionService, telemetryService, openerService, logService, urlService, dynamicAuthProviderStorageService, clipboardService, quickInputService) {
59
+ constructor(extHostContext, authenticationService, authenticationExtensionsService, authenticationAccessService, authenticationUsageService, dialogService, notificationService, telemetryService, openerService, logService, urlService, dynamicAuthProviderStorageService, clipboardService, quickInputService) {
51
60
  super();
52
61
  this.authenticationService = authenticationService;
53
62
  this.authenticationExtensionsService = authenticationExtensionsService;
@@ -55,7 +64,6 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
55
64
  this.authenticationUsageService = authenticationUsageService;
56
65
  this.dialogService = dialogService;
57
66
  this.notificationService = notificationService;
58
- this.extensionService = extensionService;
59
67
  this.telemetryService = telemetryService;
60
68
  this.openerService = openerService;
61
69
  this.logService = logService;
@@ -96,7 +104,7 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
96
104
  }
97
105
  }));
98
106
  }
99
- async $registerAuthenticationProvider(id, label, supportsMultipleAccounts, supportedAuthorizationServer = []) {
107
+ async $registerAuthenticationProvider(id, label, supportsMultipleAccounts, supportedAuthorizationServer = [], supportsChallenges) {
100
108
  if (!this.authenticationService.declaredProviders.find(p => p.id === id)) {
101
109
  this.logService.warn(`Authentication provider ${id} was not declared in the Extension Manifest.`);
102
110
  this.telemetryService.publicLog2('authentication.providerNotDeclared', { id });
@@ -104,7 +112,16 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
104
112
  const emitter = ( new Emitter());
105
113
  this._registrations.set(id, emitter);
106
114
  const supportedAuthorizationServerUris = ( supportedAuthorizationServer.map(i => URI.revive(i)));
107
- const provider = ( new MainThreadAuthenticationProvider(
115
+ const provider = supportsChallenges
116
+ ? ( new MainThreadAuthenticationProviderWithChallenges(
117
+ this._proxy,
118
+ id,
119
+ label,
120
+ supportsMultipleAccounts,
121
+ supportedAuthorizationServerUris,
122
+ emitter
123
+ ))
124
+ : ( new MainThreadAuthenticationProvider(
108
125
  this._proxy,
109
126
  id,
110
127
  label,
@@ -124,11 +141,6 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
124
141
  this._suppressUnregisterEvent = false;
125
142
  }
126
143
  }
127
- async $ensureProvider(id) {
128
- if (!this.authenticationService.isAuthenticationProviderRegistered(id)) {
129
- return await this.extensionService.activateByEvent(getAuthenticationProviderActivationEvent(id), ActivationKind.Immediate);
130
- }
131
- }
132
144
  async $sendDidChangeSessions(providerId, event) {
133
145
  const obj = this._registrations.get(providerId);
134
146
  if (obj instanceof Emitter) {
@@ -157,8 +169,8 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
157
169
  return await deferredPromise.p;
158
170
  }
159
171
  $showContinueNotification(message) {
160
- const yes = ( localize(2420, "Yes"));
161
- const no = ( localize(2421, "No"));
172
+ const yes = ( localize(2424, "Yes"));
173
+ const no = ( localize(2425, "No"));
162
174
  const deferredPromise = ( new DeferredPromise());
163
175
  let result = false;
164
176
  const handle = this.notificationService.prompt(Severity.Warning, message, [{
@@ -200,13 +212,13 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
200
212
  else {
201
213
  message = recreatingSession
202
214
  ? ( localize(
203
- 2422,
215
+ 2426,
204
216
  "The extension '{0}' wants you to sign in again using {1}.",
205
217
  extensionName,
206
218
  provider.label
207
219
  ))
208
220
  : ( localize(
209
- 2423,
221
+ 2427,
210
222
  "The extension '{0}' wants to sign in using {1}.",
211
223
  extensionName,
212
224
  provider.label
@@ -214,7 +226,7 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
214
226
  }
215
227
  const buttons = [
216
228
  {
217
- label: ( localize(2424, "&&Allow")),
229
+ label: ( localize(2428, "&&Allow")),
218
230
  run() {
219
231
  return true;
220
232
  },
@@ -222,7 +234,7 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
222
234
  ];
223
235
  if (options?.learnMore) {
224
236
  buttons.push({
225
- label: ( localize(2425, "Learn more")),
237
+ label: ( localize(2429, "Learn more")),
226
238
  run: async () => {
227
239
  const result = this.loginPrompt(provider, extensionName, recreatingSession, options);
228
240
  await this.openerService.open(URI.revive(options.learnMore), { allowCommands: true });
@@ -241,9 +253,9 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
241
253
  }
242
254
  async continueWithIncorrectAccountPrompt(chosenAccountLabel, requestedAccountLabel) {
243
255
  const result = await this.dialogService.prompt({
244
- message: ( localize(2426, "Incorrect account detected")),
256
+ message: ( localize(2430, "Incorrect account detected")),
245
257
  detail: ( localize(
246
- 2427,
258
+ 2431,
247
259
  "The chosen account, {0}, does not match the requested account, {1}.",
248
260
  chosenAccountLabel,
249
261
  requestedAccountLabel
@@ -252,11 +264,11 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
252
264
  cancelButton: true,
253
265
  buttons: [
254
266
  {
255
- label: ( localize(2428, 'Keep {0}', chosenAccountLabel)),
267
+ label: ( localize(2432, 'Keep {0}', chosenAccountLabel)),
256
268
  run: () => chosenAccountLabel
257
269
  },
258
270
  {
259
- label: ( localize(2429, 'Login with {0}', requestedAccountLabel)),
271
+ label: ( localize(2433, 'Login with {0}', requestedAccountLabel)),
260
272
  run: () => requestedAccountLabel
261
273
  }
262
274
  ],
@@ -266,9 +278,9 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
266
278
  }
267
279
  return result.result === chosenAccountLabel;
268
280
  }
269
- async doGetSession(providerId, scopes, extensionId, extensionName, options) {
281
+ async doGetSession(providerId, scopeListOrRequest, extensionId, extensionName, options) {
270
282
  const authorizationServer = URI.revive(options.authorizationServer);
271
- const sessions = await this.authenticationService.getSessions(providerId, scopes, { account: options.account, authorizationServer }, true);
283
+ const sessions = await this.authenticationService.getSessions(providerId, scopeListOrRequest, { account: options.account, authorizationServer }, true);
272
284
  const provider = this.authenticationService.getProvider(providerId);
273
285
  if (options.forceNewSession && options.createIfNone) {
274
286
  throw ( new Error(
@@ -286,12 +298,12 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
286
298
  ));
287
299
  }
288
300
  if (options.clearSessionPreference) {
289
- this._removeAccountPreference(extensionId, providerId, scopes);
301
+ this.authenticationExtensionsService.removeAccountPreference(extensionId, providerId);
290
302
  }
291
303
  const matchingAccountPreferenceSession =
292
304
  options.account
293
305
  ? sessions[0]
294
- : this._getAccountPreference(extensionId, providerId, scopes, sessions);
306
+ : this._getAccountPreference(extensionId, providerId, sessions);
295
307
  if (!options.forceNewSession && sessions.length) {
296
308
  if (matchingAccountPreferenceSession && this.authenticationAccessService.isAccessAllowed(providerId, matchingAccountPreferenceSession.account.label, extensionId)) {
297
309
  return matchingAccountPreferenceSession;
@@ -316,13 +328,13 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
316
328
  let session;
317
329
  if (sessions?.length && !options.forceNewSession) {
318
330
  session = provider.supportsMultipleAccounts && !options.account
319
- ? await this.authenticationExtensionsService.selectSession(providerId, extensionId, extensionName, scopes, sessions)
331
+ ? await this.authenticationExtensionsService.selectSession(providerId, extensionId, extensionName, scopeListOrRequest, sessions)
320
332
  : sessions[0];
321
333
  }
322
334
  else {
323
335
  const accountToCreate = options.account ?? matchingAccountPreferenceSession?.account;
324
336
  do {
325
- session = await this.authenticationService.createSession(providerId, scopes, {
337
+ session = await this.authenticationService.createSession(providerId, scopeListOrRequest, {
326
338
  activateImmediate: true,
327
339
  account: accountToCreate,
328
340
  authorizationServer
@@ -332,7 +344,8 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
332
344
  && !(await this.continueWithIncorrectAccountPrompt(session.account.label, accountToCreate.label)));
333
345
  }
334
346
  this.authenticationAccessService.updateAllowedExtensions(providerId, session.account.label, [{ id: extensionId, name: extensionName, allowed: true }]);
335
- this._updateAccountPreference(extensionId, providerId, session);
347
+ this.authenticationExtensionsService.updateNewSessionRequests(providerId, [session]);
348
+ this.authenticationExtensionsService.updateAccountPreference(extensionId, providerId, session.account);
336
349
  return session;
337
350
  }
338
351
  if (!matchingAccountPreferenceSession && !this.authenticationExtensionsService.getAccountPreference(extensionId, providerId)) {
@@ -343,16 +356,20 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
343
356
  }
344
357
  if (!options.silent) {
345
358
  sessions.length
346
- ? this.authenticationExtensionsService.requestSessionAccess(providerId, extensionId, extensionName, scopes, sessions)
347
- : await this.authenticationExtensionsService.requestNewSession(providerId, scopes, extensionId, extensionName);
359
+ ? this.authenticationExtensionsService.requestSessionAccess(providerId, extensionId, extensionName, scopeListOrRequest, sessions)
360
+ : await this.authenticationExtensionsService.requestNewSession(providerId, scopeListOrRequest, extensionId, extensionName);
348
361
  }
349
362
  return undefined;
350
363
  }
351
- async $getSession(providerId, scopes, extensionId, extensionName, options) {
352
- this.sendClientIdUsageTelemetry(extensionId, providerId, scopes);
353
- const session = await this.doGetSession(providerId, scopes, extensionId, extensionName, options);
364
+ async $getSession(providerId, scopeListOrRequest, extensionId, extensionName, options) {
365
+ const scopes = isAuthenticationWWWAuthenticateRequest(scopeListOrRequest) ? scopeListOrRequest.scopes : scopeListOrRequest;
366
+ if (scopes) {
367
+ this.sendClientIdUsageTelemetry(extensionId, providerId, scopes);
368
+ }
369
+ const session = await this.doGetSession(providerId, scopeListOrRequest, extensionId, extensionName, options);
354
370
  if (session) {
355
371
  this.sendProviderUsageTelemetry(extensionId, providerId);
372
+ const scopes = isAuthenticationWWWAuthenticateRequest(scopeListOrRequest) ? scopeListOrRequest.scopes : scopeListOrRequest;
356
373
  this.authenticationUsageService.addAccountUsage(providerId, session.account.label, scopes, extensionId, extensionName);
357
374
  }
358
375
  return session;
@@ -380,7 +397,7 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
380
397
  this._sentProviderUsageEvents.add(key);
381
398
  this.telemetryService.publicLog2('authentication.providerUsage', { providerId, extensionId });
382
399
  }
383
- _getAccountPreference(extensionId, providerId, scopes, sessions) {
400
+ _getAccountPreference(extensionId, providerId, sessions) {
384
401
  if (sessions.length === 0) {
385
402
  return undefined;
386
403
  }
@@ -389,37 +406,21 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
389
406
  const session = sessions.find(session => session.account.label === accountNamePreference);
390
407
  return session;
391
408
  }
392
- const sessionIdPreference = this.authenticationExtensionsService.getSessionPreference(providerId, extensionId, scopes);
393
- if (sessionIdPreference) {
394
- const session = sessions.find(session => session.id === sessionIdPreference);
395
- if (session) {
396
- this.authenticationExtensionsService.updateAccountPreference(extensionId, providerId, session.account);
397
- return session;
398
- }
399
- }
400
409
  return undefined;
401
410
  }
402
- _updateAccountPreference(extensionId, providerId, session) {
403
- this.authenticationExtensionsService.updateAccountPreference(extensionId, providerId, session.account);
404
- this.authenticationExtensionsService.updateSessionPreference(providerId, extensionId, session);
405
- }
406
- _removeAccountPreference(extensionId, providerId, scopes) {
407
- this.authenticationExtensionsService.removeAccountPreference(extensionId, providerId);
408
- this.authenticationExtensionsService.removeSessionPreference(providerId, extensionId, scopes);
409
- }
410
411
  async $showDeviceCodeModal(userCode, verificationUri) {
411
412
  const { result } = await this.dialogService.prompt({
412
413
  type: Severity.Info,
413
- message: ( localize(2430, "Device Code Authentication")),
414
+ message: ( localize(2434, "Device Code Authentication")),
414
415
  detail: ( localize(
415
- 2431,
416
+ 2435,
416
417
  "Your code: {0}\n\nTo complete authentication, navigate to {1} and enter the code above.",
417
418
  userCode,
418
419
  verificationUri
419
420
  )),
420
421
  buttons: [
421
422
  {
422
- label: ( localize(2432, "Copy & Continue")),
423
+ label: ( localize(2436, "Copy & Continue")),
423
424
  run: () => true
424
425
  }
425
426
  ],
@@ -431,7 +432,7 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
431
432
  return await this.openerService.open(( URI.parse(verificationUri)));
432
433
  }
433
434
  catch (error) {
434
- this.notificationService.error(( localize(2433, "Failed to open {0}", verificationUri)));
435
+ this.notificationService.error(( localize(2437, "Failed to open {0}", verificationUri)));
435
436
  }
436
437
  }
437
438
  return false;
@@ -439,38 +440,38 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
439
440
  async $promptForClientRegistration(authorizationServerUrl) {
440
441
  const result = await this.dialogService.prompt({
441
442
  type: Severity.Info,
442
- message: ( localize(2434, "Dynamic Client Registration not supported")),
443
+ message: ( localize(2438, "Dynamic Client Registration not supported")),
443
444
  detail: ( localize(
444
- 2435,
445
+ 2439,
445
446
  "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:\nhttp://127.0.0.1:33418\nhttps://vscode.dev/redirect",
446
447
  authorizationServerUrl
447
448
  )),
448
449
  buttons: [
449
450
  {
450
- label: ( localize(2436, "Proceed")),
451
+ label: ( localize(2440, "Proceed")),
451
452
  run: () => true
452
453
  }
453
454
  ],
454
455
  cancelButton: {
455
- label: ( localize(2437, "Cancel")),
456
+ label: ( localize(2441, "Cancel")),
456
457
  run: () => false
457
458
  }
458
459
  });
459
460
  if (!result) {
460
461
  return undefined;
461
462
  }
462
- const sharedTitle = ( localize(2438, "Add Client Registration Details"));
463
+ const sharedTitle = ( localize(2442, "Add Client Registration Details"));
463
464
  const clientId = await this.quickInputService.input({
464
465
  title: sharedTitle,
465
466
  prompt: ( localize(
466
- 2439,
467
+ 2443,
467
468
  "Enter an existing client ID that has been registered with the following redirect URIs: http://127.0.0.1:33418, https://vscode.dev/redirect"
468
469
  )),
469
- placeHolder: ( localize(2440, "OAuth client ID (azye39d...)")),
470
+ placeHolder: ( localize(2444, "OAuth client ID (azye39d...)")),
470
471
  ignoreFocusLost: true,
471
472
  validateInput: async (value) => {
472
473
  if (!value || value.trim().length === 0) {
473
- return localize(2441, "Client ID is required");
474
+ return localize(2445, "Client ID is required");
474
475
  }
475
476
  return undefined;
476
477
  }
@@ -481,11 +482,11 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
481
482
  const clientSecret = await this.quickInputService.input({
482
483
  title: sharedTitle,
483
484
  prompt: ( localize(
484
- 2442,
485
+ 2446,
485
486
  "(optional) Enter an existing client secret associated with the client id '{0}' or leave this field blank",
486
487
  clientId
487
488
  )),
488
- placeHolder: ( localize(2443, "OAuth client secret (wer32o50f...) or leave it blank")),
489
+ placeHolder: ( localize(2447, "OAuth client secret (wer32o50f...) or leave it blank")),
489
490
  password: true,
490
491
  ignoreFocusLost: true
491
492
  });
@@ -503,14 +504,13 @@ MainThreadAuthentication = __decorate([
503
504
  ( __param(4, IAuthenticationUsageService)),
504
505
  ( __param(5, IDialogService)),
505
506
  ( __param(6, INotificationService)),
506
- ( __param(7, IExtensionService)),
507
- ( __param(8, ITelemetryService)),
508
- ( __param(9, IOpenerService)),
509
- ( __param(10, ILogService)),
510
- ( __param(11, IURLService)),
511
- ( __param(12, IDynamicAuthenticationProviderStorageService)),
512
- ( __param(13, IClipboardService)),
513
- ( __param(14, IQuickInputService))
507
+ ( __param(7, ITelemetryService)),
508
+ ( __param(8, IOpenerService)),
509
+ ( __param(9, ILogService)),
510
+ ( __param(10, IURLService)),
511
+ ( __param(11, IDynamicAuthenticationProviderStorageService)),
512
+ ( __param(12, IClipboardService)),
513
+ ( __param(13, IQuickInputService))
514
514
  ], MainThreadAuthentication);
515
515
 
516
- export { MainThreadAuthentication, MainThreadAuthenticationProvider };
516
+ export { MainThreadAuthentication };
@@ -92,7 +92,7 @@ let RemoteExtensionManagementCLI = class RemoteExtensionManagementCLI extends Ex
92
92
  if (!this._extensionManifestPropertiesService.canExecuteOnWorkspace(manifest)
93
93
  && !(isWeb && this._extensionManifestPropertiesService.canExecuteOnWeb(manifest))) {
94
94
  this.logger.info(( localize(
95
- 2444,
95
+ 2448,
96
96
  "Cannot install the '{0}' extension because it is declared to not run in this setup.",
97
97
  getExtensionId(manifest.publisher, manifest.name)
98
98
  )));
@@ -27,7 +27,7 @@ import { extHostNamedCustomer } from '../../services/extensions/common/extHostCu
27
27
  import { IExtensionService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions.service';
28
28
  import { ExtHostContext, MainContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol';
29
29
  import { NotebookDto } from './mainThreadNotebookDto.js';
30
- import { addDynamicVariableActionId } from '@codingame/monaco-vscode-6f931a91-88ea-5232-897f-a17ec3929ba5-common/vscode/vs/workbench/contrib/chat/browser/contrib/chatDynamicVariablesConstant';
30
+ import { addDynamicVariableActionId } from '@codingame/monaco-vscode-bba55be6-41a2-50cd-a3cc-8bafa35bfa89-common/vscode/vs/workbench/contrib/chat/browser/contrib/chatDynamicVariablesConstant';
31
31
 
32
32
  class MainThreadChatTask {
33
33
  get onDidAddProgress() { return this._onDidAddProgress.event; }
@@ -138,9 +138,6 @@ let MainThreadChatAgents2 = class MainThreadChatAgents2 extends Disposable {
138
138
  setRequestTools: (requestId, tools) => {
139
139
  this._proxy.$setRequestTools(requestId, tools);
140
140
  },
141
- setRequestPaused: (requestId, isPaused) => {
142
- this._proxy.$setRequestPaused(handle, requestId, isPaused);
143
- },
144
141
  provideFollowups: async (request, result, history, token) => {
145
142
  if (!this._agents.get(handle)?.hasFollowups) {
146
143
  return [];
@@ -162,6 +159,7 @@ let MainThreadChatAgents2 = class MainThreadChatAgents2 extends Disposable {
162
159
  name: dynamicProps.name,
163
160
  description: dynamicProps.description,
164
161
  extensionId: extension,
162
+ extensionVersion: extensionDescription?.version,
165
163
  extensionDisplayName: extensionDescription?.displayName ?? extension.value,
166
164
  extensionPublisherId: extensionDescription?.publisher ?? '',
167
165
  publisherDisplayName: dynamicProps.publisherName,
@@ -1,14 +1,57 @@
1
+ import { CancellationToken } from "@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation";
1
2
  import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
3
+ import { IObservable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/observable";
2
4
  import { IDialogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service";
3
5
  import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
4
- import { IChatContentInlineReference } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService";
6
+ import { IChatAgentRequest } from "@codingame/monaco-vscode-b994942c-360d-5b68-8a33-77d4bde6b714-common/vscode/vs/workbench/contrib/chat/common/chatAgents";
7
+ import { IChatContentInlineReference, IChatProgress } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService";
8
+ import { ChatSession, IChatSessionHistoryItem } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService";
5
9
  import { IChatSessionsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService.service";
6
- import { EditorGroupColumn } from "@codingame/monaco-vscode-a17e9d37-b6c1-5556-8402-5db73960fae3-common/vscode/vs/workbench/services/editor/common/editorGroupColumn";
10
+ import { EditorGroupColumn } from "@codingame/monaco-vscode-5e2c24a1-3217-55e8-bc90-521eaf7df5a6-common/vscode/vs/workbench/services/editor/common/editorGroupColumn";
7
11
  import { IEditorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service";
8
12
  import { IExtHostContext } from "../../services/extensions/common/extHostCustomers.js";
9
13
  import { Dto } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/proxyIdentifier";
10
14
  import { IViewsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/views/common/viewsService.service";
11
- import { IChatProgressDto, MainThreadChatSessionsShape } from "@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol";
15
+ import { ExtHostChatSessionsShape, IChatProgressDto, MainThreadChatSessionsShape } from "@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol";
16
+ export declare class ObservableChatSession extends Disposable implements ChatSession {
17
+ static generateSessionKey(providerHandle: number, sessionId: string): string;
18
+ readonly sessionId: string;
19
+ readonly providerHandle: number;
20
+ readonly history: Array<IChatSessionHistoryItem>;
21
+ private readonly _progressObservable;
22
+ private readonly _isCompleteObservable;
23
+ private readonly _onWillDispose;
24
+ readonly onWillDispose: import("@codingame/monaco-vscode-api/vscode/vs/base/common/event").Event<void>;
25
+ private readonly _pendingProgressChunks;
26
+ private _isInitialized;
27
+ private _interruptionWasCanceled;
28
+ private _disposalPending;
29
+ private _initializationPromise?;
30
+ interruptActiveResponseCallback?: () => Promise<boolean>;
31
+ requestHandler?: (request: IChatAgentRequest, progress: (progress: IChatProgress[]) => void, history: any[], token: CancellationToken) => Promise<void>;
32
+ private readonly _proxy;
33
+ private readonly _providerHandle;
34
+ private readonly _logService;
35
+ private readonly _dialogService;
36
+ get sessionKey(): string;
37
+ get progressObs(): IObservable<IChatProgress[]>;
38
+ get isCompleteObs(): IObservable<boolean>;
39
+ constructor(id: string, providerHandle: number, proxy: ExtHostChatSessionsShape, logService: ILogService, dialogService: IDialogService);
40
+ initialize(token: CancellationToken): Promise<void>;
41
+ private _doInitializeContent;
42
+ /**
43
+ * Handle progress chunks coming from the extension host.
44
+ * If the session is not initialized yet, the chunks will be queued.
45
+ */
46
+ handleProgressChunk(requestId: string, progress: IChatProgress[]): void;
47
+ /**
48
+ * Handle progress completion from the extension host.
49
+ */
50
+ handleProgressComplete(requestId: string): void;
51
+ private _addProgress;
52
+ private _markComplete;
53
+ dispose(): void;
54
+ }
12
55
  export declare class MainThreadChatSessions extends Disposable implements MainThreadChatSessionsShape {
13
56
  private readonly _extHostContext;
14
57
  private readonly _chatSessionsService;
@@ -17,15 +60,15 @@ export declare class MainThreadChatSessions extends Disposable implements MainTh
17
60
  private readonly _logService;
18
61
  private readonly _viewsService;
19
62
  private readonly _itemProvidersRegistrations;
20
- private readonly _contentProvidersRegisterations;
21
- private readonly _activeProgressEmitters;
22
- private readonly _completionEmitters;
23
- private readonly _pendingProgressChunks;
63
+ private readonly _contentProvidersRegistrations;
64
+ private readonly _activeSessions;
65
+ private readonly _sessionDisposables;
24
66
  private readonly _proxy;
25
67
  constructor(_extHostContext: IExtHostContext, _chatSessionsService: IChatSessionsService, _dialogService: IDialogService, _editorService: IEditorService, _logService: ILogService, _viewsService: IViewsService);
26
68
  $registerChatSessionItemProvider(handle: number, chatSessionType: string): void;
27
- $onDidChangeChatSessionItems(chatSessionType: string): void;
69
+ $onDidChangeChatSessionItems(handle: number): void;
28
70
  private _provideChatSessionItems;
71
+ private _provideNewChatSessionItem;
29
72
  private _provideChatSessionContent;
30
73
  $unregisterChatSessionItemProvider(handle: number): void;
31
74
  $registerChatSessionContentProvider(handle: number, chatSessionType: string): void;
@@ -37,6 +80,6 @@ export declare class MainThreadChatSessions extends Disposable implements MainTh
37
80
  $handleProgressComplete(handle: number, sessionId: string, requestId: string): void;
38
81
  $handleAnchorResolve(handle: number, sessionId: string, requestId: string, requestHandle: string, anchor: Dto<IChatContentInlineReference>): void;
39
82
  dispose(): void;
40
- private _reviveIconPath;
83
+ private _reviveTooltip;
41
84
  $showChatSession(chatSessionType: string, sessionId: string, position: EditorGroupColumn | undefined): Promise<void>;
42
85
  }