@@ -34,7 +34,6 @@ import { IAccessibilityService } from '../../../../platform/accessibility/common
3434import { ICommandService } from '../../../../platform/commands/common/commands.js' ;
3535import { ConfigurationTarget , IConfigurationService } from '../../../../platform/configuration/common/configuration.js' ;
3636import { ContextKeyExpr , ContextKeyExpression , IContextKeyService , RawContextKey } from '../../../../platform/contextkey/common/contextkey.js' ;
37- import { IEditorOptions } from '../../../../platform/editor/common/editor.js' ;
3837import { IFileService } from '../../../../platform/files/common/files.js' ;
3938import { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js' ;
4039import { IKeybindingService } from '../../../../platform/keybinding/common/keybinding.js' ;
@@ -121,7 +120,6 @@ export class GettingStartedPage extends EditorPane {
121120
122121 public static readonly ID = 'gettingStartedPage' ;
123122
124- private editorInput ! : GettingStartedInput ;
125123 private inProgressScroll = Promise . resolve ( ) ;
126124
127125 private readonly dispatchListeners : DisposableStore = new DisposableStore ( ) ;
@@ -165,6 +163,10 @@ export class GettingStartedPage extends EditorPane {
165163 private readonly categoriesSlideDisposables : DisposableStore ;
166164 private showFeaturedWalkthrough = true ;
167165
166+ get editorInput ( ) : GettingStartedInput {
167+ return this . _input as GettingStartedInput ;
168+ }
169+
168170 constructor (
169171 group : IEditorGroup ,
170172 @ICommandService private readonly commandService : ICommandService ,
@@ -340,11 +342,28 @@ export class GettingStartedPage extends EditorPane {
340342 } ;
341343 }
342344
343- override async setInput ( newInput : GettingStartedInput , options : IEditorOptions | undefined , context : IEditorOpenContext , token : CancellationToken ) {
344- this . container . classList . remove ( 'animatable' ) ;
345- this . editorInput = newInput ;
346- this . editorInput . showTelemetryNotice = ( options as GettingStartedEditorOptions ) ?. showTelemetryNotice ?? true ;
345+ override async setInput ( newInput : GettingStartedInput , options : GettingStartedEditorOptions | undefined , context : IEditorOpenContext , token : CancellationToken ) {
347346 await super . setInput ( newInput , options , context , token ) ;
347+ await this . applyInput ( options ) ;
348+ }
349+
350+ override async setOptions ( options : GettingStartedEditorOptions | undefined ) : Promise < void > {
351+ super . setOptions ( options ) ;
352+
353+ if (
354+ this . editorInput . selectedCategory !== options ?. selectedCategory ||
355+ this . editorInput . selectedStep !== options ?. selectedStep
356+ ) {
357+ await this . applyInput ( options ) ;
358+ }
359+ }
360+
361+ private async applyInput ( options : GettingStartedEditorOptions | undefined ) : Promise < void > {
362+ this . editorInput . showTelemetryNotice = options ?. showTelemetryNotice ?? true ;
363+ this . editorInput . selectedCategory = options ?. selectedCategory ;
364+ this . editorInput . selectedStep = options ?. selectedStep ;
365+
366+ this . container . classList . remove ( 'animatable' ) ;
348367 await this . buildCategoriesSlide ( ) ;
349368 if ( this . shouldAnimate ( ) ) {
350369 setTimeout ( ( ) => this . container . classList . add ( 'animatable' ) , 0 ) ;
0 commit comments