Skip to content

Commit 335e03d

Browse files
authored
Update walkthrough editor options to open Welcome page (#264197)
1 parent 614287f commit 335e03d

File tree

2 files changed

+9
-13
lines changed

2 files changed

+9
-13
lines changed

src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.contribution.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,14 @@ registerAction2(class extends Action2 {
8080
return;
8181
}
8282

83-
// Otherwise open the walkthrough editor with the selected category and step
84-
const options: GettingStartedEditorOptions = { selectedCategory: selectedCategory, selectedStep: selectedStep, showWelcome: false, preserveFocus: toSide ?? false, inactive };
83+
let options: GettingStartedEditorOptions;
84+
if (selectedCategory) {
85+
// Otherwise open the walkthrough editor with the selected category and step
86+
options = { selectedCategory: selectedCategory, selectedStep: selectedStep, showWelcome: false, preserveFocus: toSide ?? false, inactive };
87+
} else {
88+
// Open Welcome page
89+
options = { selectedCategory: selectedCategory, selectedStep: selectedStep, showWelcome: true, preserveFocus: toSide ?? false, inactive };
90+
}
8591
editorService.openEditor({
8692
resource: GettingStartedInput.RESOURCE,
8793
options

src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedService.ts

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { ICommandService } from '../../../../platform/commands/common/commands.j
1212
import { ContextKeyExpr, ContextKeyExpression, IContextKeyService, RawContextKey } from '../../../../platform/contextkey/common/contextkey.js';
1313
import { Disposable } from '../../../../base/common/lifecycle.js';
1414
import { IUserDataSyncEnablementService } from '../../../../platform/userDataSync/common/userDataSync.js';
15-
import { ExtensionIdentifier, IExtensionDescription } from '../../../../platform/extensions/common/extensions.js';
15+
import { IExtensionDescription } from '../../../../platform/extensions/common/extensions.js';
1616
import { URI } from '../../../../base/common/uri.js';
1717
import { joinPath } from '../../../../base/common/resources.js';
1818
import { FileAccess } from '../../../../base/common/network.js';
@@ -33,7 +33,6 @@ import { ITelemetryService } from '../../../../platform/telemetry/common/telemet
3333
import { checkGlobFileExists } from '../../../services/extensions/common/workspaceContains.js';
3434
import { IWorkspaceContextService } from '../../../../platform/workspace/common/workspace.js';
3535
import { CancellationTokenSource } from '../../../../base/common/cancellation.js';
36-
import { IProductService } from '../../../../platform/product/common/productService.js';
3736
import { asWebviewUri } from '../../webview/common/webview.js';
3837
import { IWorkbenchLayoutService, Parts } from '../../../services/layout/browser/layoutService.js';
3938
import { extensionDefaultIcon } from '../../../services/extensionManagement/common/extensionsIcons.js';
@@ -161,7 +160,6 @@ export class WalkthroughsService extends Disposable implements IWalkthroughsServ
161160
@IViewsService private readonly viewsService: IViewsService,
162161
@ITelemetryService private readonly telemetryService: ITelemetryService,
163162
@IWorkbenchAssignmentService private readonly tasExperimentService: IWorkbenchAssignmentService,
164-
@IProductService private readonly productService: IProductService,
165163
@IWorkbenchLayoutService private readonly layoutService: IWorkbenchLayoutService,
166164
@IEditorService private readonly editorService: IEditorService
167165
) {
@@ -246,14 +244,6 @@ export class WalkthroughsService extends Disposable implements IWalkthroughsServ
246244

247245
this._register(this.extensionManagementService.onDidInstallExtensions((result) => {
248246

249-
if (result.some(e => ExtensionIdentifier.equals(this.productService.defaultChatAgent?.extensionId, e.identifier.id) && !e?.context?.[EXTENSION_INSTALL_SKIP_WALKTHROUGH_CONTEXT])) {
250-
result.forEach(e => {
251-
this.sessionInstalledExtensions.add(e.identifier.id.toLowerCase());
252-
this.progressByEvent(`extensionInstalled:${e.identifier.id.toLowerCase()}`);
253-
});
254-
return;
255-
}
256-
257247
for (const e of result) {
258248
const skipWalkthrough = e?.context?.[EXTENSION_INSTALL_SKIP_WALKTHROUGH_CONTEXT] || e?.context?.[EXTENSION_INSTALL_DEP_PACK_CONTEXT];
259249
// If the window had last focus and the install didn't specify to skip the walkthrough

0 commit comments

Comments
 (0)