diff --git a/src/vs/workbench/contrib/welcomeGettingStarted/browser/startupPage.ts b/src/vs/workbench/contrib/welcomeGettingStarted/browser/startupPage.ts index dde7fa248b45a..b892ebd059967 100644 --- a/src/vs/workbench/contrib/welcomeGettingStarted/browser/startupPage.ts +++ b/src/vs/workbench/contrib/welcomeGettingStarted/browser/startupPage.ts @@ -101,6 +101,14 @@ export class StartupPageRunnerContribution extends Disposable implements IWorkbe if (e.editor instanceof GettingStartedInput) { e.editor.selectedCategory = undefined; e.editor.selectedStep = undefined; + // Post-completion/navigation fallback: prefer last active editor, otherwise open a new Untitled file. + // pseudo-telemetry: gettingStarted.postClosePath = hasAnyEditor ? 'lastActive' : 'untitled' + setTimeout(() => { + const hasAnyEditor = this.editorService.editors.length > 0 || !!this.editorService.activeEditor; + if (!hasAnyEditor) { + this.commandService.executeCommand('workbench.action.files.newUntitledFile'); + } + }, 0); } })); } @@ -233,4 +241,4 @@ function isStartupPageEnabled(configurationService: IConfigurationService, conte || startupEditor.value === 'readme' || (contextService.getWorkbenchState() === WorkbenchState.EMPTY && startupEditor.value === 'welcomePageInEmptyWorkbench') || startupEditor.value === 'terminal'; -} +} \ No newline at end of file