@codingame/monaco-vscode-extensions-service-override 37.6.0 → 38.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.
- package/package.json +3 -3
- package/service-override/tools/missingMainThreadCustomers.js +4 -0
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagementCLI.js +29 -29
- package/vscode/src/vs/workbench/api/browser/mainThreadAuthentication.d.ts +3 -19
- package/vscode/src/vs/workbench/api/browser/mainThreadAuthentication.js +133 -75
- package/vscode/src/vs/workbench/api/browser/mainThreadCLICommands.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadComments.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadCustomEditors.d.ts +13 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadCustomEditors.js +108 -14
- package/vscode/src/vs/workbench/api/browser/mainThreadCustomTextEditorNavigation.d.ts +29 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadCustomTextEditorNavigation.js +94 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDataChannels.js +6 -6
- package/vscode/src/vs/workbench/api/browser/mainThreadDebugService.js +8 -16
- package/vscode/src/vs/workbench/api/browser/mainThreadDocumentsAndEditors.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadDocumentsAndEditors.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadEditSessionIdentityParticipant.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadEditorTabs.js +3 -5
- package/vscode/src/vs/workbench/api/browser/mainThreadExtensionService.js +11 -11
- package/vscode/src/vs/workbench/api/browser/mainThreadFileSystemEventService.js +22 -20
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageFeatures.js +10 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadMessageService.js +13 -7
- package/vscode/src/vs/workbench/api/browser/mainThreadOutputService.js +3 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadProgress.d.ts +3 -4
- package/vscode/src/vs/workbench/api/browser/mainThreadProgress.js +13 -6
- package/vscode/src/vs/workbench/api/browser/mainThreadSCM.js +7 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadSaveParticipant.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadShare.d.ts +0 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadShare.js +4 -9
- package/vscode/src/vs/workbench/api/browser/mainThreadTask.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadTerminalService.js +6 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadTerminalShellIntegration.js +13 -18
- package/vscode/src/vs/workbench/api/browser/mainThreadTunnelService.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadUriOpeners.js +4 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviews.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadWorkspace.js +5 -5
- package/vscode/src/vs/workbench/contrib/customEditor/common/customTextEditorModel.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/customEditor/common/customTextEditorModel.js +4 -1
- package/vscode/src/vs/workbench/services/extensionManagement/browser/extensionBisect.js +23 -23
- package/vscode/src/vs/workbench/services/extensionManagement/browser/webExtensionsScannerService.js +2 -2
- package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.js +19 -13
- package/vscode/src/vs/workbench/services/extensions/common/extensionHostManager.js +1 -1
- package/vscode/src/vs/workbench/services/extensions/common/extensionsProposedApi.js +1 -1
- package/vscode/src/vs/workbench/services/extensions/common/extensionsUtil.js +4 -4
- package/vscode/src/vs/workbench/services/themes/browser/cssExtensionPoint.js +5 -5
|
@@ -3,12 +3,13 @@ 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 '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extHostCustomers';
|
|
6
|
-
import { getDynamicAuthenticationProviderId, isAuthenticationWwwAuthenticateRequest } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/authentication/common/authentication';
|
|
6
|
+
import { withoutWorkbenchOnlySessionOptions, getDynamicAuthenticationProviderId, isAuthenticationWwwAuthenticateRequest } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/authentication/common/authentication';
|
|
7
7
|
import { IAuthenticationService, IAuthenticationExtensionsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/authentication/common/authentication.service';
|
|
8
8
|
import { ExtHostContext, MainContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol';
|
|
9
9
|
import { IDialogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service';
|
|
10
10
|
import Severity from '@codingame/monaco-vscode-api/vscode/vs/base/common/severity';
|
|
11
11
|
import { INotificationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/notification/common/notification.service';
|
|
12
|
+
import { NotificationActionTelemetryId, NotificationTelemetryId } from '@codingame/monaco-vscode-api/vscode/vs/platform/notification/common/notificationTelemetry';
|
|
12
13
|
import { ActivationKind } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions';
|
|
13
14
|
import { IExtensionService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions.service';
|
|
14
15
|
import { ITelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service';
|
|
@@ -33,13 +34,53 @@ import { IProductService } from '@codingame/monaco-vscode-api/vscode/vs/platform
|
|
|
33
34
|
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
34
35
|
import { mcpEnterpriseManagedAuthIdpSection } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/common/mcpConfiguration';
|
|
35
36
|
|
|
36
|
-
function
|
|
37
|
+
function reviveAuthenticationSession(session) {
|
|
37
38
|
return {
|
|
38
39
|
...session,
|
|
39
40
|
account: {
|
|
40
41
|
...session.account,
|
|
41
42
|
icon: URI.revive(session.account.icon)
|
|
42
|
-
}
|
|
43
|
+
},
|
|
44
|
+
authorizationServer: URI.revive(session.authorizationServer)
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
function prepareSessionRequest(options) {
|
|
48
|
+
const {
|
|
49
|
+
clearSessionPreference,
|
|
50
|
+
createIfNone,
|
|
51
|
+
forceNewSession,
|
|
52
|
+
silent,
|
|
53
|
+
...requestOptions
|
|
54
|
+
} = withoutWorkbenchOnlySessionOptions(options);
|
|
55
|
+
if (forceNewSession && createIfNone) {
|
|
56
|
+
throw ( new Error(
|
|
57
|
+
"Invalid combination of options. Please remove one of the following: forceNewSession, createIfNone"
|
|
58
|
+
));
|
|
59
|
+
}
|
|
60
|
+
if (forceNewSession && silent) {
|
|
61
|
+
throw ( new Error(
|
|
62
|
+
"Invalid combination of options. Please remove one of the following: forceNewSession, silent"
|
|
63
|
+
));
|
|
64
|
+
}
|
|
65
|
+
if (createIfNone && silent) {
|
|
66
|
+
throw ( new Error(
|
|
67
|
+
"Invalid combination of options. Please remove one of the following: createIfNone, silent"
|
|
68
|
+
));
|
|
69
|
+
}
|
|
70
|
+
const providerOptions = {
|
|
71
|
+
...requestOptions,
|
|
72
|
+
account: requestOptions.account && {
|
|
73
|
+
...requestOptions.account,
|
|
74
|
+
icon: URI.revive(requestOptions.account.icon)
|
|
75
|
+
},
|
|
76
|
+
authorizationServer: URI.revive(requestOptions.authorizationServer)
|
|
77
|
+
};
|
|
78
|
+
return {
|
|
79
|
+
clearSessionPreference,
|
|
80
|
+
createIfNone,
|
|
81
|
+
forceNewSession,
|
|
82
|
+
silent,
|
|
83
|
+
providerOptions
|
|
43
84
|
};
|
|
44
85
|
}
|
|
45
86
|
class MainThreadAuthenticationProvider extends Disposable {
|
|
@@ -63,10 +104,10 @@ class MainThreadAuthenticationProvider extends Disposable {
|
|
|
63
104
|
}
|
|
64
105
|
async getSessions(scopes, options) {
|
|
65
106
|
const sessions = await this._proxy.$getSessions(this.id, scopes, options);
|
|
66
|
-
return sessions.map(
|
|
107
|
+
return sessions.map(reviveAuthenticationSession);
|
|
67
108
|
}
|
|
68
109
|
async createSession(scopes, options) {
|
|
69
|
-
return
|
|
110
|
+
return reviveAuthenticationSession(await this._proxy.$createSession(this.id, scopes, options));
|
|
70
111
|
}
|
|
71
112
|
async removeSession(sessionId) {
|
|
72
113
|
await this._proxy.$removeSession(this.id, sessionId);
|
|
@@ -94,10 +135,10 @@ class MainThreadAuthenticationProviderWithChallenges extends MainThreadAuthentic
|
|
|
94
135
|
}
|
|
95
136
|
async getSessionsFromChallenges(constraint, options) {
|
|
96
137
|
const sessions = await this._proxy.$getSessionsFromChallenges(this.id, constraint, options);
|
|
97
|
-
return sessions.map(
|
|
138
|
+
return sessions.map(reviveAuthenticationSession);
|
|
98
139
|
}
|
|
99
140
|
async createSessionFromChallenges(constraint, options) {
|
|
100
|
-
return
|
|
141
|
+
return reviveAuthenticationSession(
|
|
101
142
|
await this._proxy.$createSessionFromChallenges(this.id, constraint, options)
|
|
102
143
|
);
|
|
103
144
|
}
|
|
@@ -266,9 +307,9 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
|
|
|
266
307
|
const obj = this._registrations.get(providerId);
|
|
267
308
|
if (obj instanceof Emitter) {
|
|
268
309
|
obj.fire({
|
|
269
|
-
added: event.added?.map(
|
|
270
|
-
removed: event.removed?.map(
|
|
271
|
-
changed: event.changed?.map(
|
|
310
|
+
added: event.added?.map(reviveAuthenticationSession),
|
|
311
|
+
removed: event.removed?.map(reviveAuthenticationSession),
|
|
312
|
+
changed: event.changed?.map(reviveAuthenticationSession)
|
|
272
313
|
});
|
|
273
314
|
}
|
|
274
315
|
}
|
|
@@ -294,17 +335,21 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
|
|
|
294
335
|
return await deferredPromise.p;
|
|
295
336
|
}
|
|
296
337
|
$showContinueNotification(message) {
|
|
297
|
-
const yes = ( localize(
|
|
298
|
-
const no = ( localize(
|
|
338
|
+
const yes = ( localize(6357, "Yes"));
|
|
339
|
+
const no = ( localize(6358, "No"));
|
|
299
340
|
const deferredPromise = ( new DeferredPromise());
|
|
300
341
|
let result = false;
|
|
301
342
|
const handle = this.notificationService.prompt(Severity.Warning, message, [{
|
|
343
|
+
telemetryId: NotificationActionTelemetryId.Continue,
|
|
302
344
|
label: yes,
|
|
303
345
|
run: () => result = true
|
|
304
346
|
}, {
|
|
347
|
+
telemetryId: NotificationActionTelemetryId.Decline,
|
|
305
348
|
label: no,
|
|
306
349
|
run: () => result = false
|
|
307
|
-
}]
|
|
350
|
+
}], {
|
|
351
|
+
telemetry: NotificationTelemetryId.AuthenticationContinue
|
|
352
|
+
});
|
|
308
353
|
const disposable = handle.onDidClose(() => {
|
|
309
354
|
deferredPromise.complete(result);
|
|
310
355
|
disposable.dispose();
|
|
@@ -351,26 +396,26 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
|
|
|
351
396
|
message = customMessage;
|
|
352
397
|
} else {
|
|
353
398
|
message = recreatingSession ? ( localize(
|
|
354
|
-
|
|
399
|
+
6359,
|
|
355
400
|
"The extension '{0}' wants you to sign in again using {1}.",
|
|
356
401
|
extensionName,
|
|
357
402
|
provider.label
|
|
358
403
|
)) : ( localize(
|
|
359
|
-
|
|
404
|
+
6360,
|
|
360
405
|
"The extension '{0}' wants to sign in using {1}.",
|
|
361
406
|
extensionName,
|
|
362
407
|
provider.label
|
|
363
408
|
));
|
|
364
409
|
}
|
|
365
410
|
const buttons = [{
|
|
366
|
-
label: ( localize(
|
|
411
|
+
label: ( localize(6361, "&&Allow")),
|
|
367
412
|
run() {
|
|
368
413
|
return true;
|
|
369
414
|
}
|
|
370
415
|
}];
|
|
371
416
|
if (options?.learnMore) {
|
|
372
417
|
buttons.push({
|
|
373
|
-
label: ( localize(
|
|
418
|
+
label: ( localize(6362, "Learn more")),
|
|
374
419
|
run: async () => {
|
|
375
420
|
const result = this.loginPrompt(provider, extensionName, recreatingSession, options);
|
|
376
421
|
await this.openerService.open(URI.revive(options.learnMore), {
|
|
@@ -393,9 +438,9 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
|
|
|
393
438
|
}
|
|
394
439
|
async continueWithIncorrectAccountPrompt(chosenAccountLabel, requestedAccountLabel) {
|
|
395
440
|
const result = await this.dialogService.prompt({
|
|
396
|
-
message: ( localize(
|
|
441
|
+
message: ( localize(6363, "Incorrect account detected")),
|
|
397
442
|
detail: ( localize(
|
|
398
|
-
|
|
443
|
+
6364,
|
|
399
444
|
"The chosen account, {0}, does not match the requested account, {1}.",
|
|
400
445
|
chosenAccountLabel,
|
|
401
446
|
requestedAccountLabel
|
|
@@ -403,10 +448,10 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
|
|
|
403
448
|
type: Severity.Warning,
|
|
404
449
|
cancelButton: true,
|
|
405
450
|
buttons: [{
|
|
406
|
-
label: ( localize(
|
|
451
|
+
label: ( localize(6365, "Keep {0}", chosenAccountLabel)),
|
|
407
452
|
run: () => chosenAccountLabel
|
|
408
453
|
}, {
|
|
409
|
-
label: ( localize(
|
|
454
|
+
label: ( localize(6366, "Login with {0}", requestedAccountLabel)),
|
|
410
455
|
run: () => requestedAccountLabel
|
|
411
456
|
}]
|
|
412
457
|
});
|
|
@@ -416,33 +461,24 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
|
|
|
416
461
|
return result.result === chosenAccountLabel;
|
|
417
462
|
}
|
|
418
463
|
async doGetSession(providerId, scopeListOrRequest, extensionId, extensionName, options) {
|
|
419
|
-
const
|
|
464
|
+
const {
|
|
465
|
+
clearSessionPreference,
|
|
466
|
+
createIfNone,
|
|
467
|
+
forceNewSession,
|
|
468
|
+
silent,
|
|
469
|
+
providerOptions
|
|
470
|
+
} = prepareSessionRequest(options);
|
|
420
471
|
const sessions = await this.authenticationService.getSessions(providerId, scopeListOrRequest, {
|
|
421
|
-
|
|
422
|
-
|
|
472
|
+
...providerOptions,
|
|
473
|
+
silent: !createIfNone && !forceNewSession
|
|
423
474
|
}, true);
|
|
424
475
|
const provider = this.authenticationService.getProvider(providerId);
|
|
425
|
-
if (
|
|
426
|
-
throw ( new Error(
|
|
427
|
-
"Invalid combination of options. Please remove one of the following: forceNewSession, createIfNone"
|
|
428
|
-
));
|
|
429
|
-
}
|
|
430
|
-
if (options.forceNewSession && options.silent) {
|
|
431
|
-
throw ( new Error(
|
|
432
|
-
"Invalid combination of options. Please remove one of the following: forceNewSession, silent"
|
|
433
|
-
));
|
|
434
|
-
}
|
|
435
|
-
if (options.createIfNone && options.silent) {
|
|
436
|
-
throw ( new Error(
|
|
437
|
-
"Invalid combination of options. Please remove one of the following: createIfNone, silent"
|
|
438
|
-
));
|
|
439
|
-
}
|
|
440
|
-
if (options.clearSessionPreference) {
|
|
476
|
+
if (clearSessionPreference) {
|
|
441
477
|
this.authenticationExtensionsService.removeAccountPreference(extensionId, providerId);
|
|
442
478
|
}
|
|
443
479
|
const matchingAccountPreferenceSession =
|
|
444
|
-
|
|
445
|
-
if (!
|
|
480
|
+
providerOptions.account ? sessions[0] : this._getAccountPreference(extensionId, providerId, sessions);
|
|
481
|
+
if (!forceNewSession && sessions.length) {
|
|
446
482
|
if (matchingAccountPreferenceSession && this.authenticationAccessService.isAccessAllowed(providerId, matchingAccountPreferenceSession.account.label, extensionId)) {
|
|
447
483
|
return matchingAccountPreferenceSession;
|
|
448
484
|
}
|
|
@@ -450,28 +486,35 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
|
|
|
450
486
|
return sessions[0];
|
|
451
487
|
}
|
|
452
488
|
}
|
|
453
|
-
if (
|
|
489
|
+
if (createIfNone || forceNewSession) {
|
|
454
490
|
let uiOptions;
|
|
455
|
-
if (typeof
|
|
456
|
-
uiOptions =
|
|
457
|
-
} else if (typeof
|
|
458
|
-
uiOptions =
|
|
491
|
+
if (typeof forceNewSession === "object") {
|
|
492
|
+
uiOptions = forceNewSession;
|
|
493
|
+
} else if (typeof createIfNone === "object") {
|
|
494
|
+
uiOptions = createIfNone;
|
|
459
495
|
}
|
|
460
|
-
const recreatingSession = !!(
|
|
496
|
+
const recreatingSession = !!(forceNewSession && sessions.length);
|
|
461
497
|
const isAllowed = await this.loginPrompt(provider, extensionName, recreatingSession, uiOptions);
|
|
462
498
|
if (!isAllowed) {
|
|
463
499
|
throw ( new Error("User did not consent to login."));
|
|
464
500
|
}
|
|
465
501
|
let session;
|
|
466
|
-
if (sessions?.length && !
|
|
467
|
-
session = provider.supportsMultipleAccounts && !
|
|
502
|
+
if (sessions?.length && !forceNewSession) {
|
|
503
|
+
session = provider.supportsMultipleAccounts && !providerOptions.account ? await this.authenticationExtensionsService.selectSession(
|
|
504
|
+
providerId,
|
|
505
|
+
extensionId,
|
|
506
|
+
extensionName,
|
|
507
|
+
scopeListOrRequest,
|
|
508
|
+
sessions,
|
|
509
|
+
providerOptions
|
|
510
|
+
) : sessions[0];
|
|
468
511
|
} else {
|
|
469
|
-
const accountToCreate =
|
|
512
|
+
const accountToCreate = providerOptions.account ?? matchingAccountPreferenceSession?.account;
|
|
470
513
|
do {
|
|
471
514
|
session = await this.authenticationService.createSession(providerId, scopeListOrRequest, {
|
|
515
|
+
...providerOptions,
|
|
472
516
|
activateImmediate: true,
|
|
473
|
-
account: accountToCreate
|
|
474
|
-
authorizationServer
|
|
517
|
+
account: accountToCreate
|
|
475
518
|
});
|
|
476
519
|
} while (accountToCreate && accountToCreate.label !== session.account.label && !(await this.continueWithIncorrectAccountPrompt(session.account.label, accountToCreate.label)));
|
|
477
520
|
}
|
|
@@ -480,7 +523,9 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
|
|
|
480
523
|
name: extensionName,
|
|
481
524
|
allowed: true
|
|
482
525
|
}]);
|
|
483
|
-
this.authenticationExtensionsService.updateNewSessionRequests(providerId, [session])
|
|
526
|
+
void this.authenticationExtensionsService.updateNewSessionRequests(providerId, [session]).catch(
|
|
527
|
+
error => this.logService.warn("Failed to update pending authentication requests.", error)
|
|
528
|
+
);
|
|
484
529
|
this.authenticationExtensionsService.updateAccountPreference(extensionId, providerId, session.account);
|
|
485
530
|
return session;
|
|
486
531
|
}
|
|
@@ -492,8 +537,21 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
|
|
|
492
537
|
return validSessions[0];
|
|
493
538
|
}
|
|
494
539
|
}
|
|
495
|
-
if (!
|
|
496
|
-
sessions.length ? this.authenticationExtensionsService.requestSessionAccess(
|
|
540
|
+
if (!silent) {
|
|
541
|
+
sessions.length ? this.authenticationExtensionsService.requestSessionAccess(
|
|
542
|
+
providerId,
|
|
543
|
+
extensionId,
|
|
544
|
+
extensionName,
|
|
545
|
+
scopeListOrRequest,
|
|
546
|
+
sessions,
|
|
547
|
+
providerOptions
|
|
548
|
+
) : await this.authenticationExtensionsService.requestNewSession(
|
|
549
|
+
providerId,
|
|
550
|
+
scopeListOrRequest,
|
|
551
|
+
extensionId,
|
|
552
|
+
extensionName,
|
|
553
|
+
providerOptions
|
|
554
|
+
);
|
|
497
555
|
}
|
|
498
556
|
return undefined;
|
|
499
557
|
}
|
|
@@ -559,15 +617,15 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
|
|
|
559
617
|
result
|
|
560
618
|
} = await this.dialogService.prompt({
|
|
561
619
|
type: Severity.Info,
|
|
562
|
-
message: ( localize(
|
|
620
|
+
message: ( localize(6367, "Device Code Authentication")),
|
|
563
621
|
detail: ( localize(
|
|
564
|
-
|
|
622
|
+
6368,
|
|
565
623
|
"Your code: {0}\n\nTo complete authentication, navigate to {1} and enter the code above.",
|
|
566
624
|
userCode,
|
|
567
625
|
verificationUri
|
|
568
626
|
)),
|
|
569
627
|
buttons: [{
|
|
570
|
-
label: ( localize(
|
|
628
|
+
label: ( localize(6369, "Copy & Continue")),
|
|
571
629
|
run: () => true
|
|
572
630
|
}],
|
|
573
631
|
cancelButton: true
|
|
@@ -577,7 +635,7 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
|
|
|
577
635
|
await this.clipboardService.writeText(userCode);
|
|
578
636
|
return await this.openerService.open(( URI.parse(verificationUri)));
|
|
579
637
|
} catch (error) {
|
|
580
|
-
this.notificationService.error(( localize(
|
|
638
|
+
this.notificationService.error(( localize(6370, "Failed to open {0}", verificationUri)));
|
|
581
639
|
}
|
|
582
640
|
}
|
|
583
641
|
return false;
|
|
@@ -586,44 +644,44 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
|
|
|
586
644
|
const redirectUrls = "http://127.0.0.1:33418\nhttps://vscode.dev/redirect";
|
|
587
645
|
const result = await this.dialogService.prompt({
|
|
588
646
|
type: Severity.Info,
|
|
589
|
-
message: ( localize(
|
|
647
|
+
message: ( localize(6371, "Dynamic Client Registration not supported")),
|
|
590
648
|
detail: ( localize(
|
|
591
|
-
|
|
649
|
+
6372,
|
|
592
650
|
"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}",
|
|
593
651
|
authorizationServerUrl,
|
|
594
652
|
redirectUrls
|
|
595
653
|
)),
|
|
596
654
|
buttons: [{
|
|
597
|
-
label: ( localize(
|
|
655
|
+
label: ( localize(6373, "Copy URIs & Proceed")),
|
|
598
656
|
run: async () => {
|
|
599
657
|
try {
|
|
600
658
|
await this.clipboardService.writeText(redirectUrls);
|
|
601
659
|
} catch (error) {
|
|
602
|
-
this.notificationService.error(( localize(
|
|
660
|
+
this.notificationService.error(( localize(6374, "Failed to copy redirect URIs to clipboard.")));
|
|
603
661
|
}
|
|
604
662
|
return true;
|
|
605
663
|
}
|
|
606
664
|
}],
|
|
607
665
|
cancelButton: {
|
|
608
|
-
label: ( localize(
|
|
666
|
+
label: ( localize(6375, "Cancel")),
|
|
609
667
|
run: () => false
|
|
610
668
|
}
|
|
611
669
|
});
|
|
612
670
|
if (!result) {
|
|
613
671
|
return undefined;
|
|
614
672
|
}
|
|
615
|
-
const sharedTitle = ( localize(
|
|
673
|
+
const sharedTitle = ( localize(6376, "Add Client Registration Details"));
|
|
616
674
|
const clientId = await this.quickInputService.input({
|
|
617
675
|
title: sharedTitle,
|
|
618
676
|
prompt: ( localize(
|
|
619
|
-
|
|
677
|
+
6377,
|
|
620
678
|
"Enter an existing client ID that has been registered with the following redirect URIs: http://127.0.0.1:33418, https://vscode.dev/redirect"
|
|
621
679
|
)),
|
|
622
|
-
placeHolder: ( localize(
|
|
680
|
+
placeHolder: ( localize(6378, "OAuth client ID (azye39d...)")),
|
|
623
681
|
ignoreFocusLost: true,
|
|
624
682
|
validateInput: async value => {
|
|
625
683
|
if (!value || value.trim().length === 0) {
|
|
626
|
-
return localize(
|
|
684
|
+
return localize(6379, "Client ID is required");
|
|
627
685
|
}
|
|
628
686
|
return undefined;
|
|
629
687
|
}
|
|
@@ -634,11 +692,11 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
|
|
|
634
692
|
const clientSecret = await this.quickInputService.input({
|
|
635
693
|
title: sharedTitle,
|
|
636
694
|
prompt: ( localize(
|
|
637
|
-
|
|
695
|
+
6380,
|
|
638
696
|
"(optional) Enter an existing client secret associated with the client id '{0}' or leave this field blank",
|
|
639
697
|
clientId
|
|
640
698
|
)),
|
|
641
|
-
placeHolder: ( localize(
|
|
699
|
+
placeHolder: ( localize(6381, "OAuth client secret (wer32o50f...) or leave it blank")),
|
|
642
700
|
password: true,
|
|
643
701
|
ignoreFocusLost: true
|
|
644
702
|
});
|
|
@@ -649,14 +707,14 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
|
|
|
649
707
|
}
|
|
650
708
|
async $promptForResourceClientSecret(resourceClientId, resource) {
|
|
651
709
|
const value = await this.quickInputService.input({
|
|
652
|
-
title: ( localize(
|
|
710
|
+
title: ( localize(6382, "Resource Client Secret Required")),
|
|
653
711
|
prompt: ( localize(
|
|
654
|
-
|
|
712
|
+
6383,
|
|
655
713
|
"The resource at '{0}' uses a per-resource client identifier '{1}'. Enter the matching client secret (leave blank if none). The value is saved in OS secret storage; manage it later via the 'Set Client Secret' code lens in mcp.json.",
|
|
656
714
|
resource,
|
|
657
715
|
resourceClientId
|
|
658
716
|
)),
|
|
659
|
-
placeHolder: ( localize(
|
|
717
|
+
placeHolder: ( localize(6384, "Resource client secret")),
|
|
660
718
|
password: true,
|
|
661
719
|
ignoreFocusLost: true
|
|
662
720
|
});
|
|
@@ -684,4 +742,4 @@ MainThreadAuthentication = __decorate(
|
|
|
684
742
|
MainThreadAuthentication
|
|
685
743
|
);
|
|
686
744
|
|
|
687
|
-
export { MainThreadAuthentication,
|
|
745
|
+
export { MainThreadAuthentication, reviveAuthenticationSession };
|
|
@@ -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
|
-
|
|
111
|
+
6385,
|
|
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
|
)));
|
|
@@ -468,7 +468,7 @@ let MainThreadCommentController = class MainThreadCommentController extends Disp
|
|
|
468
468
|
}
|
|
469
469
|
};
|
|
470
470
|
MainThreadCommentController = ( __decorate([( __param(6, ICommentService)), ( __param(7, IUriIdentityService))], MainThreadCommentController));
|
|
471
|
-
const commentsViewIcon = registerIcon("comments-view-icon", Codicon.commentDiscussion, ( localize(
|
|
471
|
+
const commentsViewIcon = registerIcon("comments-view-icon", Codicon.commentDiscussion, ( localize(6388, "View icon of the comments view.")));
|
|
472
472
|
let MainThreadComments = class MainThreadComments extends Disposable {
|
|
473
473
|
constructor(
|
|
474
474
|
extHostContext,
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
|
+
import { ISelection } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/core/selection";
|
|
3
|
+
import { IOutlineService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/outline/browser/outline.service";
|
|
2
4
|
import { UriComponents } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
3
5
|
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
4
6
|
import { IStorageService } from "@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service";
|
|
@@ -25,15 +27,25 @@ export declare class MainThreadCustomEditors extends Disposable implements extHo
|
|
|
25
27
|
private readonly _webviewWorkbenchService;
|
|
26
28
|
private readonly _uriIdentityService;
|
|
27
29
|
private readonly _untitledTextEditorService;
|
|
30
|
+
private readonly _outlineService;
|
|
28
31
|
private readonly _proxyCustomEditors;
|
|
29
32
|
private readonly _editorProviders;
|
|
33
|
+
private readonly _navigation;
|
|
34
|
+
private readonly _pendingNavigation;
|
|
30
35
|
private readonly _editorRenameBackups;
|
|
31
36
|
private readonly _pendingSideBySideDiffResolutions;
|
|
37
|
+
/**
|
|
38
|
+
* Webview handle of each resolved input. An input is resolved again if creating its document failed.
|
|
39
|
+
*/
|
|
40
|
+
private readonly _webviewHandles;
|
|
32
41
|
private readonly _webviewOriginStore;
|
|
33
|
-
constructor(context: IExtHostContext, mainThreadWebview: MainThreadWebviews, mainThreadWebviewPanels: MainThreadWebviewPanels, extensionService: IExtensionService, storageService: IStorageService, workingCopyService: IWorkingCopyService, workingCopyFileService: IWorkingCopyFileService, _customEditorService: ICustomEditorService, _editorGroupService: IEditorGroupsService, _editorService: IEditorService, _instantiationService: IInstantiationService, _webviewWorkbenchService: IWebviewWorkbenchService, _uriIdentityService: IUriIdentityService, _untitledTextEditorService: IUntitledTextEditorService);
|
|
42
|
+
constructor(context: IExtHostContext, mainThreadWebview: MainThreadWebviews, mainThreadWebviewPanels: MainThreadWebviewPanels, extensionService: IExtensionService, storageService: IStorageService, workingCopyService: IWorkingCopyService, workingCopyFileService: IWorkingCopyFileService, _customEditorService: ICustomEditorService, _editorGroupService: IEditorGroupsService, _editorService: IEditorService, _instantiationService: IInstantiationService, _webviewWorkbenchService: IWebviewWorkbenchService, _uriIdentityService: IUriIdentityService, _untitledTextEditorService: IUntitledTextEditorService, _outlineService: IOutlineService);
|
|
34
43
|
$registerTextEditorProvider(extensionData: extHostProtocol.WebviewExtensionDescription, viewType: string, options: extHostProtocol.IWebviewPanelOptions, capabilities: extHostProtocol.CustomEditorProviderCapabilities, serializeBuffersForPostMessage: boolean): void;
|
|
35
44
|
$registerCustomEditorProvider(extensionData: extHostProtocol.WebviewExtensionDescription, viewType: string, options: extHostProtocol.IWebviewPanelOptions, capabilities: extHostProtocol.CustomEditorProviderCapabilities, supportsMultipleEditorsPerDocument: boolean, serializeBuffersForPostMessage: boolean): void;
|
|
36
45
|
private registerEditorProvider;
|
|
46
|
+
private getOrAddWebviewInput;
|
|
47
|
+
private resolveCustomTextEditorNavigation;
|
|
48
|
+
$onDidChangeCustomTextEditorSelection(handle: extHostProtocol.WebviewHandle, selection: ISelection | undefined): void;
|
|
37
49
|
private resolveCustomEditorSideBySideDiff;
|
|
38
50
|
$unregisterEditorProvider(viewType: string): void;
|
|
39
51
|
private getOrCreateCustomEditorModel;
|