@codingame/monaco-vscode-welcome-service-override 32.0.2 → 34.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/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 +269 -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,21 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-welcome-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "34.0.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor - welcome service-override",
|
|
6
6
|
"keywords": [],
|
|
7
|
+
"license": "MIT",
|
|
7
8
|
"author": {
|
|
8
9
|
"name": "CodinGame",
|
|
9
10
|
"url": "http://www.codingame.com"
|
|
10
11
|
},
|
|
11
|
-
"license": "MIT",
|
|
12
12
|
"repository": {
|
|
13
13
|
"type": "git",
|
|
14
14
|
"url": "git+ssh://git@github.com/CodinGame/monaco-vscode-api.git"
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codingame/monaco-vscode-api": "
|
|
18
|
+
"@codingame/monaco-vscode-api": "34.0.0"
|
|
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,35 +12,43 @@ 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';
|
|
24
|
+
import { GitHubPaths } from '@codingame/monaco-vscode-api/vscode/vs/platform/defaultAccount/common/defaultAccount';
|
|
21
25
|
import { IDefaultAccountService } from '@codingame/monaco-vscode-api/vscode/vs/platform/defaultAccount/common/defaultAccount.service';
|
|
22
26
|
import { CancellationToken } from '@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation';
|
|
23
27
|
import '@codingame/monaco-vscode-api/vscode/vs/platform/notification/common/notification';
|
|
24
28
|
import { INotificationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/notification/common/notification.service';
|
|
25
29
|
import { ConfigurationTarget } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration';
|
|
26
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';
|
|
27
32
|
import product from '@codingame/monaco-vscode-api/vscode/vs/platform/product/common/product';
|
|
28
|
-
import { IQuickInputService } from '@codingame/monaco-vscode-api/vscode/vs/platform/quickinput/common/quickInput.service';
|
|
29
33
|
import { IFileService } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service';
|
|
30
34
|
import { IPathService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/path/common/pathService.service';
|
|
31
35
|
import { ITelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service';
|
|
32
36
|
import { ChatSetupStrategy } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatSetup/chatSetup';
|
|
33
37
|
import { ICommandService } from '@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service';
|
|
34
38
|
import { IAccessibilityService } from '@codingame/monaco-vscode-api/vscode/vs/platform/accessibility/common/accessibility.service';
|
|
35
|
-
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';
|
|
36
40
|
import Severity from '@codingame/monaco-vscode-api/vscode/vs/base/common/severity';
|
|
37
41
|
|
|
42
|
+
var OnboardingVariationA_1;
|
|
38
43
|
assertDefined(
|
|
39
44
|
product.defaultChatAgent,
|
|
40
45
|
"Onboarding requires a default chat agent product configuration."
|
|
41
46
|
);
|
|
42
47
|
const defaultChat = product.defaultChatAgent;
|
|
43
48
|
let OnboardingVariationA = class OnboardingVariationA extends Disposable {
|
|
49
|
+
static {
|
|
50
|
+
OnboardingVariationA_1 = this;
|
|
51
|
+
}
|
|
44
52
|
constructor(
|
|
45
53
|
layoutService,
|
|
46
54
|
themeService,
|
|
@@ -49,7 +57,6 @@ let OnboardingVariationA = class OnboardingVariationA extends Disposable {
|
|
|
49
57
|
extensionManagementService,
|
|
50
58
|
configurationService,
|
|
51
59
|
notificationService,
|
|
52
|
-
quickInputService,
|
|
53
60
|
fileService,
|
|
54
61
|
pathService,
|
|
55
62
|
telemetryService,
|
|
@@ -64,7 +71,6 @@ let OnboardingVariationA = class OnboardingVariationA extends Disposable {
|
|
|
64
71
|
this.extensionManagementService = extensionManagementService;
|
|
65
72
|
this.configurationService = configurationService;
|
|
66
73
|
this.notificationService = notificationService;
|
|
67
|
-
this.quickInputService = quickInputService;
|
|
68
74
|
this.fileService = fileService;
|
|
69
75
|
this.pathService = pathService;
|
|
70
76
|
this.telemetryService = telemetryService;
|
|
@@ -85,6 +91,8 @@ let OnboardingVariationA = class OnboardingVariationA extends Disposable {
|
|
|
85
91
|
this.selectedKeymapId = "vscode";
|
|
86
92
|
this._userSignedIn = false;
|
|
87
93
|
this.selectedAiMode = AiCollaborationMode.Balanced;
|
|
94
|
+
this.enterpriseSignInUiState = "options";
|
|
95
|
+
this.enterpriseInstanceValue = "";
|
|
88
96
|
const currentTheme = this.themeService.getColorTheme();
|
|
89
97
|
const allThemes = product.onboardingThemes ?? [];
|
|
90
98
|
const matchingTheme = allThemes.find(t => t.themeId === currentTheme.settingsId);
|
|
@@ -108,11 +116,11 @@ let OnboardingVariationA = class OnboardingVariationA extends Disposable {
|
|
|
108
116
|
this.overlay = append(container, $(".onboarding-a-overlay"));
|
|
109
117
|
this.overlay.setAttribute("role", "dialog");
|
|
110
118
|
this.overlay.setAttribute("aria-modal", "true");
|
|
111
|
-
this.overlay.setAttribute("aria-label", ( localize(
|
|
119
|
+
this.overlay.setAttribute("aria-label", ( localize(16303, "Welcome to Visual Studio Code")));
|
|
112
120
|
this.card = append(this.overlay, $(".onboarding-a-card"));
|
|
113
121
|
this.closeButton = append(this.card, $("button.onboarding-a-close-btn"));
|
|
114
122
|
this.closeButton.type = "button";
|
|
115
|
-
this.closeButton.setAttribute("aria-label", ( localize(
|
|
123
|
+
this.closeButton.setAttribute("aria-label", ( localize(16304, "Close")));
|
|
116
124
|
this.closeButton.appendChild(renderIcon(Codicon.close));
|
|
117
125
|
const header = append(this.card, $(".onboarding-a-header"));
|
|
118
126
|
this.progressContainer = append(header, $(".onboarding-a-progress"));
|
|
@@ -128,7 +136,7 @@ let OnboardingVariationA = class OnboardingVariationA extends Disposable {
|
|
|
128
136
|
this.footerLeft = append(footer, $(".onboarding-a-footer-left"));
|
|
129
137
|
const footerRight = append(footer, $(".onboarding-a-footer-right"));
|
|
130
138
|
this.backButton = append(footerRight, $("button.onboarding-a-btn.onboarding-a-btn-secondary"));
|
|
131
|
-
this.backButton.textContent = ( localize(
|
|
139
|
+
this.backButton.textContent = ( localize(16305, "Back"));
|
|
132
140
|
this.backButton.type = "button";
|
|
133
141
|
this.footerFocusableElements.push(this.backButton);
|
|
134
142
|
this.nextButton = append(footerRight, $("button.onboarding-a-btn.onboarding-a-btn-primary"));
|
|
@@ -140,6 +148,12 @@ let OnboardingVariationA = class OnboardingVariationA extends Disposable {
|
|
|
140
148
|
this._dismiss("skip");
|
|
141
149
|
}));
|
|
142
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
|
+
}
|
|
143
157
|
this._logAction("back");
|
|
144
158
|
this._prevStep();
|
|
145
159
|
}));
|
|
@@ -206,6 +220,11 @@ let OnboardingVariationA = class OnboardingVariationA extends Disposable {
|
|
|
206
220
|
_nextStep() {
|
|
207
221
|
if (this.currentStepIndex < this.steps.length - 1) {
|
|
208
222
|
const leavingStep = this.steps[this.currentStepIndex];
|
|
223
|
+
if (leavingStep === OnboardingStepId.SignIn) {
|
|
224
|
+
this.enterpriseSignInUiState = "options";
|
|
225
|
+
this.enterpriseInstanceValue = "";
|
|
226
|
+
this.enterpriseSignInWatch = undefined;
|
|
227
|
+
}
|
|
209
228
|
if (leavingStep === OnboardingStepId.Personalize) {
|
|
210
229
|
this._applyKeymap(this.selectedKeymapId);
|
|
211
230
|
}
|
|
@@ -244,7 +263,7 @@ let OnboardingVariationA = class OnboardingVariationA extends Disposable {
|
|
|
244
263
|
}
|
|
245
264
|
}
|
|
246
265
|
this.progressContainer.appendChild(this.stepLabelEl);
|
|
247
|
-
this.stepLabelEl.textContent = ( localize(
|
|
266
|
+
this.stepLabelEl.textContent = ( localize(16306, "{0} of {1}", this.currentStepIndex + 1, this.steps.length));
|
|
248
267
|
}
|
|
249
268
|
_renderStep() {
|
|
250
269
|
if (!this.titleEl || !this.subtitleEl || !this.contentEl) {
|
|
@@ -280,7 +299,7 @@ let OnboardingVariationA = class OnboardingVariationA extends Disposable {
|
|
|
280
299
|
break;
|
|
281
300
|
}
|
|
282
301
|
this.bodyEl?.setAttribute("aria-label", ( localize(
|
|
283
|
-
|
|
302
|
+
16307,
|
|
284
303
|
"Step {0} of {1}: {2}",
|
|
285
304
|
this.currentStepIndex + 1,
|
|
286
305
|
this.steps.length,
|
|
@@ -289,18 +308,24 @@ let OnboardingVariationA = class OnboardingVariationA extends Disposable {
|
|
|
289
308
|
}
|
|
290
309
|
_updateButtonStates() {
|
|
291
310
|
if (this.backButton) {
|
|
292
|
-
|
|
311
|
+
const showEnterpriseBack = this.currentStepIndex === 0 && this.enterpriseSignInUiState === "instance";
|
|
312
|
+
this.backButton.style.display = (this.currentStepIndex === 0 && !showEnterpriseBack) ? "none" : "";
|
|
293
313
|
}
|
|
294
314
|
if (this.nextButton) {
|
|
295
315
|
if (this.currentStepIndex === 0) {
|
|
296
|
-
this.
|
|
297
|
-
|
|
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
|
+
}
|
|
298
323
|
} else if (this._isLastStep()) {
|
|
299
324
|
this.nextButton.className = "onboarding-a-btn onboarding-a-btn-primary";
|
|
300
|
-
this.nextButton.textContent = ( localize(
|
|
325
|
+
this.nextButton.textContent = ( localize(16310, "Get Started"));
|
|
301
326
|
} else {
|
|
302
327
|
this.nextButton.className = "onboarding-a-btn onboarding-a-btn-primary";
|
|
303
|
-
this.nextButton.textContent = ( localize(
|
|
328
|
+
this.nextButton.textContent = ( localize(16311, "Continue"));
|
|
304
329
|
}
|
|
305
330
|
}
|
|
306
331
|
if (this.footerLeft) {
|
|
@@ -308,7 +333,7 @@ let OnboardingVariationA = class OnboardingVariationA extends Disposable {
|
|
|
308
333
|
if (!this._footerSignInBtn && !this._userSignedIn) {
|
|
309
334
|
this._footerSignInBtn = append(this.footerLeft, $("button.onboarding-a-signin-nudge-btn"));
|
|
310
335
|
this._footerSignInBtn.type = "button";
|
|
311
|
-
this._footerSignInBtn.textContent = ( localize(
|
|
336
|
+
this._footerSignInBtn.textContent = ( localize(16312, "Sign in for AI Powered Features"));
|
|
312
337
|
this.stepDisposables.add(
|
|
313
338
|
addDisposableListener(this._footerSignInBtn, EventType.CLICK, async () => {
|
|
314
339
|
this._logAction("signInNudge");
|
|
@@ -336,60 +361,183 @@ let OnboardingVariationA = class OnboardingVariationA extends Disposable {
|
|
|
336
361
|
const content = append(wrapper, $(".onboarding-a-signin-content"));
|
|
337
362
|
const contentMain = append(content, $(".onboarding-a-signin-content-main"));
|
|
338
363
|
const title = append(contentMain, $("h2.onboarding-a-signin-title"));
|
|
339
|
-
title.textContent = ( localize(
|
|
364
|
+
title.textContent = ( localize(16313, "Welcome to VS Code"));
|
|
340
365
|
const subtitle = append(contentMain, $("p.onboarding-a-signin-subtitle"));
|
|
341
|
-
subtitle.textContent = ( localize(
|
|
366
|
+
subtitle.textContent = ( localize(16314, "Sign in to use GitHub Copilot."));
|
|
342
367
|
const actions = append(contentMain, $(".onboarding-a-signin-actions"));
|
|
343
|
-
|
|
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")), {
|
|
344
409
|
emphasized: true,
|
|
345
|
-
label: ( localize(
|
|
410
|
+
label: ( localize(16327, "Continue with GitHub"))
|
|
346
411
|
}));
|
|
347
412
|
this.stepDisposables.add(addDisposableListener(githubBtn, EventType.CLICK, () => {
|
|
348
413
|
this._logAction("signIn", undefined, "github");
|
|
349
414
|
this._handleSignIn();
|
|
350
415
|
}));
|
|
351
|
-
const googleBtn = this._registerStepFocusable(this._createSignInButton(actions, "google", ( localize(
|
|
416
|
+
const googleBtn = this._registerStepFocusable(this._createSignInButton(actions, "google", ( localize(16328, "Continue with Google")), {
|
|
352
417
|
iconOnly: true,
|
|
353
|
-
label: ( localize(
|
|
418
|
+
label: ( localize(16328, "Continue with Google"))
|
|
354
419
|
}));
|
|
355
420
|
this.stepDisposables.add(addDisposableListener(googleBtn, EventType.CLICK, () => {
|
|
356
421
|
this._logAction("signIn", undefined, "google");
|
|
357
422
|
this._handleSignIn("google");
|
|
358
423
|
}));
|
|
359
|
-
const appleBtn = this._registerStepFocusable(this._createSignInButton(actions, "apple", ( localize(
|
|
424
|
+
const appleBtn = this._registerStepFocusable(this._createSignInButton(actions, "apple", ( localize(16329, "Continue with Apple")), {
|
|
360
425
|
iconOnly: true,
|
|
361
|
-
label: ( localize(
|
|
426
|
+
label: ( localize(16329, "Continue with Apple"))
|
|
362
427
|
}));
|
|
363
428
|
this.stepDisposables.add(addDisposableListener(appleBtn, EventType.CLICK, () => {
|
|
364
429
|
this._logAction("signIn", undefined, "apple");
|
|
365
430
|
this._handleSignIn("apple");
|
|
366
431
|
}));
|
|
367
|
-
const gheBtn = this._registerStepFocusable(this._createSignInButton(actions, "github-enterprise", ( localize(
|
|
432
|
+
const gheBtn = this._registerStepFocusable(this._createSignInButton(actions, "github-enterprise", ( localize(16330, "GHE")), {
|
|
368
433
|
textOnly: true,
|
|
369
|
-
label: ( localize(
|
|
434
|
+
label: ( localize(16331, "Continue with GitHub Enterprise"))
|
|
370
435
|
}));
|
|
371
436
|
this.stepDisposables.add(addDisposableListener(gheBtn, EventType.CLICK, () => {
|
|
372
437
|
this._logAction("signIn", undefined, "github-enterprise");
|
|
373
|
-
this._handleEnterpriseSignIn();
|
|
438
|
+
void this._handleEnterpriseSignIn();
|
|
374
439
|
}));
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
)));
|
|
383
|
-
this.
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
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
|
+
}
|
|
393
541
|
}
|
|
394
542
|
_createSignInButton(parent, providerClass, label, options) {
|
|
395
543
|
const isCompact = options?.iconOnly || options?.textOnly;
|
|
@@ -458,24 +606,42 @@ let OnboardingVariationA = class OnboardingVariationA extends Disposable {
|
|
|
458
606
|
});
|
|
459
607
|
this.notificationService.notify({
|
|
460
608
|
severity: Severity.Error,
|
|
461
|
-
message: ( localize(
|
|
609
|
+
message: ( localize(16338, "Sign-in failed. You can try again later from the Accounts menu."))
|
|
462
610
|
});
|
|
463
611
|
}
|
|
464
612
|
}
|
|
465
613
|
async _handleEnterpriseSignIn() {
|
|
466
|
-
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) {
|
|
467
625
|
try {
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
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
|
|
477
643
|
});
|
|
478
|
-
if (
|
|
644
|
+
if (success) {
|
|
479
645
|
this._userSignedIn = true;
|
|
480
646
|
this.telemetryService.publicLog2("commandCenter.chatInstall", {
|
|
481
647
|
installResult: "installed",
|
|
@@ -483,99 +649,54 @@ let OnboardingVariationA = class OnboardingVariationA extends Disposable {
|
|
|
483
649
|
signUpErrorCode: undefined,
|
|
484
650
|
provider
|
|
485
651
|
});
|
|
486
|
-
this.commandService.executeCommand("workbench.action.chat.triggerSetup", undefined, {
|
|
487
|
-
disableChatViewReveal: true,
|
|
488
|
-
setupStrategy: ChatSetupStrategy.DefaultSetup
|
|
489
|
-
});
|
|
490
652
|
this._nextStep();
|
|
653
|
+
} else {
|
|
654
|
+
this._setEnterpriseSignInUiState("options");
|
|
491
655
|
}
|
|
492
656
|
} catch (error) {
|
|
493
657
|
if (isCancellationError(error)) {
|
|
658
|
+
this._setEnterpriseSignInUiState("options");
|
|
494
659
|
this.telemetryService.publicLog2("commandCenter.chatInstall", {
|
|
495
660
|
installResult: "cancelled",
|
|
496
661
|
installDuration: watch.elapsed(),
|
|
497
662
|
signUpErrorCode: undefined,
|
|
498
|
-
provider
|
|
663
|
+
provider
|
|
499
664
|
});
|
|
500
665
|
return;
|
|
501
666
|
}
|
|
667
|
+
this._setEnterpriseSignInUiState("instance");
|
|
502
668
|
this.telemetryService.publicLog2("commandCenter.chatInstall", {
|
|
503
669
|
installResult: "failedNotSignedIn",
|
|
504
670
|
installDuration: watch.elapsed(),
|
|
505
671
|
signUpErrorCode: undefined,
|
|
506
|
-
provider
|
|
507
|
-
});
|
|
508
|
-
this.notificationService.notify({
|
|
509
|
-
severity: Severity.Error,
|
|
510
|
-
message: ( localize(
|
|
511
|
-
15992,
|
|
512
|
-
"GitHub Enterprise sign-in failed. Check your instance URL and try again."
|
|
513
|
-
))
|
|
672
|
+
provider
|
|
514
673
|
});
|
|
674
|
+
this._notifyEnterpriseSignInError();
|
|
675
|
+
} finally {
|
|
676
|
+
this.enterpriseSignInWatch = undefined;
|
|
515
677
|
}
|
|
516
678
|
}
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
let isSingleWord = false;
|
|
525
|
-
const result = await this.quickInputService.input({
|
|
526
|
-
prompt: ( localize(15993, "What is your {0} instance?", defaultChat.provider.enterprise.name)),
|
|
527
|
-
placeHolder: ( localize(15994, "i.e. \"octocat\" or \"https://octocat.ghe.com\"...")),
|
|
528
|
-
ignoreFocusLost: true,
|
|
529
|
-
value: uri,
|
|
530
|
-
validateInput: async value => {
|
|
531
|
-
isSingleWord = false;
|
|
532
|
-
if (!value) {
|
|
533
|
-
return undefined;
|
|
534
|
-
}
|
|
535
|
-
if (domainRegEx.test(value)) {
|
|
536
|
-
isSingleWord = true;
|
|
537
|
-
return {
|
|
538
|
-
content: ( localize(15995, "Will resolve to {0}", `https://${value}.ghe.com`)),
|
|
539
|
-
severity: Severity.Info
|
|
540
|
-
};
|
|
541
|
-
}
|
|
542
|
-
if (!fullUriRegEx.test(value)) {
|
|
543
|
-
return {
|
|
544
|
-
content: ( localize(
|
|
545
|
-
15996,
|
|
546
|
-
"You must enter a valid {0} instance (i.e. \"octocat\" or \"https://octocat.ghe.com\")",
|
|
547
|
-
defaultChat.provider.enterprise.name
|
|
548
|
-
)),
|
|
549
|
-
severity: Severity.Error
|
|
550
|
-
};
|
|
551
|
-
}
|
|
552
|
-
return undefined;
|
|
553
|
-
}
|
|
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
|
+
))
|
|
554
686
|
});
|
|
555
|
-
if (!result) {
|
|
556
|
-
return false;
|
|
557
|
-
}
|
|
558
|
-
let resolvedUri = result;
|
|
559
|
-
if (isSingleWord) {
|
|
560
|
-
resolvedUri = `https://${resolvedUri}.ghe.com`;
|
|
561
|
-
} else if (!result.toLowerCase().startsWith("https://")) {
|
|
562
|
-
resolvedUri = `https://${result}`;
|
|
563
|
-
}
|
|
564
|
-
await this.configurationService.updateValue(defaultChat.providerUriSetting, resolvedUri, ConfigurationTarget.USER);
|
|
565
|
-
return true;
|
|
566
687
|
}
|
|
567
688
|
_renderPersonalizeStep(container) {
|
|
568
689
|
const wrapper = append(container, $(".onboarding-a-personalize"));
|
|
569
690
|
const themeLabel = append(wrapper, $("div.onboarding-a-section-label"));
|
|
570
|
-
themeLabel.textContent = ( localize(
|
|
691
|
+
themeLabel.textContent = ( localize(16340, "Color Theme"));
|
|
571
692
|
const themeHint = append(wrapper, $("div.onboarding-a-theme-hint"));
|
|
572
693
|
themeHint.textContent = ( localize(
|
|
573
|
-
|
|
694
|
+
16341,
|
|
574
695
|
"You can browse and install more themes later from the Extensions view."
|
|
575
696
|
));
|
|
576
697
|
const themeGrid = append(wrapper, $(".onboarding-a-theme-grid"));
|
|
577
698
|
themeGrid.setAttribute("role", "radiogroup");
|
|
578
|
-
themeGrid.setAttribute("aria-label", ( localize(
|
|
699
|
+
themeGrid.setAttribute("aria-label", ( localize(16342, "Choose a color theme")));
|
|
579
700
|
const hasOtherEditors = this._hasOtherEditors();
|
|
580
701
|
const allThemes = product.onboardingThemes ?? [];
|
|
581
702
|
const themes = hasOtherEditors ? allThemes.filter(t => !t.id.startsWith("solarized")) : allThemes;
|
|
@@ -595,15 +716,15 @@ let OnboardingVariationA = class OnboardingVariationA extends Disposable {
|
|
|
595
716
|
wrapper,
|
|
596
717
|
$("div.onboarding-a-section-label.onboarding-a-section-label-keymap")
|
|
597
718
|
);
|
|
598
|
-
keymapLabel.textContent = ( localize(
|
|
719
|
+
keymapLabel.textContent = ( localize(16343, "Keyboard Mapping"));
|
|
599
720
|
const keymapHint = append(wrapper, $("div.onboarding-a-theme-hint"));
|
|
600
721
|
keymapHint.textContent = ( localize(
|
|
601
|
-
|
|
722
|
+
16344,
|
|
602
723
|
"Coming from another editor? Import your keyboard mapping to feel right at home."
|
|
603
724
|
));
|
|
604
725
|
const keymapList = append(wrapper, $(".onboarding-a-keymap-list"));
|
|
605
726
|
keymapList.setAttribute("role", "radiogroup");
|
|
606
|
-
keymapList.setAttribute("aria-label", ( localize(
|
|
727
|
+
keymapList.setAttribute("aria-label", ( localize(16345, "Choose a keyboard mapping")));
|
|
607
728
|
const keymapPills = [];
|
|
608
729
|
for (const keymap of keymapOptions) {
|
|
609
730
|
const pill = this._registerStepFocusable(append(keymapList, $("button.onboarding-a-keymap-pill")));
|
|
@@ -626,7 +747,7 @@ let OnboardingVariationA = class OnboardingVariationA extends Disposable {
|
|
|
626
747
|
}
|
|
627
748
|
pill.classList.add("selected");
|
|
628
749
|
pill.setAttribute("aria-checked", "true");
|
|
629
|
-
this.accessibilityService.alert(( localize(
|
|
750
|
+
this.accessibilityService.alert(( localize(16346, "{0} keyboard mapping selected", keymap.label)));
|
|
630
751
|
}));
|
|
631
752
|
}
|
|
632
753
|
const selectedKeymapIndex = keymapOptions.findIndex(k => k.id === this.selectedKeymapId);
|
|
@@ -636,7 +757,7 @@ let OnboardingVariationA = class OnboardingVariationA extends Disposable {
|
|
|
636
757
|
_renderPersonalizeSubtitle(container) {
|
|
637
758
|
clearNode(container);
|
|
638
759
|
const modifier = isMacintosh ? "Cmd" : "Ctrl";
|
|
639
|
-
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.")));
|
|
640
761
|
}
|
|
641
762
|
_createThemeCard(parent, theme, allCards) {
|
|
642
763
|
const card = this._registerStepFocusable(append(parent, $("div.onboarding-a-theme-card")));
|
|
@@ -664,7 +785,7 @@ let OnboardingVariationA = class OnboardingVariationA extends Disposable {
|
|
|
664
785
|
}
|
|
665
786
|
card.classList.add("selected");
|
|
666
787
|
card.setAttribute("aria-checked", "true");
|
|
667
|
-
this.accessibilityService.alert(( localize(
|
|
788
|
+
this.accessibilityService.alert(( localize(16352, "{0} theme selected", theme.label)));
|
|
668
789
|
}));
|
|
669
790
|
this.stepDisposables.add(addDisposableListener(card, EventType.KEY_DOWN, e => {
|
|
670
791
|
if (e.key === "Enter" || e.key === " ") {
|
|
@@ -701,7 +822,7 @@ let OnboardingVariationA = class OnboardingVariationA extends Disposable {
|
|
|
701
822
|
this.notificationService.notify({
|
|
702
823
|
severity: Severity.Warning,
|
|
703
824
|
message: ( localize(
|
|
704
|
-
|
|
825
|
+
16353,
|
|
705
826
|
"Could not install {0} keymap. You can install it later from Extensions.",
|
|
706
827
|
keymap.label
|
|
707
828
|
))
|
|
@@ -824,7 +945,7 @@ let OnboardingVariationA = class OnboardingVariationA extends Disposable {
|
|
|
824
945
|
const wrapper = append(container, $(".onboarding-a-ai-pref"));
|
|
825
946
|
const cards = append(wrapper, $(".onboarding-a-ai-pref-cards"));
|
|
826
947
|
cards.setAttribute("role", "radiogroup");
|
|
827
|
-
cards.setAttribute("aria-label", ( localize(
|
|
948
|
+
cards.setAttribute("aria-label", ( localize(16354, "Choose your AI collaboration style")));
|
|
828
949
|
const allCards = [];
|
|
829
950
|
for (const option of ONBOARDING_AI_PREFERENCE_OPTIONS) {
|
|
830
951
|
const card = this._registerStepFocusable(append(cards, $("button.onboarding-a-ai-pref-card")));
|
|
@@ -852,13 +973,13 @@ let OnboardingVariationA = class OnboardingVariationA extends Disposable {
|
|
|
852
973
|
c.setAttribute("aria-checked", c.dataset.id === option.id ? "true" : "false");
|
|
853
974
|
}
|
|
854
975
|
this._applyAiPreference(option.id);
|
|
855
|
-
this.accessibilityService.alert(( localize(
|
|
976
|
+
this.accessibilityService.alert(( localize(16355, "{0} selected", option.label)));
|
|
856
977
|
}));
|
|
857
978
|
}
|
|
858
979
|
const selectedAiIndex = ONBOARDING_AI_PREFERENCE_OPTIONS.findIndex(o => o.id === this.selectedAiMode);
|
|
859
980
|
this._setupRadioGroupNavigation(allCards, Math.max(0, selectedAiIndex));
|
|
860
981
|
const hint = append(wrapper, $("div.onboarding-a-ai-pref-hint"));
|
|
861
|
-
hint.textContent = ( localize(
|
|
982
|
+
hint.textContent = ( localize(16356, "You can change this anytime in Settings."));
|
|
862
983
|
}
|
|
863
984
|
_applyAiPreference(mode) {
|
|
864
985
|
switch (mode) {
|
|
@@ -878,7 +999,7 @@ let OnboardingVariationA = class OnboardingVariationA extends Disposable {
|
|
|
878
999
|
const keys = isMacintosh ?
|
|
879
1000
|
["⌘", "⌃", "I"] : ["Ctrl", "Alt", "I"];
|
|
880
1001
|
const shortcut = ( keys.map(k => this._createKbd(k)));
|
|
881
|
-
el.append(( localize(
|
|
1002
|
+
el.append(( localize(16357, "Open Chat anytime with ")));
|
|
882
1003
|
for (let i = 0; i < shortcut.length; i++) {
|
|
883
1004
|
if (i > 0) {
|
|
884
1005
|
el.append("+");
|
|
@@ -891,36 +1012,33 @@ let OnboardingVariationA = class OnboardingVariationA extends Disposable {
|
|
|
891
1012
|
const features = append(wrapper, $(".onboarding-a-sessions-features"));
|
|
892
1013
|
const chatGroup = append(features, $(".onboarding-a-sessions-group"));
|
|
893
1014
|
const chatLabel = append(chatGroup, $("div.onboarding-a-sessions-group-label"));
|
|
894
|
-
chatLabel.textContent = ( localize(
|
|
1015
|
+
chatLabel.textContent = ( localize(16358, "Agents made for the task"));
|
|
895
1016
|
const chatGrid = append(chatGroup, $(".onboarding-a-sessions-grid.onboarding-a-sessions-grid-2"));
|
|
896
|
-
this._createFeatureCard(chatGrid, Codicon.listOrdered, ( localize(
|
|
897
|
-
|
|
898
|
-
"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."
|
|
899
1020
|
)));
|
|
900
|
-
this._createFeatureCard(chatGrid, Codicon.commentDiscussion, ( localize(
|
|
901
|
-
|
|
1021
|
+
this._createFeatureCard(chatGrid, Codicon.commentDiscussion, ( localize(16361, "Agent")), ( localize(
|
|
1022
|
+
16362,
|
|
902
1023
|
"Describe a goal. The agent plans the approach, edits files, runs commands, and self-corrects. You review and approve along the way."
|
|
903
1024
|
)));
|
|
904
1025
|
const moreGroup = append(features, $(".onboarding-a-sessions-group"));
|
|
905
1026
|
const moreLabel = append(moreGroup, $("div.onboarding-a-sessions-group-label"));
|
|
906
|
-
moreLabel.textContent = ( localize(
|
|
1027
|
+
moreLabel.textContent = ( localize(16363, "Agents that work your way"));
|
|
907
1028
|
const moreGrid = append(moreGroup, $(".onboarding-a-sessions-grid.onboarding-a-sessions-grid-2"));
|
|
908
|
-
this._createFeatureCard(moreGrid, Codicon.rocket, ( localize(
|
|
909
|
-
|
|
1029
|
+
this._createFeatureCard(moreGrid, Codicon.rocket, ( localize(16364, "Run Agents Anywhere")), ( localize(
|
|
1030
|
+
16365,
|
|
910
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."
|
|
911
1032
|
)));
|
|
912
|
-
this._createFeatureCard(moreGrid, Codicon.settingsGear, ( localize(
|
|
913
|
-
|
|
1033
|
+
this._createFeatureCard(moreGrid, Codicon.settingsGear, ( localize(16366, "Customize Your Agents")), ( localize(
|
|
1034
|
+
16367,
|
|
914
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."
|
|
915
1036
|
)));
|
|
916
1037
|
const docsRow = append(wrapper, $(".onboarding-a-sessions-docs"));
|
|
917
|
-
this._createDocLink(docsRow, ( localize(
|
|
1038
|
+
this._createDocLink(docsRow, ( localize(16368, "Agents tutorial")), "https://code.visualstudio.com/docs/copilot/agents/agents-tutorial", "agentsTutorial");
|
|
918
1039
|
}
|
|
919
1040
|
_createFeatureCard(parent, icon, title, description) {
|
|
920
|
-
const card =
|
|
921
|
-
card.setAttribute("tabindex", "0");
|
|
922
|
-
card.setAttribute("role", "group");
|
|
923
|
-
card.setAttribute("aria-label", title);
|
|
1041
|
+
const card = append(parent, $("div.onboarding-a-feature-card"));
|
|
924
1042
|
const iconCol = append(card, $("div.onboarding-a-feature-icon"));
|
|
925
1043
|
iconCol.appendChild(renderIcon(icon));
|
|
926
1044
|
const textCol = append(card, $("div.onboarding-a-feature-text"));
|
|
@@ -1060,6 +1178,9 @@ let OnboardingVariationA = class OnboardingVariationA extends Disposable {
|
|
|
1060
1178
|
this._footerSignInBtn = undefined;
|
|
1061
1179
|
this.footerFocusableElements.length = 0;
|
|
1062
1180
|
this.stepFocusableElements.length = 0;
|
|
1181
|
+
this.enterpriseSignInUiState = "options";
|
|
1182
|
+
this.enterpriseInstanceValue = "";
|
|
1183
|
+
this.enterpriseSignInWatch = undefined;
|
|
1063
1184
|
this._isShowing = false;
|
|
1064
1185
|
this.disposables.clear();
|
|
1065
1186
|
this.stepDisposables.clear();
|
|
@@ -1074,6 +1195,6 @@ let OnboardingVariationA = class OnboardingVariationA extends Disposable {
|
|
|
1074
1195
|
super.dispose();
|
|
1075
1196
|
}
|
|
1076
1197
|
};
|
|
1077
|
-
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));
|
|
1078
1199
|
|
|
1079
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
|
}
|