mirror of
https://github.com/microsoft/vscode.git
synced 2026-07-10 05:28:19 -05:00
Add openRecentFolder telemetry (fixes #19865)
This commit is contained in:
@@ -31,6 +31,7 @@ import { IBackupFileService } from 'vs/workbench/services/backup/common/backup';
|
||||
import { IMessageService, Severity } from 'vs/platform/message/common/message';
|
||||
|
||||
const enabledKey = 'workbench.welcome.enabled';
|
||||
const telemetryFrom = 'welcomePage';
|
||||
|
||||
export class WelcomePageContribution implements IWorkbenchContribution {
|
||||
|
||||
@@ -101,7 +102,7 @@ class WelcomePage {
|
||||
const recentlyOpened = this.windowService.getRecentlyOpen();
|
||||
const uri = URI.parse(require.toUrl('./vs_code_welcome_page.html'))
|
||||
.with({ scheme: Schemas.walkThrough });
|
||||
const input = this.instantiationService.createInstance(WalkThroughInput, localize('welcome.title', "Welcome"), '', uri, 'welcomePage', container => this.onReady(container, recentlyOpened));
|
||||
const input = this.instantiationService.createInstance(WalkThroughInput, localize('welcome.title', "Welcome"), '', uri, telemetryFrom, container => this.onReady(container, recentlyOpened));
|
||||
this.editorService.openEditor(input, { pinned: true }, Position.ONE)
|
||||
.then(null, onUnexpectedError);
|
||||
}
|
||||
@@ -143,6 +144,10 @@ class WelcomePage {
|
||||
a.title = folder;
|
||||
a.href = 'javascript:void(0)';
|
||||
a.addEventListener('click', e => {
|
||||
this.telemetryService.publicLog('workbenchActionExecuted', {
|
||||
id: 'openRecentFolder',
|
||||
from: telemetryFrom
|
||||
});
|
||||
this.windowsService.openWindow([folder]);
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
Reference in New Issue
Block a user