diff --git a/src/vs/workbench/contrib/welcome/gettingStarted/browser/gettingStarted.contribution.ts b/src/vs/workbench/contrib/welcome/gettingStarted/browser/gettingStarted.contribution.ts index c3307acbf24..e3d584db87d 100644 --- a/src/vs/workbench/contrib/welcome/gettingStarted/browser/gettingStarted.contribution.ts +++ b/src/vs/workbench/contrib/welcome/gettingStarted/browser/gettingStarted.contribution.ts @@ -23,7 +23,8 @@ import { ConfigurationScope, Extensions as ConfigurationExtensions, IConfigurati import { workbenchConfigurationNodeBase } from 'vs/workbench/common/configuration'; import { IEditorGroupsService } from 'vs/workbench/services/editor/common/editorGroupsService'; import { EditorOverride } from 'vs/platform/editor/common/editor'; -import { CommandsRegistry } from 'vs/platform/commands/common/commands'; +import { CommandsRegistry, ICommandService } from 'vs/platform/commands/common/commands'; +import { IQuickInputService } from 'vs/platform/quickinput/common/quickInput'; export * as icons from 'vs/workbench/contrib/welcome/gettingStarted/browser/gettingStartedIcons'; @@ -292,6 +293,32 @@ registerAction2(class extends Action2 { } }); +registerAction2(class extends Action2 { + constructor() { + super({ + id: 'welcome.showAllGettingStarted', + title: localize('welcome.showAllGettingStarted', "Open Getting Started Page..."), + category, + f1: true, + }); + } + + async run(accessor: ServicesAccessor) { + const commandService = accessor.get(ICommandService); + const quickInputService = accessor.get(IQuickInputService); + const gettingStartedService = accessor.get(IGettingStartedService); + const categories = gettingStartedService.getCategories().filter(x => x.content.type === 'steps'); + const selection = await quickInputService.pick(categories.map(x => ({ + id: x.id, + label: x.title, + detail: x.description, + })), { canPickMany: false, title: localize('pickWalkthroughs', "Open Getting Started Page...") }); + if (selection) { + commandService.executeCommand('workbench.action.openWalkthrough', selection.id); + } + } +}); + class WorkbenchConfigurationContribution { constructor( @IInstantiationService _instantiationService: IInstantiationService,