@@ -45,7 +45,7 @@ import { IOpenerService } from '../../../../platform/opener/common/opener.js';
4545import { IProductService } from '../../../../platform/product/common/productService.js' ;
4646import { IQuickInputService } from '../../../../platform/quickinput/common/quickInput.js' ;
4747import { IStorageService , StorageScope , StorageTarget , WillSaveStateReason } from '../../../../platform/storage/common/storage.js' ;
48- import { ITelemetryService , TelemetryLevel } from '../../../../platform/telemetry/common/telemetry.js' ;
48+ import { firstSessionDateStorageKey , ITelemetryService , TelemetryLevel } from '../../../../platform/telemetry/common/telemetry.js' ;
4949import { getTelemetryLevel } from '../../../../platform/telemetry/common/telemetryUtils.js' ;
5050import { defaultButtonStyles , defaultKeybindingLabelStyles , defaultToggleStyles } from '../../../../platform/theme/browser/defaultStyles.js' ;
5151import { IWindowOpenable } from '../../../../platform/window/common/window.js' ;
@@ -941,6 +941,22 @@ export class GettingStartedPage extends EditorPane {
941941 const telemetryNotice = $ ( 'p.telemetry-notice' ) ;
942942 this . buildTelemetryFooter ( telemetryNotice ) ;
943943 footer . appendChild ( telemetryNotice ) ;
944+ } else if ( ! this . productService . openToWelcomeMainPage && this . showFeaturedWalkthrough && this . storageService . isNew ( StorageScope . APPLICATION ) ) {
945+ const firstSessionDateString = this . storageService . get ( firstSessionDateStorageKey , StorageScope . APPLICATION ) || new Date ( ) . toUTCString ( ) ;
946+ const daysSinceFirstSession = ( ( + new Date ( ) ) - ( + new Date ( firstSessionDateString ) ) ) / 1000 / 60 / 60 / 24 ;
947+ const fistContentBehaviour = daysSinceFirstSession < 1 ? 'openToFirstCategory' : 'index' ;
948+
949+ if ( fistContentBehaviour === 'openToFirstCategory' ) {
950+ const first = this . gettingStartedCategories . filter ( c => ! c . when || this . contextService . contextMatchesRules ( c . when ) ) [ 0 ] ;
951+ if ( first ) {
952+ this . currentWalkthrough = first ;
953+ this . editorInput . selectedCategory = this . currentWalkthrough ?. id ;
954+ this . editorInput . walkthroughPageTitle = this . currentWalkthrough . walkthroughPageTitle ;
955+ this . buildCategorySlide ( this . editorInput . selectedCategory , undefined ) ;
956+ this . setSlide ( 'details' , true /* firstLaunch */ ) ;
957+ return ;
958+ }
959+ }
944960 }
945961
946962 this . setSlide ( 'categories' ) ;
0 commit comments