@codingame/monaco-vscode-welcome-service-override 33.0.9 → 34.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.
- package/package.json +2 -2
- package/vscode/src/vs/workbench/contrib/welcomeOnboarding/browser/media/variationA.css +68 -0
- package/vscode/src/vs/workbench/contrib/welcomeOnboarding/browser/onboardingVariationA.d.ts +13 -4
- package/vscode/src/vs/workbench/contrib/welcomeOnboarding/browser/onboardingVariationA.js +268 -148
- package/vscode/src/vs/workbench/contrib/welcomeOnboarding/browser/welcomeOnboarding.contribution.js +1 -1
- package/vscode/src/vs/workbench/contrib/welcomeViews/common/newFile.contribution.js +10 -10
- package/vscode/src/vs/workbench/contrib/welcomeViews/common/viewsWelcomeContribution.js +1 -1
- package/vscode/src/vs/workbench/contrib/welcomeViews/common/viewsWelcomeExtensionPoint.js +8 -8
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-welcome-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "34.0.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor - welcome service-override",
|
|
6
6
|
"keywords": [],
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codingame/monaco-vscode-api": "
|
|
18
|
+
"@codingame/monaco-vscode-api": "34.0.1"
|
|
19
19
|
},
|
|
20
20
|
"main": "index.js",
|
|
21
21
|
"module": "index.js",
|
|
@@ -310,6 +310,7 @@
|
|
|
310
310
|
flex-direction: column;
|
|
311
311
|
justify-content: center;
|
|
312
312
|
gap: 10px;
|
|
313
|
+
min-width: 0;
|
|
313
314
|
}
|
|
314
315
|
|
|
315
316
|
.onboarding-a-signin-title {
|
|
@@ -334,6 +335,7 @@
|
|
|
334
335
|
gap: 8px;
|
|
335
336
|
margin-top: 4px;
|
|
336
337
|
flex-wrap: nowrap;
|
|
338
|
+
min-width: 0;
|
|
337
339
|
}
|
|
338
340
|
|
|
339
341
|
.onboarding-a-signin-footer {
|
|
@@ -434,6 +436,72 @@
|
|
|
434
436
|
white-space: nowrap;
|
|
435
437
|
}
|
|
436
438
|
|
|
439
|
+
/* Inline GitHub Enterprise instance input */
|
|
440
|
+
.onboarding-a-signin-ghe-input {
|
|
441
|
+
display: flex;
|
|
442
|
+
flex: 1 1 auto;
|
|
443
|
+
flex-direction: column;
|
|
444
|
+
gap: 6px;
|
|
445
|
+
margin-top: 4px;
|
|
446
|
+
min-width: 0;
|
|
447
|
+
width: 100%;
|
|
448
|
+
max-width: 320px;
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
.onboarding-a-signin-ghe-input .monaco-inputbox {
|
|
452
|
+
height: 40px;
|
|
453
|
+
border-radius: 8px;
|
|
454
|
+
font-size: 13px;
|
|
455
|
+
line-height: 40px;
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
.onboarding-a-signin-ghe-input .monaco-inputbox .monaco-action-bar {
|
|
459
|
+
top: 50%;
|
|
460
|
+
right: 6px;
|
|
461
|
+
transform: translateY(-50%);
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
.onboarding-a-signin-ghe-input .monaco-inputbox.error {
|
|
465
|
+
box-shadow: inset 0 0 0 1px var(--vscode-inputValidation-errorBorder);
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
.onboarding-a-signin-ghe-message {
|
|
469
|
+
font-size: 12px;
|
|
470
|
+
line-height: 1.4;
|
|
471
|
+
color: var(--vscode-descriptionForeground);
|
|
472
|
+
width: 100%;
|
|
473
|
+
max-width: 100%;
|
|
474
|
+
box-sizing: border-box;
|
|
475
|
+
white-space: normal;
|
|
476
|
+
overflow-wrap: anywhere;
|
|
477
|
+
word-break: break-word;
|
|
478
|
+
min-height: 16px;
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
.onboarding-a-signin-ghe-message.error {
|
|
482
|
+
color: var(--vscode-inputValidation-errorForeground, var(--vscode-errorForeground));
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
.onboarding-a-signin-ghe-progress {
|
|
486
|
+
display: flex;
|
|
487
|
+
align-items: center;
|
|
488
|
+
gap: 8px;
|
|
489
|
+
padding: 8px 0;
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
.onboarding-a-signin-ghe-progress-message {
|
|
493
|
+
font-size: 13px;
|
|
494
|
+
color: var(--vscode-descriptionForeground);
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
.onboarding-a-signin-confirmation {
|
|
498
|
+
display: flex;
|
|
499
|
+
align-items: center;
|
|
500
|
+
gap: 8px;
|
|
501
|
+
padding: 8px 0;
|
|
502
|
+
font-size: 13px;
|
|
503
|
+
color: var(--vscode-descriptionForeground);
|
|
504
|
+
}
|
|
437
505
|
|
|
438
506
|
.onboarding-a-provider-mark {
|
|
439
507
|
display: flex;
|
|
@@ -7,7 +7,6 @@ import { IExtensionGalleryService } from "@codingame/monaco-vscode-api/vscode/vs
|
|
|
7
7
|
import { IDefaultAccountService } from "@codingame/monaco-vscode-api/vscode/vs/platform/defaultAccount/common/defaultAccount.service";
|
|
8
8
|
import { INotificationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/notification/common/notification.service";
|
|
9
9
|
import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
10
|
-
import { IQuickInputService } from "@codingame/monaco-vscode-api/vscode/vs/platform/quickinput/common/quickInput.service";
|
|
11
10
|
import { IFileService } from "@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service";
|
|
12
11
|
import { IPathService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/path/common/pathService.service";
|
|
13
12
|
import { ITelemetryService } from "@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service";
|
|
@@ -34,7 +33,6 @@ export declare class OnboardingVariationA extends Disposable implements IOnboard
|
|
|
34
33
|
private readonly extensionManagementService;
|
|
35
34
|
private readonly configurationService;
|
|
36
35
|
private readonly notificationService;
|
|
37
|
-
private readonly quickInputService;
|
|
38
36
|
private readonly fileService;
|
|
39
37
|
private readonly pathService;
|
|
40
38
|
private readonly telemetryService;
|
|
@@ -71,7 +69,10 @@ export declare class OnboardingVariationA extends Disposable implements IOnboard
|
|
|
71
69
|
private _detectedEditorIds;
|
|
72
70
|
private _userSignedIn;
|
|
73
71
|
private selectedAiMode;
|
|
74
|
-
|
|
72
|
+
private enterpriseSignInUiState;
|
|
73
|
+
private enterpriseInstanceValue;
|
|
74
|
+
private enterpriseSignInWatch;
|
|
75
|
+
constructor(layoutService: ILayoutService, themeService: IWorkbenchThemeService, defaultAccountService: IDefaultAccountService, extensionGalleryService: IExtensionGalleryService, extensionManagementService: IExtensionManagementService, configurationService: IConfigurationService, notificationService: INotificationService, fileService: IFileService, pathService: IPathService, telemetryService: ITelemetryService, commandService: ICommandService, accessibilityService: IAccessibilityService);
|
|
75
76
|
get isShowing(): boolean;
|
|
76
77
|
show(): void;
|
|
77
78
|
private _dismiss;
|
|
@@ -82,10 +83,18 @@ export declare class OnboardingVariationA extends Disposable implements IOnboard
|
|
|
82
83
|
private _renderStep;
|
|
83
84
|
private _updateButtonStates;
|
|
84
85
|
private _renderSignInStep;
|
|
86
|
+
private _renderDefaultSignInActions;
|
|
87
|
+
private static readonly GHE_INPUT_ACTION_PADDING;
|
|
88
|
+
private _renderEnterpriseInstanceForm;
|
|
89
|
+
private _renderEnterpriseSignInProgress;
|
|
90
|
+
private _getEnterpriseInstancePromptLabel;
|
|
91
|
+
private _setEnterpriseSignInUiState;
|
|
85
92
|
private _createSignInButton;
|
|
86
93
|
private _handleSignIn;
|
|
87
94
|
private _handleEnterpriseSignIn;
|
|
88
|
-
private
|
|
95
|
+
private _submitEnterpriseInstance;
|
|
96
|
+
private _runEnterpriseSignInSetup;
|
|
97
|
+
private _notifyEnterpriseSignInError;
|
|
89
98
|
private _renderPersonalizeStep;
|
|
90
99
|
private _renderPersonalizeSubtitle;
|
|
91
100
|
private _createThemeCard;
|
|
@@ -12,9 +12,12 @@ import { FileAccess } from '@codingame/monaco-vscode-api/vscode/vs/base/common/n
|
|
|
12
12
|
import { ILayoutService } from '@codingame/monaco-vscode-api/vscode/vs/platform/layout/browser/layoutService.service';
|
|
13
13
|
import { KeyCode } from '@codingame/monaco-vscode-api/vscode/vs/base/common/keyCodes';
|
|
14
14
|
import { StandardKeyboardEvent } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/keyboardEvent';
|
|
15
|
+
import { InputBox } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/inputbox/inputBox';
|
|
15
16
|
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
16
17
|
import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
|
|
18
|
+
import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
|
|
17
19
|
import { renderIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/iconLabel/iconLabels';
|
|
20
|
+
import { Action } from '@codingame/monaco-vscode-api/vscode/vs/base/common/actions';
|
|
18
21
|
import { IWorkbenchThemeService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/themes/common/workbenchThemeService.service';
|
|
19
22
|
import { EXTENSION_INSTALL_SKIP_WALKTHROUGH_CONTEXT } from '@codingame/monaco-vscode-api/vscode/vs/platform/extensionManagement/common/extensionManagement';
|
|
20
23
|
import { IExtensionGalleryService, IExtensionManagementService } from '@codingame/monaco-vscode-api/vscode/vs/platform/extensionManagement/common/extensionManagement.service';
|
|
@@ -25,23 +28,27 @@ import '@codingame/monaco-vscode-api/vscode/vs/platform/notification/common/noti
|
|
|
25
28
|
import { INotificationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/notification/common/notification.service';
|
|
26
29
|
import { ConfigurationTarget } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration';
|
|
27
30
|
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
31
|
+
import { defaultInputBoxStyles } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/browser/defaultStyles';
|
|
28
32
|
import product from '@codingame/monaco-vscode-api/vscode/vs/platform/product/common/product';
|
|
29
|
-
import { IQuickInputService } from '@codingame/monaco-vscode-api/vscode/vs/platform/quickinput/common/quickInput.service';
|
|
30
33
|
import { IFileService } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service';
|
|
31
34
|
import { IPathService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/path/common/pathService.service';
|
|
32
35
|
import { ITelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service';
|
|
33
36
|
import { ChatSetupStrategy } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatSetup/chatSetup';
|
|
34
37
|
import { ICommandService } from '@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service';
|
|
35
38
|
import { IAccessibilityService } from '@codingame/monaco-vscode-api/vscode/vs/platform/accessibility/common/accessibility.service';
|
|
36
|
-
import { ONBOARDING_STEPS, AiCollaborationMode, OnboardingStepId, getOnboardingStepTitle, getOnboardingStepSubtitle, ONBOARDING_AI_PREFERENCE_OPTIONS } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/welcomeOnboarding/common/onboardingTypes';
|
|
39
|
+
import { ONBOARDING_STEPS, AiCollaborationMode, OnboardingStepId, getOnboardingStepTitle, getOnboardingStepSubtitle, parseGheInstanceInput, GheParseResultKind, GHE_FULL_URI_REGEX, ONBOARDING_AI_PREFERENCE_OPTIONS } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/welcomeOnboarding/common/onboardingTypes';
|
|
37
40
|
import Severity from '@codingame/monaco-vscode-api/vscode/vs/base/common/severity';
|
|
38
41
|
|
|
42
|
+
var OnboardingVariationA_1;
|
|
39
43
|
assertDefined(
|
|
40
44
|
product.defaultChatAgent,
|
|
41
45
|
"Onboarding requires a default chat agent product configuration."
|
|
42
46
|
);
|
|
43
47
|
const defaultChat = product.defaultChatAgent;
|
|
44
48
|
let OnboardingVariationA = class OnboardingVariationA extends Disposable {
|
|
49
|
+
static {
|
|
50
|
+
OnboardingVariationA_1 = this;
|
|
51
|
+
}
|
|
45
52
|
constructor(
|
|
46
53
|
layoutService,
|
|
47
54
|
themeService,
|
|
@@ -50,7 +57,6 @@ let OnboardingVariationA = class OnboardingVariationA extends Disposable {
|
|
|
50
57
|
extensionManagementService,
|
|
51
58
|
configurationService,
|
|
52
59
|
notificationService,
|
|
53
|
-
quickInputService,
|
|
54
60
|
fileService,
|
|
55
61
|
pathService,
|
|
56
62
|
telemetryService,
|
|
@@ -65,7 +71,6 @@ let OnboardingVariationA = class OnboardingVariationA extends Disposable {
|
|
|
65
71
|
this.extensionManagementService = extensionManagementService;
|
|
66
72
|
this.configurationService = configurationService;
|
|
67
73
|
this.notificationService = notificationService;
|
|
68
|
-
this.quickInputService = quickInputService;
|
|
69
74
|
this.fileService = fileService;
|
|
70
75
|
this.pathService = pathService;
|
|
71
76
|
this.telemetryService = telemetryService;
|
|
@@ -86,6 +91,8 @@ let OnboardingVariationA = class OnboardingVariationA extends Disposable {
|
|
|
86
91
|
this.selectedKeymapId = "vscode";
|
|
87
92
|
this._userSignedIn = false;
|
|
88
93
|
this.selectedAiMode = AiCollaborationMode.Balanced;
|
|
94
|
+
this.enterpriseSignInUiState = "options";
|
|
95
|
+
this.enterpriseInstanceValue = "";
|
|
89
96
|
const currentTheme = this.themeService.getColorTheme();
|
|
90
97
|
const allThemes = product.onboardingThemes ?? [];
|
|
91
98
|
const matchingTheme = allThemes.find(t => t.themeId === currentTheme.settingsId);
|
|
@@ -109,11 +116,11 @@ let OnboardingVariationA = class OnboardingVariationA extends Disposable {
|
|
|
109
116
|
this.overlay = append(container, $(".onboarding-a-overlay"));
|
|
110
117
|
this.overlay.setAttribute("role", "dialog");
|
|
111
118
|
this.overlay.setAttribute("aria-modal", "true");
|
|
112
|
-
this.overlay.setAttribute("aria-label", ( localize(
|
|
119
|
+
this.overlay.setAttribute("aria-label", ( localize(16303, "Welcome to Visual Studio Code")));
|
|
113
120
|
this.card = append(this.overlay, $(".onboarding-a-card"));
|
|
114
121
|
this.closeButton = append(this.card, $("button.onboarding-a-close-btn"));
|
|
115
122
|
this.closeButton.type = "button";
|
|
116
|
-
this.closeButton.setAttribute("aria-label", ( localize(
|
|
123
|
+
this.closeButton.setAttribute("aria-label", ( localize(16304, "Close")));
|
|
117
124
|
this.closeButton.appendChild(renderIcon(Codicon.close));
|
|
118
125
|
const header = append(this.card, $(".onboarding-a-header"));
|
|
119
126
|
this.progressContainer = append(header, $(".onboarding-a-progress"));
|
|
@@ -129,7 +136,7 @@ let OnboardingVariationA = class OnboardingVariationA extends Disposable {
|
|
|
129
136
|
this.footerLeft = append(footer, $(".onboarding-a-footer-left"));
|
|
130
137
|
const footerRight = append(footer, $(".onboarding-a-footer-right"));
|
|
131
138
|
this.backButton = append(footerRight, $("button.onboarding-a-btn.onboarding-a-btn-secondary"));
|
|
132
|
-
this.backButton.textContent = ( localize(
|
|
139
|
+
this.backButton.textContent = ( localize(16305, "Back"));
|
|
133
140
|
this.backButton.type = "button";
|
|
134
141
|
this.footerFocusableElements.push(this.backButton);
|
|
135
142
|
this.nextButton = append(footerRight, $("button.onboarding-a-btn.onboarding-a-btn-primary"));
|
|
@@ -141,6 +148,12 @@ let OnboardingVariationA = class OnboardingVariationA extends Disposable {
|
|
|
141
148
|
this._dismiss("skip");
|
|
142
149
|
}));
|
|
143
150
|
this.disposables.add(addDisposableListener(this.backButton, EventType.CLICK, () => {
|
|
151
|
+
if (this.currentStepIndex === 0 && this.enterpriseSignInUiState === "instance") {
|
|
152
|
+
this._logAction("cancelEnterpriseInstancePrompt");
|
|
153
|
+
this.enterpriseSignInWatch = undefined;
|
|
154
|
+
this._setEnterpriseSignInUiState("options");
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
144
157
|
this._logAction("back");
|
|
145
158
|
this._prevStep();
|
|
146
159
|
}));
|
|
@@ -207,6 +220,11 @@ let OnboardingVariationA = class OnboardingVariationA extends Disposable {
|
|
|
207
220
|
_nextStep() {
|
|
208
221
|
if (this.currentStepIndex < this.steps.length - 1) {
|
|
209
222
|
const leavingStep = this.steps[this.currentStepIndex];
|
|
223
|
+
if (leavingStep === OnboardingStepId.SignIn) {
|
|
224
|
+
this.enterpriseSignInUiState = "options";
|
|
225
|
+
this.enterpriseInstanceValue = "";
|
|
226
|
+
this.enterpriseSignInWatch = undefined;
|
|
227
|
+
}
|
|
210
228
|
if (leavingStep === OnboardingStepId.Personalize) {
|
|
211
229
|
this._applyKeymap(this.selectedKeymapId);
|
|
212
230
|
}
|
|
@@ -245,7 +263,7 @@ let OnboardingVariationA = class OnboardingVariationA extends Disposable {
|
|
|
245
263
|
}
|
|
246
264
|
}
|
|
247
265
|
this.progressContainer.appendChild(this.stepLabelEl);
|
|
248
|
-
this.stepLabelEl.textContent = ( localize(
|
|
266
|
+
this.stepLabelEl.textContent = ( localize(16306, "{0} of {1}", this.currentStepIndex + 1, this.steps.length));
|
|
249
267
|
}
|
|
250
268
|
_renderStep() {
|
|
251
269
|
if (!this.titleEl || !this.subtitleEl || !this.contentEl) {
|
|
@@ -281,7 +299,7 @@ let OnboardingVariationA = class OnboardingVariationA extends Disposable {
|
|
|
281
299
|
break;
|
|
282
300
|
}
|
|
283
301
|
this.bodyEl?.setAttribute("aria-label", ( localize(
|
|
284
|
-
|
|
302
|
+
16307,
|
|
285
303
|
"Step {0} of {1}: {2}",
|
|
286
304
|
this.currentStepIndex + 1,
|
|
287
305
|
this.steps.length,
|
|
@@ -290,18 +308,24 @@ let OnboardingVariationA = class OnboardingVariationA extends Disposable {
|
|
|
290
308
|
}
|
|
291
309
|
_updateButtonStates() {
|
|
292
310
|
if (this.backButton) {
|
|
293
|
-
|
|
311
|
+
const showEnterpriseBack = this.currentStepIndex === 0 && this.enterpriseSignInUiState === "instance";
|
|
312
|
+
this.backButton.style.display = (this.currentStepIndex === 0 && !showEnterpriseBack) ? "none" : "";
|
|
294
313
|
}
|
|
295
314
|
if (this.nextButton) {
|
|
296
315
|
if (this.currentStepIndex === 0) {
|
|
297
|
-
this.
|
|
298
|
-
|
|
316
|
+
if (this._userSignedIn) {
|
|
317
|
+
this.nextButton.className = "onboarding-a-btn onboarding-a-btn-primary";
|
|
318
|
+
this.nextButton.textContent = ( localize(16308, "Continue"));
|
|
319
|
+
} else {
|
|
320
|
+
this.nextButton.className = "onboarding-a-btn onboarding-a-btn-secondary";
|
|
321
|
+
this.nextButton.textContent = ( localize(16309, "Continue without Signing In"));
|
|
322
|
+
}
|
|
299
323
|
} else if (this._isLastStep()) {
|
|
300
324
|
this.nextButton.className = "onboarding-a-btn onboarding-a-btn-primary";
|
|
301
|
-
this.nextButton.textContent = ( localize(
|
|
325
|
+
this.nextButton.textContent = ( localize(16310, "Get Started"));
|
|
302
326
|
} else {
|
|
303
327
|
this.nextButton.className = "onboarding-a-btn onboarding-a-btn-primary";
|
|
304
|
-
this.nextButton.textContent = ( localize(
|
|
328
|
+
this.nextButton.textContent = ( localize(16311, "Continue"));
|
|
305
329
|
}
|
|
306
330
|
}
|
|
307
331
|
if (this.footerLeft) {
|
|
@@ -309,7 +333,7 @@ let OnboardingVariationA = class OnboardingVariationA extends Disposable {
|
|
|
309
333
|
if (!this._footerSignInBtn && !this._userSignedIn) {
|
|
310
334
|
this._footerSignInBtn = append(this.footerLeft, $("button.onboarding-a-signin-nudge-btn"));
|
|
311
335
|
this._footerSignInBtn.type = "button";
|
|
312
|
-
this._footerSignInBtn.textContent = ( localize(
|
|
336
|
+
this._footerSignInBtn.textContent = ( localize(16312, "Sign in for AI Powered Features"));
|
|
313
337
|
this.stepDisposables.add(
|
|
314
338
|
addDisposableListener(this._footerSignInBtn, EventType.CLICK, async () => {
|
|
315
339
|
this._logAction("signInNudge");
|
|
@@ -337,60 +361,183 @@ let OnboardingVariationA = class OnboardingVariationA extends Disposable {
|
|
|
337
361
|
const content = append(wrapper, $(".onboarding-a-signin-content"));
|
|
338
362
|
const contentMain = append(content, $(".onboarding-a-signin-content-main"));
|
|
339
363
|
const title = append(contentMain, $("h2.onboarding-a-signin-title"));
|
|
340
|
-
title.textContent = ( localize(
|
|
364
|
+
title.textContent = ( localize(16313, "Welcome to VS Code"));
|
|
341
365
|
const subtitle = append(contentMain, $("p.onboarding-a-signin-subtitle"));
|
|
342
|
-
subtitle.textContent = ( localize(
|
|
366
|
+
subtitle.textContent = ( localize(16314, "Sign in to use GitHub Copilot."));
|
|
343
367
|
const actions = append(contentMain, $(".onboarding-a-signin-actions"));
|
|
344
|
-
|
|
368
|
+
if (this._userSignedIn) {
|
|
369
|
+
const signedIn = append(actions, $(".onboarding-a-signin-confirmation"));
|
|
370
|
+
const icon = append(signedIn, $("span"));
|
|
371
|
+
icon.classList.add(...ThemeIcon.asClassNameArray(Codicon.check));
|
|
372
|
+
icon.setAttribute("aria-hidden", "true");
|
|
373
|
+
const text = append(signedIn, $("span"));
|
|
374
|
+
text.textContent = ( localize(16315, "You're signed in. You can continue to the next step."));
|
|
375
|
+
} else {
|
|
376
|
+
switch (this.enterpriseSignInUiState) {
|
|
377
|
+
case "instance":
|
|
378
|
+
this._renderEnterpriseInstanceForm(actions);
|
|
379
|
+
break;
|
|
380
|
+
case "progress":
|
|
381
|
+
this._renderEnterpriseSignInProgress(actions);
|
|
382
|
+
break;
|
|
383
|
+
default:
|
|
384
|
+
this._renderDefaultSignInActions(actions);
|
|
385
|
+
break;
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
const footer = append(wrapper, $(".onboarding-a-signin-footer"));
|
|
389
|
+
const disclaimerCol = append(footer, $(".onboarding-a-signin-disclaimer-col"));
|
|
390
|
+
const copilotDisclaimer = append(disclaimerCol, $(".onboarding-a-signin-disclaimer"));
|
|
391
|
+
copilotDisclaimer.append(( localize(
|
|
392
|
+
16316,
|
|
393
|
+
"By signing in, you agree to {0}'s ",
|
|
394
|
+
defaultChat.provider.default.name
|
|
395
|
+
)));
|
|
396
|
+
this._createInlineLink(copilotDisclaimer, ( localize(16317, "Terms")), defaultChat.termsStatementUrl);
|
|
397
|
+
copilotDisclaimer.append(( localize(16318, " and ")));
|
|
398
|
+
this._createInlineLink(copilotDisclaimer, ( localize(16319, "Privacy Statement")), defaultChat.privacyStatementUrl);
|
|
399
|
+
copilotDisclaimer.append(( localize(16320, ". {0} Copilot may show ", defaultChat.provider.default.name)));
|
|
400
|
+
this._createInlineLink(copilotDisclaimer, ( localize(16321, "public code")), defaultChat.publicCodeMatchesUrl);
|
|
401
|
+
copilotDisclaimer.append(( localize(16322, " suggestions and use your data to improve the product.")));
|
|
402
|
+
copilotDisclaimer.append(" ");
|
|
403
|
+
copilotDisclaimer.append(( localize(16323, "You can change these ")));
|
|
404
|
+
this._createInlineLink(copilotDisclaimer, ( localize(16324, "settings")), this.defaultAccountService.resolveGitHubUrl(GitHubPaths.copilotSettings));
|
|
405
|
+
copilotDisclaimer.append(( localize(16325, " anytime.")));
|
|
406
|
+
}
|
|
407
|
+
_renderDefaultSignInActions(actions) {
|
|
408
|
+
const githubBtn = this._registerStepFocusable(this._createSignInButton(actions, "github", ( localize(16326, "Continue with GitHub")), {
|
|
345
409
|
emphasized: true,
|
|
346
|
-
label: ( localize(
|
|
410
|
+
label: ( localize(16327, "Continue with GitHub"))
|
|
347
411
|
}));
|
|
348
412
|
this.stepDisposables.add(addDisposableListener(githubBtn, EventType.CLICK, () => {
|
|
349
413
|
this._logAction("signIn", undefined, "github");
|
|
350
414
|
this._handleSignIn();
|
|
351
415
|
}));
|
|
352
|
-
const googleBtn = this._registerStepFocusable(this._createSignInButton(actions, "google", ( localize(
|
|
416
|
+
const googleBtn = this._registerStepFocusable(this._createSignInButton(actions, "google", ( localize(16328, "Continue with Google")), {
|
|
353
417
|
iconOnly: true,
|
|
354
|
-
label: ( localize(
|
|
418
|
+
label: ( localize(16328, "Continue with Google"))
|
|
355
419
|
}));
|
|
356
420
|
this.stepDisposables.add(addDisposableListener(googleBtn, EventType.CLICK, () => {
|
|
357
421
|
this._logAction("signIn", undefined, "google");
|
|
358
422
|
this._handleSignIn("google");
|
|
359
423
|
}));
|
|
360
|
-
const appleBtn = this._registerStepFocusable(this._createSignInButton(actions, "apple", ( localize(
|
|
424
|
+
const appleBtn = this._registerStepFocusable(this._createSignInButton(actions, "apple", ( localize(16329, "Continue with Apple")), {
|
|
361
425
|
iconOnly: true,
|
|
362
|
-
label: ( localize(
|
|
426
|
+
label: ( localize(16329, "Continue with Apple"))
|
|
363
427
|
}));
|
|
364
428
|
this.stepDisposables.add(addDisposableListener(appleBtn, EventType.CLICK, () => {
|
|
365
429
|
this._logAction("signIn", undefined, "apple");
|
|
366
430
|
this._handleSignIn("apple");
|
|
367
431
|
}));
|
|
368
|
-
const gheBtn = this._registerStepFocusable(this._createSignInButton(actions, "github-enterprise", ( localize(
|
|
432
|
+
const gheBtn = this._registerStepFocusable(this._createSignInButton(actions, "github-enterprise", ( localize(16330, "GHE")), {
|
|
369
433
|
textOnly: true,
|
|
370
|
-
label: ( localize(
|
|
434
|
+
label: ( localize(16331, "Continue with GitHub Enterprise"))
|
|
371
435
|
}));
|
|
372
436
|
this.stepDisposables.add(addDisposableListener(gheBtn, EventType.CLICK, () => {
|
|
373
437
|
this._logAction("signIn", undefined, "github-enterprise");
|
|
374
|
-
this._handleEnterpriseSignIn();
|
|
438
|
+
void this._handleEnterpriseSignIn();
|
|
375
439
|
}));
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
)));
|
|
384
|
-
this.
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
440
|
+
}
|
|
441
|
+
static {
|
|
442
|
+
this.GHE_INPUT_ACTION_PADDING = 28;
|
|
443
|
+
}
|
|
444
|
+
_renderEnterpriseInstanceForm(actions) {
|
|
445
|
+
const enterprisePromptLabel = this._getEnterpriseInstancePromptLabel();
|
|
446
|
+
const container = append(actions, $(".onboarding-a-signin-ghe-input"));
|
|
447
|
+
const submitAction = this.stepDisposables.add(( new Action("onboarding.signIn.enterprise.submit", ( localize(16332, "Continue")), ThemeIcon.asClassName(Codicon.arrowRight), false)));
|
|
448
|
+
const inputBox = this.stepDisposables.add(( new InputBox(container, undefined, {
|
|
449
|
+
placeholder: ( localize(16333, "i.e. \"octocat\" or \"https://octocat.ghe.com\"...")),
|
|
450
|
+
ariaLabel: enterprisePromptLabel,
|
|
451
|
+
actions: [submitAction],
|
|
452
|
+
inputBoxStyles: defaultInputBoxStyles
|
|
453
|
+
})));
|
|
454
|
+
inputBox.value = this.enterpriseInstanceValue;
|
|
455
|
+
inputBox.paddingRight = OnboardingVariationA_1.GHE_INPUT_ACTION_PADDING;
|
|
456
|
+
const input = this._registerStepFocusable(inputBox.inputElement);
|
|
457
|
+
const submit = async () => {
|
|
458
|
+
const result = parseGheInstanceInput(inputBox.value);
|
|
459
|
+
if (result.kind === GheParseResultKind.Empty || result.kind === GheParseResultKind.Invalid) {
|
|
460
|
+
validate();
|
|
461
|
+
return;
|
|
462
|
+
}
|
|
463
|
+
await this._submitEnterpriseInstance(result.resolvedUri);
|
|
464
|
+
};
|
|
465
|
+
submitAction.run = submit;
|
|
466
|
+
const message = append(container, $(".onboarding-a-signin-ghe-message"));
|
|
467
|
+
const validate = () => {
|
|
468
|
+
this.enterpriseInstanceValue = inputBox.value;
|
|
469
|
+
inputBox.element.classList.remove("error");
|
|
470
|
+
message.classList.remove("error", "info");
|
|
471
|
+
const result = parseGheInstanceInput(inputBox.value);
|
|
472
|
+
switch (result.kind) {
|
|
473
|
+
case GheParseResultKind.Empty:
|
|
474
|
+
message.textContent = enterprisePromptLabel;
|
|
475
|
+
submitAction.enabled = false;
|
|
476
|
+
return false;
|
|
477
|
+
case GheParseResultKind.SingleWord:
|
|
478
|
+
message.classList.add("info");
|
|
479
|
+
message.textContent = ( localize(16334, "Will resolve to {0}", result.resolvedUri));
|
|
480
|
+
submitAction.enabled = true;
|
|
481
|
+
return true;
|
|
482
|
+
case GheParseResultKind.FullUri:
|
|
483
|
+
submitAction.enabled = true;
|
|
484
|
+
message.textContent = "";
|
|
485
|
+
return true;
|
|
486
|
+
case GheParseResultKind.Invalid:
|
|
487
|
+
inputBox.element.classList.add("error");
|
|
488
|
+
message.classList.add("error");
|
|
489
|
+
message.textContent = ( localize(
|
|
490
|
+
16335,
|
|
491
|
+
"You must enter a valid {0} instance (i.e. \"octocat\" or \"https://octocat.ghe.com\")",
|
|
492
|
+
defaultChat.provider.enterprise.name
|
|
493
|
+
));
|
|
494
|
+
submitAction.enabled = false;
|
|
495
|
+
return false;
|
|
496
|
+
}
|
|
497
|
+
};
|
|
498
|
+
this.stepDisposables.add(inputBox.onDidChange(() => {
|
|
499
|
+
validate();
|
|
500
|
+
}));
|
|
501
|
+
this.stepDisposables.add(addDisposableListener(input, EventType.KEY_DOWN, e => {
|
|
502
|
+
const event = ( new StandardKeyboardEvent(e));
|
|
503
|
+
if (event.keyCode === KeyCode.Enter) {
|
|
504
|
+
e.preventDefault();
|
|
505
|
+
void submitAction.run();
|
|
506
|
+
return;
|
|
507
|
+
}
|
|
508
|
+
if (event.keyCode === KeyCode.Escape) {
|
|
509
|
+
e.preventDefault();
|
|
510
|
+
e.stopPropagation();
|
|
511
|
+
this._logAction("cancelEnterpriseInstancePrompt");
|
|
512
|
+
this.enterpriseSignInWatch = undefined;
|
|
513
|
+
this._setEnterpriseSignInUiState("options");
|
|
514
|
+
}
|
|
515
|
+
}));
|
|
516
|
+
validate();
|
|
517
|
+
}
|
|
518
|
+
_renderEnterpriseSignInProgress(actions) {
|
|
519
|
+
const container = append(actions, $(".onboarding-a-signin-ghe-progress"));
|
|
520
|
+
container.setAttribute("aria-live", "polite");
|
|
521
|
+
const spinner = append(container, $("span"));
|
|
522
|
+
spinner.classList.add(...ThemeIcon.asClassNameArray(Codicon.loading), "codicon-modifier-spin");
|
|
523
|
+
spinner.setAttribute("aria-hidden", "true");
|
|
524
|
+
const message = append(container, $(".onboarding-a-signin-ghe-progress-message"));
|
|
525
|
+
message.textContent = ( localize(
|
|
526
|
+
16336,
|
|
527
|
+
"Waiting for {0} sign-in to complete...",
|
|
528
|
+
defaultChat.provider.enterprise.name
|
|
529
|
+
));
|
|
530
|
+
}
|
|
531
|
+
_getEnterpriseInstancePromptLabel() {
|
|
532
|
+
return localize(16337, "What is your {0} instance?", defaultChat.provider.enterprise.name);
|
|
533
|
+
}
|
|
534
|
+
_setEnterpriseSignInUiState(state) {
|
|
535
|
+
this.enterpriseSignInUiState = state;
|
|
536
|
+
if (this.steps[this.currentStepIndex] === OnboardingStepId.SignIn && this.contentEl) {
|
|
537
|
+
this._renderStep();
|
|
538
|
+
this._updateButtonStates();
|
|
539
|
+
this._focusCurrentStepElement();
|
|
540
|
+
}
|
|
394
541
|
}
|
|
395
542
|
_createSignInButton(parent, providerClass, label, options) {
|
|
396
543
|
const isCompact = options?.iconOnly || options?.textOnly;
|
|
@@ -459,24 +606,42 @@ let OnboardingVariationA = class OnboardingVariationA extends Disposable {
|
|
|
459
606
|
});
|
|
460
607
|
this.notificationService.notify({
|
|
461
608
|
severity: Severity.Error,
|
|
462
|
-
message: ( localize(
|
|
609
|
+
message: ( localize(16338, "Sign-in failed. You can try again later from the Accounts menu."))
|
|
463
610
|
});
|
|
464
611
|
}
|
|
465
612
|
}
|
|
466
613
|
async _handleEnterpriseSignIn() {
|
|
467
|
-
const
|
|
614
|
+
const existingUri = this.configurationService.getValue(defaultChat.providerUriSetting);
|
|
615
|
+
if (typeof existingUri !== "string" || !GHE_FULL_URI_REGEX.test(existingUri)) {
|
|
616
|
+
this.enterpriseInstanceValue = existingUri ?? "";
|
|
617
|
+
this.enterpriseSignInWatch = StopWatch.create();
|
|
618
|
+
this._setEnterpriseSignInUiState("instance");
|
|
619
|
+
return;
|
|
620
|
+
}
|
|
621
|
+
this.enterpriseInstanceValue = existingUri;
|
|
622
|
+
await this._runEnterpriseSignInSetup();
|
|
623
|
+
}
|
|
624
|
+
async _submitEnterpriseInstance(resolvedUri) {
|
|
468
625
|
try {
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
626
|
+
await this.configurationService.updateValue(defaultChat.providerUriSetting, resolvedUri, ConfigurationTarget.USER);
|
|
627
|
+
this.enterpriseInstanceValue = resolvedUri;
|
|
628
|
+
await this._runEnterpriseSignInSetup();
|
|
629
|
+
} catch {
|
|
630
|
+
this.enterpriseSignInWatch = undefined;
|
|
631
|
+
this._setEnterpriseSignInUiState("instance");
|
|
632
|
+
this._notifyEnterpriseSignInError();
|
|
633
|
+
}
|
|
634
|
+
}
|
|
635
|
+
async _runEnterpriseSignInSetup() {
|
|
636
|
+
const watch = this.enterpriseSignInWatch ?? StopWatch.create();
|
|
637
|
+
const provider = defaultChat.provider.enterprise.id;
|
|
638
|
+
this._setEnterpriseSignInUiState("progress");
|
|
639
|
+
try {
|
|
640
|
+
const success = await this.commandService.executeCommand("workbench.action.chat.triggerSetup", undefined, {
|
|
641
|
+
disableChatViewReveal: true,
|
|
642
|
+
setupStrategy: ChatSetupStrategy.SetupWithEnterpriseProvider
|
|
478
643
|
});
|
|
479
|
-
if (
|
|
644
|
+
if (success) {
|
|
480
645
|
this._userSignedIn = true;
|
|
481
646
|
this.telemetryService.publicLog2("commandCenter.chatInstall", {
|
|
482
647
|
installResult: "installed",
|
|
@@ -484,99 +649,54 @@ let OnboardingVariationA = class OnboardingVariationA extends Disposable {
|
|
|
484
649
|
signUpErrorCode: undefined,
|
|
485
650
|
provider
|
|
486
651
|
});
|
|
487
|
-
this.commandService.executeCommand("workbench.action.chat.triggerSetup", undefined, {
|
|
488
|
-
disableChatViewReveal: true,
|
|
489
|
-
setupStrategy: ChatSetupStrategy.DefaultSetup
|
|
490
|
-
});
|
|
491
652
|
this._nextStep();
|
|
653
|
+
} else {
|
|
654
|
+
this._setEnterpriseSignInUiState("options");
|
|
492
655
|
}
|
|
493
656
|
} catch (error) {
|
|
494
657
|
if (isCancellationError(error)) {
|
|
658
|
+
this._setEnterpriseSignInUiState("options");
|
|
495
659
|
this.telemetryService.publicLog2("commandCenter.chatInstall", {
|
|
496
660
|
installResult: "cancelled",
|
|
497
661
|
installDuration: watch.elapsed(),
|
|
498
662
|
signUpErrorCode: undefined,
|
|
499
|
-
provider
|
|
663
|
+
provider
|
|
500
664
|
});
|
|
501
665
|
return;
|
|
502
666
|
}
|
|
667
|
+
this._setEnterpriseSignInUiState("instance");
|
|
503
668
|
this.telemetryService.publicLog2("commandCenter.chatInstall", {
|
|
504
669
|
installResult: "failedNotSignedIn",
|
|
505
670
|
installDuration: watch.elapsed(),
|
|
506
671
|
signUpErrorCode: undefined,
|
|
507
|
-
provider
|
|
508
|
-
});
|
|
509
|
-
this.notificationService.notify({
|
|
510
|
-
severity: Severity.Error,
|
|
511
|
-
message: ( localize(
|
|
512
|
-
16124,
|
|
513
|
-
"GitHub Enterprise sign-in failed. Check your instance URL and try again."
|
|
514
|
-
))
|
|
672
|
+
provider
|
|
515
673
|
});
|
|
674
|
+
this._notifyEnterpriseSignInError();
|
|
675
|
+
} finally {
|
|
676
|
+
this.enterpriseSignInWatch = undefined;
|
|
516
677
|
}
|
|
517
678
|
}
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
let isSingleWord = false;
|
|
526
|
-
const result = await this.quickInputService.input({
|
|
527
|
-
prompt: ( localize(16125, "What is your {0} instance?", defaultChat.provider.enterprise.name)),
|
|
528
|
-
placeHolder: ( localize(16126, "i.e. \"octocat\" or \"https://octocat.ghe.com\"...")),
|
|
529
|
-
ignoreFocusLost: true,
|
|
530
|
-
value: uri,
|
|
531
|
-
validateInput: async value => {
|
|
532
|
-
isSingleWord = false;
|
|
533
|
-
if (!value) {
|
|
534
|
-
return undefined;
|
|
535
|
-
}
|
|
536
|
-
if (domainRegEx.test(value)) {
|
|
537
|
-
isSingleWord = true;
|
|
538
|
-
return {
|
|
539
|
-
content: ( localize(16127, "Will resolve to {0}", `https://${value}.ghe.com`)),
|
|
540
|
-
severity: Severity.Info
|
|
541
|
-
};
|
|
542
|
-
}
|
|
543
|
-
if (!fullUriRegEx.test(value)) {
|
|
544
|
-
return {
|
|
545
|
-
content: ( localize(
|
|
546
|
-
16128,
|
|
547
|
-
"You must enter a valid {0} instance (i.e. \"octocat\" or \"https://octocat.ghe.com\")",
|
|
548
|
-
defaultChat.provider.enterprise.name
|
|
549
|
-
)),
|
|
550
|
-
severity: Severity.Error
|
|
551
|
-
};
|
|
552
|
-
}
|
|
553
|
-
return undefined;
|
|
554
|
-
}
|
|
679
|
+
_notifyEnterpriseSignInError() {
|
|
680
|
+
this.notificationService.notify({
|
|
681
|
+
severity: Severity.Error,
|
|
682
|
+
message: ( localize(
|
|
683
|
+
16339,
|
|
684
|
+
"GitHub Enterprise sign-in failed. Check your instance URL and try again."
|
|
685
|
+
))
|
|
555
686
|
});
|
|
556
|
-
if (!result) {
|
|
557
|
-
return false;
|
|
558
|
-
}
|
|
559
|
-
let resolvedUri = result;
|
|
560
|
-
if (isSingleWord) {
|
|
561
|
-
resolvedUri = `https://${resolvedUri}.ghe.com`;
|
|
562
|
-
} else if (!result.toLowerCase().startsWith("https://")) {
|
|
563
|
-
resolvedUri = `https://${result}`;
|
|
564
|
-
}
|
|
565
|
-
await this.configurationService.updateValue(defaultChat.providerUriSetting, resolvedUri, ConfigurationTarget.USER);
|
|
566
|
-
return true;
|
|
567
687
|
}
|
|
568
688
|
_renderPersonalizeStep(container) {
|
|
569
689
|
const wrapper = append(container, $(".onboarding-a-personalize"));
|
|
570
690
|
const themeLabel = append(wrapper, $("div.onboarding-a-section-label"));
|
|
571
|
-
themeLabel.textContent = ( localize(
|
|
691
|
+
themeLabel.textContent = ( localize(16340, "Color Theme"));
|
|
572
692
|
const themeHint = append(wrapper, $("div.onboarding-a-theme-hint"));
|
|
573
693
|
themeHint.textContent = ( localize(
|
|
574
|
-
|
|
694
|
+
16341,
|
|
575
695
|
"You can browse and install more themes later from the Extensions view."
|
|
576
696
|
));
|
|
577
697
|
const themeGrid = append(wrapper, $(".onboarding-a-theme-grid"));
|
|
578
698
|
themeGrid.setAttribute("role", "radiogroup");
|
|
579
|
-
themeGrid.setAttribute("aria-label", ( localize(
|
|
699
|
+
themeGrid.setAttribute("aria-label", ( localize(16342, "Choose a color theme")));
|
|
580
700
|
const hasOtherEditors = this._hasOtherEditors();
|
|
581
701
|
const allThemes = product.onboardingThemes ?? [];
|
|
582
702
|
const themes = hasOtherEditors ? allThemes.filter(t => !t.id.startsWith("solarized")) : allThemes;
|
|
@@ -596,15 +716,15 @@ let OnboardingVariationA = class OnboardingVariationA extends Disposable {
|
|
|
596
716
|
wrapper,
|
|
597
717
|
$("div.onboarding-a-section-label.onboarding-a-section-label-keymap")
|
|
598
718
|
);
|
|
599
|
-
keymapLabel.textContent = ( localize(
|
|
719
|
+
keymapLabel.textContent = ( localize(16343, "Keyboard Mapping"));
|
|
600
720
|
const keymapHint = append(wrapper, $("div.onboarding-a-theme-hint"));
|
|
601
721
|
keymapHint.textContent = ( localize(
|
|
602
|
-
|
|
722
|
+
16344,
|
|
603
723
|
"Coming from another editor? Import your keyboard mapping to feel right at home."
|
|
604
724
|
));
|
|
605
725
|
const keymapList = append(wrapper, $(".onboarding-a-keymap-list"));
|
|
606
726
|
keymapList.setAttribute("role", "radiogroup");
|
|
607
|
-
keymapList.setAttribute("aria-label", ( localize(
|
|
727
|
+
keymapList.setAttribute("aria-label", ( localize(16345, "Choose a keyboard mapping")));
|
|
608
728
|
const keymapPills = [];
|
|
609
729
|
for (const keymap of keymapOptions) {
|
|
610
730
|
const pill = this._registerStepFocusable(append(keymapList, $("button.onboarding-a-keymap-pill")));
|
|
@@ -627,7 +747,7 @@ let OnboardingVariationA = class OnboardingVariationA extends Disposable {
|
|
|
627
747
|
}
|
|
628
748
|
pill.classList.add("selected");
|
|
629
749
|
pill.setAttribute("aria-checked", "true");
|
|
630
|
-
this.accessibilityService.alert(( localize(
|
|
750
|
+
this.accessibilityService.alert(( localize(16346, "{0} keyboard mapping selected", keymap.label)));
|
|
631
751
|
}));
|
|
632
752
|
}
|
|
633
753
|
const selectedKeymapIndex = keymapOptions.findIndex(k => k.id === this.selectedKeymapId);
|
|
@@ -637,7 +757,7 @@ let OnboardingVariationA = class OnboardingVariationA extends Disposable {
|
|
|
637
757
|
_renderPersonalizeSubtitle(container) {
|
|
638
758
|
clearNode(container);
|
|
639
759
|
const modifier = isMacintosh ? "Cmd" : "Ctrl";
|
|
640
|
-
container.append(( localize(
|
|
760
|
+
container.append(( localize(16347, "Tip: Press ")), this._createKbd(( localize(16348, "{0}", modifier))), "+", this._createKbd(( localize(16349, "Shift"))), "+", this._createKbd(( localize(16350, "P"))), ( localize(16351, " to access all VS Code commands.")));
|
|
641
761
|
}
|
|
642
762
|
_createThemeCard(parent, theme, allCards) {
|
|
643
763
|
const card = this._registerStepFocusable(append(parent, $("div.onboarding-a-theme-card")));
|
|
@@ -665,7 +785,7 @@ let OnboardingVariationA = class OnboardingVariationA extends Disposable {
|
|
|
665
785
|
}
|
|
666
786
|
card.classList.add("selected");
|
|
667
787
|
card.setAttribute("aria-checked", "true");
|
|
668
|
-
this.accessibilityService.alert(( localize(
|
|
788
|
+
this.accessibilityService.alert(( localize(16352, "{0} theme selected", theme.label)));
|
|
669
789
|
}));
|
|
670
790
|
this.stepDisposables.add(addDisposableListener(card, EventType.KEY_DOWN, e => {
|
|
671
791
|
if (e.key === "Enter" || e.key === " ") {
|
|
@@ -702,7 +822,7 @@ let OnboardingVariationA = class OnboardingVariationA extends Disposable {
|
|
|
702
822
|
this.notificationService.notify({
|
|
703
823
|
severity: Severity.Warning,
|
|
704
824
|
message: ( localize(
|
|
705
|
-
|
|
825
|
+
16353,
|
|
706
826
|
"Could not install {0} keymap. You can install it later from Extensions.",
|
|
707
827
|
keymap.label
|
|
708
828
|
))
|
|
@@ -825,7 +945,7 @@ let OnboardingVariationA = class OnboardingVariationA extends Disposable {
|
|
|
825
945
|
const wrapper = append(container, $(".onboarding-a-ai-pref"));
|
|
826
946
|
const cards = append(wrapper, $(".onboarding-a-ai-pref-cards"));
|
|
827
947
|
cards.setAttribute("role", "radiogroup");
|
|
828
|
-
cards.setAttribute("aria-label", ( localize(
|
|
948
|
+
cards.setAttribute("aria-label", ( localize(16354, "Choose your AI collaboration style")));
|
|
829
949
|
const allCards = [];
|
|
830
950
|
for (const option of ONBOARDING_AI_PREFERENCE_OPTIONS) {
|
|
831
951
|
const card = this._registerStepFocusable(append(cards, $("button.onboarding-a-ai-pref-card")));
|
|
@@ -853,13 +973,13 @@ let OnboardingVariationA = class OnboardingVariationA extends Disposable {
|
|
|
853
973
|
c.setAttribute("aria-checked", c.dataset.id === option.id ? "true" : "false");
|
|
854
974
|
}
|
|
855
975
|
this._applyAiPreference(option.id);
|
|
856
|
-
this.accessibilityService.alert(( localize(
|
|
976
|
+
this.accessibilityService.alert(( localize(16355, "{0} selected", option.label)));
|
|
857
977
|
}));
|
|
858
978
|
}
|
|
859
979
|
const selectedAiIndex = ONBOARDING_AI_PREFERENCE_OPTIONS.findIndex(o => o.id === this.selectedAiMode);
|
|
860
980
|
this._setupRadioGroupNavigation(allCards, Math.max(0, selectedAiIndex));
|
|
861
981
|
const hint = append(wrapper, $("div.onboarding-a-ai-pref-hint"));
|
|
862
|
-
hint.textContent = ( localize(
|
|
982
|
+
hint.textContent = ( localize(16356, "You can change this anytime in Settings."));
|
|
863
983
|
}
|
|
864
984
|
_applyAiPreference(mode) {
|
|
865
985
|
switch (mode) {
|
|
@@ -879,7 +999,7 @@ let OnboardingVariationA = class OnboardingVariationA extends Disposable {
|
|
|
879
999
|
const keys = isMacintosh ?
|
|
880
1000
|
["⌘", "⌃", "I"] : ["Ctrl", "Alt", "I"];
|
|
881
1001
|
const shortcut = ( keys.map(k => this._createKbd(k)));
|
|
882
|
-
el.append(( localize(
|
|
1002
|
+
el.append(( localize(16357, "Open Chat anytime with ")));
|
|
883
1003
|
for (let i = 0; i < shortcut.length; i++) {
|
|
884
1004
|
if (i > 0) {
|
|
885
1005
|
el.append("+");
|
|
@@ -892,36 +1012,33 @@ let OnboardingVariationA = class OnboardingVariationA extends Disposable {
|
|
|
892
1012
|
const features = append(wrapper, $(".onboarding-a-sessions-features"));
|
|
893
1013
|
const chatGroup = append(features, $(".onboarding-a-sessions-group"));
|
|
894
1014
|
const chatLabel = append(chatGroup, $("div.onboarding-a-sessions-group-label"));
|
|
895
|
-
chatLabel.textContent = ( localize(
|
|
1015
|
+
chatLabel.textContent = ( localize(16358, "Agents made for the task"));
|
|
896
1016
|
const chatGrid = append(chatGroup, $(".onboarding-a-sessions-grid.onboarding-a-sessions-grid-2"));
|
|
897
|
-
this._createFeatureCard(chatGrid, Codicon.listOrdered, ( localize(
|
|
898
|
-
|
|
899
|
-
"Produce a structured implementation plan before any code changes, then hand it off to an
|
|
1017
|
+
this._createFeatureCard(chatGrid, Codicon.listOrdered, ( localize(16359, "Plan")), ( localize(
|
|
1018
|
+
16360,
|
|
1019
|
+
"Produce a structured implementation plan before any code changes, then hand it off to an agent to execute."
|
|
900
1020
|
)));
|
|
901
|
-
this._createFeatureCard(chatGrid, Codicon.commentDiscussion, ( localize(
|
|
902
|
-
|
|
1021
|
+
this._createFeatureCard(chatGrid, Codicon.commentDiscussion, ( localize(16361, "Agent")), ( localize(
|
|
1022
|
+
16362,
|
|
903
1023
|
"Describe a goal. The agent plans the approach, edits files, runs commands, and self-corrects. You review and approve along the way."
|
|
904
1024
|
)));
|
|
905
1025
|
const moreGroup = append(features, $(".onboarding-a-sessions-group"));
|
|
906
1026
|
const moreLabel = append(moreGroup, $("div.onboarding-a-sessions-group-label"));
|
|
907
|
-
moreLabel.textContent = ( localize(
|
|
1027
|
+
moreLabel.textContent = ( localize(16363, "Agents that work your way"));
|
|
908
1028
|
const moreGrid = append(moreGroup, $(".onboarding-a-sessions-grid.onboarding-a-sessions-grid-2"));
|
|
909
|
-
this._createFeatureCard(moreGrid, Codicon.rocket, ( localize(
|
|
910
|
-
|
|
1029
|
+
this._createFeatureCard(moreGrid, Codicon.rocket, ( localize(16364, "Run Agents Anywhere")), ( localize(
|
|
1030
|
+
16365,
|
|
911
1031
|
"Run agents locally for interactive work, in the background with Copilot CLI, or in the cloud with cloud agents that open a pull request your team can review."
|
|
912
1032
|
)));
|
|
913
|
-
this._createFeatureCard(moreGrid, Codicon.settingsGear, ( localize(
|
|
914
|
-
|
|
1033
|
+
this._createFeatureCard(moreGrid, Codicon.settingsGear, ( localize(16366, "Customize Your Agents")), ( localize(
|
|
1034
|
+
16367,
|
|
915
1035
|
"Tailor Copilot to your project with custom instructions and agents, skills, reusable prompts, and MCP servers that connect to the tools and context you rely on."
|
|
916
1036
|
)));
|
|
917
1037
|
const docsRow = append(wrapper, $(".onboarding-a-sessions-docs"));
|
|
918
|
-
this._createDocLink(docsRow, ( localize(
|
|
1038
|
+
this._createDocLink(docsRow, ( localize(16368, "Agents tutorial")), "https://code.visualstudio.com/docs/copilot/agents/agents-tutorial", "agentsTutorial");
|
|
919
1039
|
}
|
|
920
1040
|
_createFeatureCard(parent, icon, title, description) {
|
|
921
|
-
const card =
|
|
922
|
-
card.setAttribute("tabindex", "0");
|
|
923
|
-
card.setAttribute("role", "group");
|
|
924
|
-
card.setAttribute("aria-label", title);
|
|
1041
|
+
const card = append(parent, $("div.onboarding-a-feature-card"));
|
|
925
1042
|
const iconCol = append(card, $("div.onboarding-a-feature-icon"));
|
|
926
1043
|
iconCol.appendChild(renderIcon(icon));
|
|
927
1044
|
const textCol = append(card, $("div.onboarding-a-feature-text"));
|
|
@@ -1061,6 +1178,9 @@ let OnboardingVariationA = class OnboardingVariationA extends Disposable {
|
|
|
1061
1178
|
this._footerSignInBtn = undefined;
|
|
1062
1179
|
this.footerFocusableElements.length = 0;
|
|
1063
1180
|
this.stepFocusableElements.length = 0;
|
|
1181
|
+
this.enterpriseSignInUiState = "options";
|
|
1182
|
+
this.enterpriseInstanceValue = "";
|
|
1183
|
+
this.enterpriseSignInWatch = undefined;
|
|
1064
1184
|
this._isShowing = false;
|
|
1065
1185
|
this.disposables.clear();
|
|
1066
1186
|
this.stepDisposables.clear();
|
|
@@ -1075,6 +1195,6 @@ let OnboardingVariationA = class OnboardingVariationA extends Disposable {
|
|
|
1075
1195
|
super.dispose();
|
|
1076
1196
|
}
|
|
1077
1197
|
};
|
|
1078
|
-
OnboardingVariationA = ( __decorate([( __param(0, ILayoutService)), ( __param(1, IWorkbenchThemeService)), ( __param(2, IDefaultAccountService)), ( __param(3, IExtensionGalleryService)), ( __param(4, IExtensionManagementService)), ( __param(5, IConfigurationService)), ( __param(6, INotificationService)), ( __param(7,
|
|
1198
|
+
OnboardingVariationA = OnboardingVariationA_1 = ( __decorate([( __param(0, ILayoutService)), ( __param(1, IWorkbenchThemeService)), ( __param(2, IDefaultAccountService)), ( __param(3, IExtensionGalleryService)), ( __param(4, IExtensionManagementService)), ( __param(5, IConfigurationService)), ( __param(6, INotificationService)), ( __param(7, IFileService)), ( __param(8, IPathService)), ( __param(9, ITelemetryService)), ( __param(10, ICommandService)), ( __param(11, IAccessibilityService))], OnboardingVariationA));
|
|
1079
1199
|
|
|
1080
1200
|
export { OnboardingVariationA };
|
package/vscode/src/vs/workbench/contrib/welcomeOnboarding/browser/welcomeOnboarding.contribution.js
CHANGED
|
@@ -13,7 +13,7 @@ registerAction2(class extends Action2 {
|
|
|
13
13
|
constructor() {
|
|
14
14
|
super({
|
|
15
15
|
id: "workbench.action.welcomeOnboarding2026",
|
|
16
|
-
title: ( localize2(
|
|
16
|
+
title: ( localize2(16369, "Welcome Onboarding 2026")),
|
|
17
17
|
category: Categories.Developer,
|
|
18
18
|
f1: true
|
|
19
19
|
});
|
|
@@ -18,13 +18,13 @@ import { Extensions } from '@codingame/monaco-vscode-api/vscode/vs/workbench/com
|
|
|
18
18
|
import { LifecyclePhase } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/lifecycle/common/lifecycle';
|
|
19
19
|
|
|
20
20
|
var NewFileTemplatesManager_1;
|
|
21
|
-
const builtInSource = ( localize(
|
|
22
|
-
const category = ( localize2(
|
|
21
|
+
const builtInSource = ( localize(16384, "Built-In"));
|
|
22
|
+
const category = ( localize2(16385, "Create"));
|
|
23
23
|
registerAction2(class extends Action2 {
|
|
24
24
|
constructor() {
|
|
25
25
|
super({
|
|
26
26
|
id: "welcome.showNewFileEntries",
|
|
27
|
-
title: ( localize2(
|
|
27
|
+
title: ( localize2(16386, "New File...")),
|
|
28
28
|
category,
|
|
29
29
|
f1: true,
|
|
30
30
|
precondition: ( IsSessionsWindowContext.negate()),
|
|
@@ -108,8 +108,8 @@ let NewFileTemplatesManager = class NewFileTemplatesManager extends Disposable {
|
|
|
108
108
|
const qp = this.quickInputService.createQuickPick({
|
|
109
109
|
useSeparators: true
|
|
110
110
|
});
|
|
111
|
-
qp.title = ( localize(
|
|
112
|
-
qp.placeholder = ( localize(
|
|
111
|
+
qp.title = ( localize(16387, "New File..."));
|
|
112
|
+
qp.placeholder = ( localize(16388, "Select File Type or Enter File Name..."));
|
|
113
113
|
qp.sortByLabel = false;
|
|
114
114
|
qp.matchOnDetail = true;
|
|
115
115
|
qp.matchOnDescription = true;
|
|
@@ -136,8 +136,8 @@ let NewFileTemplatesManager = class NewFileTemplatesManager extends Disposable {
|
|
|
136
136
|
return a.from.localeCompare(b.from);
|
|
137
137
|
};
|
|
138
138
|
const displayCategory = {
|
|
139
|
-
"file": ( localize(
|
|
140
|
-
"notebook": ( localize(
|
|
139
|
+
"file": ( localize(16389, "File")),
|
|
140
|
+
"notebook": ( localize(16390, "Notebook"))
|
|
141
141
|
};
|
|
142
142
|
const refreshQp = entries => {
|
|
143
143
|
const items = [];
|
|
@@ -159,7 +159,7 @@ let NewFileTemplatesManager = class NewFileTemplatesManager extends Disposable {
|
|
|
159
159
|
keybinding,
|
|
160
160
|
buttons: command ? [{
|
|
161
161
|
iconClass: "codicon codicon-gear",
|
|
162
|
-
tooltip: ( localize(
|
|
162
|
+
tooltip: ( localize(16391, "Configure Keybinding"))
|
|
163
163
|
}] : [],
|
|
164
164
|
detail: "",
|
|
165
165
|
description: entry.from
|
|
@@ -181,7 +181,7 @@ let NewFileTemplatesManager = class NewFileTemplatesManager extends Disposable {
|
|
|
181
181
|
viewType: undefined,
|
|
182
182
|
fileName: val
|
|
183
183
|
},
|
|
184
|
-
title: ( localize(
|
|
184
|
+
title: ( localize(16392, "Create New File ({0})", val)),
|
|
185
185
|
group: "file",
|
|
186
186
|
from: builtInSource
|
|
187
187
|
};
|
|
@@ -215,7 +215,7 @@ MenuRegistry.appendMenuItem(MenuId.NewFile, {
|
|
|
215
215
|
group: "file",
|
|
216
216
|
command: {
|
|
217
217
|
id: "workbench.action.files.newUntitledFile",
|
|
218
|
-
title: ( localize(
|
|
218
|
+
title: ( localize(16393, "Text File"))
|
|
219
219
|
},
|
|
220
220
|
order: 1
|
|
221
221
|
});
|
|
@@ -63,7 +63,7 @@ function parseGroupAndOrder(welcome, contribution) {
|
|
|
63
63
|
if (welcome.group) {
|
|
64
64
|
if (!isProposedApiEnabled(contribution.description)) {
|
|
65
65
|
contribution.collector.warn(( localize(
|
|
66
|
-
|
|
66
|
+
16394,
|
|
67
67
|
"The viewsWelcome contribution in '{0}' requires 'enabledApiProposals: [\"contribViewsWelcome\"]' in order to use the 'group' proposed property.",
|
|
68
68
|
contribution.description.identifier.value
|
|
69
69
|
)));
|
|
@@ -20,12 +20,12 @@ const ViewIdentifierMap = {
|
|
|
20
20
|
const viewsWelcomeExtensionPointSchema = ( Object.freeze({
|
|
21
21
|
type: "array",
|
|
22
22
|
description: ( localize(
|
|
23
|
-
|
|
23
|
+
16395,
|
|
24
24
|
"Contributed views welcome content. Welcome content will be rendered in tree based views whenever they have no meaningful content to display, ie. the File Explorer when no folder is open. Such content is useful as in-product documentation to drive users to use certain features before they are available. A good example would be a `Clone Repository` button in the File Explorer welcome view."
|
|
25
25
|
)),
|
|
26
26
|
items: {
|
|
27
27
|
type: "object",
|
|
28
|
-
description: ( localize(
|
|
28
|
+
description: ( localize(16396, "Contributed welcome content for a specific view.")),
|
|
29
29
|
required: [
|
|
30
30
|
ViewsWelcomeExtensionPointFields.view,
|
|
31
31
|
ViewsWelcomeExtensionPointFields.contents
|
|
@@ -35,13 +35,13 @@ const viewsWelcomeExtensionPointSchema = ( Object.freeze({
|
|
|
35
35
|
anyOf: [{
|
|
36
36
|
type: "string",
|
|
37
37
|
description: ( localize(
|
|
38
|
-
|
|
38
|
+
16397,
|
|
39
39
|
"Target view identifier for this welcome content. Only tree based views are supported."
|
|
40
40
|
))
|
|
41
41
|
}, {
|
|
42
42
|
type: "string",
|
|
43
43
|
description: ( localize(
|
|
44
|
-
|
|
44
|
+
16397,
|
|
45
45
|
"Target view identifier for this welcome content. Only tree based views are supported."
|
|
46
46
|
)),
|
|
47
47
|
enum: ( Object.keys(ViewIdentifierMap))
|
|
@@ -50,22 +50,22 @@ const viewsWelcomeExtensionPointSchema = ( Object.freeze({
|
|
|
50
50
|
[ViewsWelcomeExtensionPointFields.contents]: {
|
|
51
51
|
type: "string",
|
|
52
52
|
description: ( localize(
|
|
53
|
-
|
|
53
|
+
16398,
|
|
54
54
|
"Welcome content to be displayed. The format of the contents is a subset of Markdown, with support for links only."
|
|
55
55
|
))
|
|
56
56
|
},
|
|
57
57
|
[ViewsWelcomeExtensionPointFields.when]: {
|
|
58
58
|
type: "string",
|
|
59
|
-
description: ( localize(
|
|
59
|
+
description: ( localize(16399, "Condition when the welcome content should be displayed."))
|
|
60
60
|
},
|
|
61
61
|
[ViewsWelcomeExtensionPointFields.group]: {
|
|
62
62
|
type: "string",
|
|
63
|
-
description: ( localize(
|
|
63
|
+
description: ( localize(16400, "Group to which this welcome content belongs. Proposed API."))
|
|
64
64
|
},
|
|
65
65
|
[ViewsWelcomeExtensionPointFields.enablement]: {
|
|
66
66
|
type: "string",
|
|
67
67
|
description: ( localize(
|
|
68
|
-
|
|
68
|
+
16401,
|
|
69
69
|
"Condition when the welcome content buttons and command links should be enabled."
|
|
70
70
|
))
|
|
71
71
|
}
|