@codingame/monaco-vscode-walkthrough-service-override 11.1.2 → 12.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/multi-file-edits.svg +513 -0
- package/index.d.ts +2 -1
- package/index.js +19 -1
- package/package.json +24 -8
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.contribution.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.contribution.js +67 -66
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.d.ts +146 -0
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.js +153 -150
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedAccessibleView.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedAccessibleView.js +84 -32
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedColors.d.ts +7 -0
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedColors.js +8 -7
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedDetailsRenderer.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedDetailsRenderer.js +3 -2
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedExtensionPoint.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedExtensionPoint.js +41 -37
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedIcons.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedIcons.js +3 -2
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedInput.d.ts +38 -0
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedInput.js +3 -2
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedList.d.ts +42 -0
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedList.js +1 -0
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedService._contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedService._contribution.js +10 -8
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedService.d.ts +147 -0
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedService.js +86 -83
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/media/gettingStarted.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/startupPage.d.ts +49 -0
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/startupPage.js +43 -38
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/common/gettingStartedContent.d.ts +66 -0
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/common/gettingStartedContent.js +208 -165
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/common/media/all.svg.js +1 -0
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/common/media/notebookProfile.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/common/media/notebookProfile.js +4 -3
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/common/media/theme_picker.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/common/media/theme_picker.js +7 -6
- package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/browser/editor/editorWalkThrough.d.ts +17 -0
- package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/browser/editor/editorWalkThrough.js +7 -6
- package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/browser/editor/vs_code_editor_walkthrough.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/browser/editor/vs_code_editor_walkthrough.js +1 -0
- package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/browser/media/walkThroughPart.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/browser/walkThrough.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/browser/walkThrough.contribution.js +6 -5
- package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/browser/walkThroughActions.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/browser/walkThroughActions.js +11 -8
- package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/browser/walkThroughInput.d.ts +50 -0
- package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/browser/walkThroughInput.js +6 -4
- package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/browser/walkThroughPart.d.ts +66 -0
- package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/browser/walkThroughPart.js +34 -31
- package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/common/walkThroughContentProvider.d.ts +29 -0
- package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/common/walkThroughContentProvider.js +5 -3
- package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/common/walkThroughUtils.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/common/walkThroughUtils.js +3 -2
- package/walkthrough.js +0 -18
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Disposable, IDisposable } from "vscode/vscode/vs/base/common/lifecycle";
|
|
2
|
+
import { Dimension } from "vscode/vscode/vs/base/browser/dom";
|
|
3
|
+
import { ContextKeyExpression } from "vscode/vscode/vs/platform/contextkey/common/contextkey";
|
|
4
|
+
import { IContextKeyService } from "vscode/vscode/vs/platform/contextkey/common/contextkey.service";
|
|
5
|
+
type GettingStartedIndexListOptions<T> = {
|
|
6
|
+
title: string;
|
|
7
|
+
klass: string;
|
|
8
|
+
limit: number;
|
|
9
|
+
empty?: HTMLElement | undefined;
|
|
10
|
+
more?: HTMLElement | undefined;
|
|
11
|
+
footer?: HTMLElement | undefined;
|
|
12
|
+
renderElement: (item: T) => HTMLElement;
|
|
13
|
+
rankElement?: (item: T) => number | null;
|
|
14
|
+
contextService: IContextKeyService;
|
|
15
|
+
};
|
|
16
|
+
export declare class GettingStartedIndexList<T extends {
|
|
17
|
+
id: string;
|
|
18
|
+
when?: ContextKeyExpression;
|
|
19
|
+
}> extends Disposable {
|
|
20
|
+
private options;
|
|
21
|
+
private readonly _onDidChangeEntries;
|
|
22
|
+
private readonly onDidChangeEntries;
|
|
23
|
+
private domElement;
|
|
24
|
+
private list;
|
|
25
|
+
private scrollbar;
|
|
26
|
+
private entries;
|
|
27
|
+
private lastRendered;
|
|
28
|
+
itemCount: number;
|
|
29
|
+
private isDisposed;
|
|
30
|
+
private contextService;
|
|
31
|
+
private contextKeysToWatch;
|
|
32
|
+
constructor(options: GettingStartedIndexListOptions<T>);
|
|
33
|
+
getDomElement(): HTMLElement;
|
|
34
|
+
layout(size: Dimension): void;
|
|
35
|
+
onDidChange(listener: () => void): void;
|
|
36
|
+
register(d: IDisposable): void;
|
|
37
|
+
dispose(): void;
|
|
38
|
+
setLimit(limit: number): void;
|
|
39
|
+
rerender(): void;
|
|
40
|
+
setEntries(entries: undefined | T[]): void;
|
|
41
|
+
}
|
|
42
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
|
|
1
2
|
import { localize2 } from 'vscode/vscode/vs/nls';
|
|
2
3
|
import { registerAction2, Action2 } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
4
|
+
import { StorageScope, StorageTarget } from 'vscode/vscode/vs/platform/storage/common/storage';
|
|
3
5
|
import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
|
|
4
|
-
import { Memento } from 'vscode/vscode/vs/workbench/common/memento';
|
|
6
|
+
import { Memento } from '@codingame/monaco-vscode-9e888134-1a6f-58d9-b0e6-0fc047448366-common/vscode/vs/workbench/common/memento';
|
|
5
7
|
import { hiddenEntriesConfigurationKey, walkthroughMetadataConfigurationKey } from './gettingStartedService.js';
|
|
6
8
|
import { IWalkthroughsService } from 'vscode/vscode/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedService.service';
|
|
7
9
|
|
|
@@ -9,12 +11,12 @@ registerAction2(class extends Action2 {
|
|
|
9
11
|
constructor() {
|
|
10
12
|
super({
|
|
11
13
|
id: 'resetGettingStartedProgress',
|
|
12
|
-
category: ( localize2(
|
|
13
|
-
title: ( localize2(
|
|
14
|
+
category: ( localize2(10818, "Developer")),
|
|
15
|
+
title: ( localize2(10819, "Reset Welcome Page Walkthrough Progress")),
|
|
14
16
|
f1: true,
|
|
15
17
|
metadata: {
|
|
16
18
|
description: ( localize2(
|
|
17
|
-
|
|
19
|
+
10820,
|
|
18
20
|
'Reset the progress of all Walkthrough steps on the Welcome Page to make them appear as if they are being viewed for the first time, providing a fresh start to the getting started experience.'
|
|
19
21
|
)),
|
|
20
22
|
}
|
|
@@ -23,10 +25,10 @@ registerAction2(class extends Action2 {
|
|
|
23
25
|
run(accessor) {
|
|
24
26
|
const gettingStartedService = accessor.get(IWalkthroughsService);
|
|
25
27
|
const storageService = accessor.get(IStorageService);
|
|
26
|
-
storageService.store(hiddenEntriesConfigurationKey, JSON.stringify([]),
|
|
27
|
-
storageService.store(walkthroughMetadataConfigurationKey, JSON.stringify([]),
|
|
28
|
-
const memento = (
|
|
29
|
-
const record = memento.getMemento(
|
|
28
|
+
storageService.store(hiddenEntriesConfigurationKey, JSON.stringify([]), StorageScope.PROFILE, StorageTarget.USER);
|
|
29
|
+
storageService.store(walkthroughMetadataConfigurationKey, JSON.stringify([]), StorageScope.PROFILE, StorageTarget.USER);
|
|
30
|
+
const memento = ( new Memento('gettingStartedService', accessor.get(IStorageService)));
|
|
31
|
+
const record = memento.getMemento(StorageScope.PROFILE, StorageTarget.USER);
|
|
30
32
|
for (const key in record) {
|
|
31
33
|
if (Object.prototype.hasOwnProperty.call(record, key)) {
|
|
32
34
|
try {
|
package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedService.d.ts
ADDED
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import { IInstantiationService } from "vscode/vscode/vs/platform/instantiation/common/instantiation";
|
|
2
|
+
import { Event } from "vscode/vscode/vs/base/common/event";
|
|
3
|
+
import { IStorageService } from "vscode/vscode/vs/platform/storage/common/storage.service";
|
|
4
|
+
import { ICommandService } from "vscode/vscode/vs/platform/commands/common/commands.service";
|
|
5
|
+
import { ContextKeyExpression, RawContextKey } from "vscode/vscode/vs/platform/contextkey/common/contextkey";
|
|
6
|
+
import { IContextKeyService } from "vscode/vscode/vs/platform/contextkey/common/contextkey.service";
|
|
7
|
+
import { Disposable } from "vscode/vscode/vs/base/common/lifecycle";
|
|
8
|
+
import { IUserDataSyncEnablementService } from "vscode/vscode/vs/platform/userDataSync/common/userDataSync.service";
|
|
9
|
+
import { URI } from "vscode/vscode/vs/base/common/uri";
|
|
10
|
+
import { IExtensionManagementService } from "vscode/vscode/vs/platform/extensionManagement/common/extensionManagement.service";
|
|
11
|
+
import { ThemeIcon } from "vscode/vscode/vs/base/common/themables";
|
|
12
|
+
import { IWorkbenchAssignmentService } from "vscode/vscode/vs/workbench/services/assignment/common/assignmentService.service";
|
|
13
|
+
import { IHostService } from "vscode/vscode/vs/workbench/services/host/browser/host.service";
|
|
14
|
+
import { IConfigurationService } from "vscode/vscode/vs/platform/configuration/common/configuration.service";
|
|
15
|
+
import { LinkedText } from "vscode/vscode/vs/base/common/linkedText";
|
|
16
|
+
import { IViewsService } from "vscode/vscode/vs/workbench/services/views/common/viewsService.service";
|
|
17
|
+
import { ITelemetryService } from "vscode/vscode/vs/platform/telemetry/common/telemetry.service";
|
|
18
|
+
import { IWorkspaceContextService } from "vscode/vscode/vs/platform/workspace/common/workspace.service";
|
|
19
|
+
import { IProductService } from "vscode/vscode/vs/platform/product/common/productService.service";
|
|
20
|
+
import { IWalkthroughsService } from "vscode/vscode/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedService.service";
|
|
21
|
+
export declare const HasMultipleNewFileEntries: RawContextKey<boolean>;
|
|
22
|
+
export declare const hiddenEntriesConfigurationKey = "workbench.welcomePage.hiddenCategories";
|
|
23
|
+
export declare const walkthroughMetadataConfigurationKey = "workbench.welcomePage.walkthroughMetadata";
|
|
24
|
+
export type WalkthroughMetaDataType = Map<string, {
|
|
25
|
+
firstSeen: number;
|
|
26
|
+
stepIDs: string[];
|
|
27
|
+
manaullyOpened: boolean;
|
|
28
|
+
}>;
|
|
29
|
+
export interface IWalkthrough {
|
|
30
|
+
id: string;
|
|
31
|
+
title: string;
|
|
32
|
+
description: string;
|
|
33
|
+
order: number;
|
|
34
|
+
source: string;
|
|
35
|
+
isFeatured: boolean;
|
|
36
|
+
next?: string;
|
|
37
|
+
when: ContextKeyExpression;
|
|
38
|
+
steps: IWalkthroughStep[];
|
|
39
|
+
icon: {
|
|
40
|
+
type: "icon";
|
|
41
|
+
icon: ThemeIcon;
|
|
42
|
+
} | {
|
|
43
|
+
type: "image";
|
|
44
|
+
path: string;
|
|
45
|
+
};
|
|
46
|
+
walkthroughPageTitle: string;
|
|
47
|
+
}
|
|
48
|
+
export type IWalkthroughLoose = Omit<IWalkthrough, "steps"> & {
|
|
49
|
+
steps: (Omit<IWalkthroughStep, "description"> & {
|
|
50
|
+
description: string;
|
|
51
|
+
})[];
|
|
52
|
+
};
|
|
53
|
+
export interface IResolvedWalkthrough extends IWalkthrough {
|
|
54
|
+
steps: IResolvedWalkthroughStep[];
|
|
55
|
+
newItems: boolean;
|
|
56
|
+
recencyBonus: number;
|
|
57
|
+
newEntry: boolean;
|
|
58
|
+
}
|
|
59
|
+
export interface IWalkthroughStep {
|
|
60
|
+
id: string;
|
|
61
|
+
title: string;
|
|
62
|
+
description: LinkedText[];
|
|
63
|
+
category: string;
|
|
64
|
+
when: ContextKeyExpression;
|
|
65
|
+
order: number;
|
|
66
|
+
completionEvents: string[];
|
|
67
|
+
media: {
|
|
68
|
+
type: "image";
|
|
69
|
+
path: {
|
|
70
|
+
hcDark: URI;
|
|
71
|
+
hcLight: URI;
|
|
72
|
+
light: URI;
|
|
73
|
+
dark: URI;
|
|
74
|
+
};
|
|
75
|
+
altText: string;
|
|
76
|
+
} | {
|
|
77
|
+
type: "svg";
|
|
78
|
+
path: URI;
|
|
79
|
+
altText: string;
|
|
80
|
+
} | {
|
|
81
|
+
type: "markdown";
|
|
82
|
+
path: URI;
|
|
83
|
+
base: URI;
|
|
84
|
+
root: URI;
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
type StepProgress = {
|
|
88
|
+
done: boolean;
|
|
89
|
+
};
|
|
90
|
+
export interface IResolvedWalkthroughStep extends IWalkthroughStep, StepProgress {
|
|
91
|
+
}
|
|
92
|
+
export declare class WalkthroughsService extends Disposable implements IWalkthroughsService {
|
|
93
|
+
private readonly storageService;
|
|
94
|
+
private readonly commandService;
|
|
95
|
+
private readonly instantiationService;
|
|
96
|
+
private readonly workspaceContextService;
|
|
97
|
+
private readonly contextService;
|
|
98
|
+
private readonly userDataSyncEnablementService;
|
|
99
|
+
private readonly configurationService;
|
|
100
|
+
private readonly extensionManagementService;
|
|
101
|
+
private readonly hostService;
|
|
102
|
+
private readonly viewsService;
|
|
103
|
+
private readonly telemetryService;
|
|
104
|
+
private readonly tasExperimentService;
|
|
105
|
+
private readonly productService;
|
|
106
|
+
readonly _serviceBrand: undefined;
|
|
107
|
+
private readonly _onDidAddWalkthrough;
|
|
108
|
+
readonly onDidAddWalkthrough: Event<IResolvedWalkthrough>;
|
|
109
|
+
private readonly _onDidRemoveWalkthrough;
|
|
110
|
+
readonly onDidRemoveWalkthrough: Event<string>;
|
|
111
|
+
private readonly _onDidChangeWalkthrough;
|
|
112
|
+
readonly onDidChangeWalkthrough: Event<IResolvedWalkthrough>;
|
|
113
|
+
private readonly _onDidProgressStep;
|
|
114
|
+
readonly onDidProgressStep: Event<IResolvedWalkthroughStep>;
|
|
115
|
+
private memento;
|
|
116
|
+
private stepProgress;
|
|
117
|
+
private sessionEvents;
|
|
118
|
+
private completionListeners;
|
|
119
|
+
private gettingStartedContributions;
|
|
120
|
+
private steps;
|
|
121
|
+
private sessionInstalledExtensions;
|
|
122
|
+
private categoryVisibilityContextKeys;
|
|
123
|
+
private stepCompletionContextKeyExpressions;
|
|
124
|
+
private stepCompletionContextKeys;
|
|
125
|
+
private metadata;
|
|
126
|
+
constructor(storageService: IStorageService, commandService: ICommandService, instantiationService: IInstantiationService, workspaceContextService: IWorkspaceContextService, contextService: IContextKeyService, userDataSyncEnablementService: IUserDataSyncEnablementService, configurationService: IConfigurationService, extensionManagementService: IExtensionManagementService, hostService: IHostService, viewsService: IViewsService, telemetryService: ITelemetryService, tasExperimentService: IWorkbenchAssignmentService, productService: IProductService);
|
|
127
|
+
private registerWalkthroughs;
|
|
128
|
+
private initCompletionEventListeners;
|
|
129
|
+
markWalkthroughOpened(id: string): void;
|
|
130
|
+
private registerExtensionWalkthroughContributions;
|
|
131
|
+
private unregisterExtensionWalkthroughContributions;
|
|
132
|
+
getWalkthrough(id: string): IResolvedWalkthrough;
|
|
133
|
+
getWalkthroughs(): IResolvedWalkthrough[];
|
|
134
|
+
private resolveWalkthrough;
|
|
135
|
+
private getStepProgress;
|
|
136
|
+
progressStep(id: string): void;
|
|
137
|
+
deprogressStep(id: string): void;
|
|
138
|
+
progressByEvent(event: string): void;
|
|
139
|
+
registerWalkthrough(walkthoughDescriptor: IWalkthroughLoose): void;
|
|
140
|
+
_registerWalkthrough(walkthroughDescriptor: IWalkthrough): void;
|
|
141
|
+
private registerDoneListeners;
|
|
142
|
+
private registerCompletionListener;
|
|
143
|
+
private getStep;
|
|
144
|
+
}
|
|
145
|
+
export declare const parseDescription: (desc: string) => LinkedText[];
|
|
146
|
+
export declare const convertInternalMediaPathToFileURI: (path: string) => URI;
|
|
147
|
+
export {};
|
package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedService.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6';
|
|
2
3
|
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
3
4
|
import { Emitter } from 'vscode/vscode/vs/base/common/event';
|
|
5
|
+
import { StorageScope, StorageTarget } from 'vscode/vscode/vs/platform/storage/common/storage';
|
|
4
6
|
import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
|
|
5
|
-
import { Memento } from 'vscode/vscode/vs/workbench/common/memento';
|
|
7
|
+
import { Memento } from '@codingame/monaco-vscode-9e888134-1a6f-58d9-b0e6-0fc047448366-common/vscode/vs/workbench/common/memento';
|
|
6
8
|
import { ICommandService } from 'vscode/vscode/vs/platform/commands/common/commands.service';
|
|
7
9
|
import { RawContextKey, ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
|
|
8
10
|
import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
@@ -20,6 +22,7 @@ import { IHostService } from 'vscode/vscode/vs/workbench/services/host/browser/h
|
|
|
20
22
|
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
|
|
21
23
|
import { parseLinkedText } from 'vscode/vscode/vs/base/common/linkedText';
|
|
22
24
|
import { walkthroughsExtensionPoint } from './gettingStartedExtensionPoint.js';
|
|
25
|
+
import 'vscode/vscode/vs/platform/instantiation/common/extensions';
|
|
23
26
|
import { dirname } from 'vscode/vscode/vs/base/common/path';
|
|
24
27
|
import { coalesce } from 'vscode/vscode/vs/base/common/arrays';
|
|
25
28
|
import { IViewsService } from 'vscode/vscode/vs/workbench/services/views/common/viewsService.service';
|
|
@@ -31,10 +34,10 @@ import { CancellationTokenSource } from 'vscode/vscode/vs/base/common/cancellati
|
|
|
31
34
|
import { getDefaultIconPath } from 'vscode/vscode/vs/workbench/services/extensionManagement/common/extensionManagement';
|
|
32
35
|
import { IProductService } from 'vscode/vscode/vs/platform/product/common/productService.service';
|
|
33
36
|
|
|
34
|
-
const HasMultipleNewFileEntries = (
|
|
37
|
+
const HasMultipleNewFileEntries = ( new RawContextKey('hasMultipleNewFileEntries', false));
|
|
35
38
|
const hiddenEntriesConfigurationKey = 'workbench.welcomePage.hiddenCategories';
|
|
36
39
|
const walkthroughMetadataConfigurationKey = 'workbench.welcomePage.walkthroughMetadata';
|
|
37
|
-
const BUILT_IN_SOURCE = ( localize(
|
|
40
|
+
const BUILT_IN_SOURCE = ( localize(10821, "Built-In"));
|
|
38
41
|
const DAYS = 24 * 60 * 60 * 1000;
|
|
39
42
|
const NEW_WALKTHROUGH_TIME = 7 * DAYS;
|
|
40
43
|
let WalkthroughsService = class WalkthroughsService extends Disposable {
|
|
@@ -53,27 +56,27 @@ let WalkthroughsService = class WalkthroughsService extends Disposable {
|
|
|
53
56
|
this.telemetryService = telemetryService;
|
|
54
57
|
this.tasExperimentService = tasExperimentService;
|
|
55
58
|
this.productService = productService;
|
|
56
|
-
this._onDidAddWalkthrough = (
|
|
59
|
+
this._onDidAddWalkthrough = ( new Emitter());
|
|
57
60
|
this.onDidAddWalkthrough = this._onDidAddWalkthrough.event;
|
|
58
|
-
this._onDidRemoveWalkthrough = (
|
|
61
|
+
this._onDidRemoveWalkthrough = ( new Emitter());
|
|
59
62
|
this.onDidRemoveWalkthrough = this._onDidRemoveWalkthrough.event;
|
|
60
|
-
this._onDidChangeWalkthrough = (
|
|
63
|
+
this._onDidChangeWalkthrough = ( new Emitter());
|
|
61
64
|
this.onDidChangeWalkthrough = this._onDidChangeWalkthrough.event;
|
|
62
|
-
this._onDidProgressStep = (
|
|
65
|
+
this._onDidProgressStep = ( new Emitter());
|
|
63
66
|
this.onDidProgressStep = this._onDidProgressStep.event;
|
|
64
|
-
this.sessionEvents = (
|
|
65
|
-
this.completionListeners = (
|
|
66
|
-
this.gettingStartedContributions = (
|
|
67
|
-
this.steps = (
|
|
68
|
-
this.sessionInstalledExtensions = (
|
|
69
|
-
this.categoryVisibilityContextKeys = (
|
|
70
|
-
this.stepCompletionContextKeyExpressions = (
|
|
71
|
-
this.stepCompletionContextKeys = (
|
|
72
|
-
this.metadata = (
|
|
73
|
-
JSON.parse(this.storageService.get(walkthroughMetadataConfigurationKey,
|
|
74
|
-
))
|
|
75
|
-
this.memento = (
|
|
76
|
-
this.stepProgress = this.memento.getMemento(
|
|
67
|
+
this.sessionEvents = ( new Set());
|
|
68
|
+
this.completionListeners = ( new Map());
|
|
69
|
+
this.gettingStartedContributions = ( new Map());
|
|
70
|
+
this.steps = ( new Map());
|
|
71
|
+
this.sessionInstalledExtensions = ( new Set());
|
|
72
|
+
this.categoryVisibilityContextKeys = ( new Set());
|
|
73
|
+
this.stepCompletionContextKeyExpressions = ( new Set());
|
|
74
|
+
this.stepCompletionContextKeys = ( new Set());
|
|
75
|
+
this.metadata = ( new Map(
|
|
76
|
+
JSON.parse(this.storageService.get(walkthroughMetadataConfigurationKey, StorageScope.PROFILE, '[]'))
|
|
77
|
+
));
|
|
78
|
+
this.memento = ( new Memento('gettingStartedService', this.storageService));
|
|
79
|
+
this.stepProgress = this.memento.getMemento(StorageScope.PROFILE, StorageTarget.USER);
|
|
77
80
|
this.initCompletionEventListeners();
|
|
78
81
|
HasMultipleNewFileEntries.bindTo(this.contextService).set(false);
|
|
79
82
|
this.registerWalkthroughs();
|
|
@@ -86,7 +89,7 @@ let WalkthroughsService = class WalkthroughsService extends Disposable {
|
|
|
86
89
|
order: walkthroughs.length - index,
|
|
87
90
|
source: BUILT_IN_SOURCE,
|
|
88
91
|
when: ContextKeyExpr.deserialize(category.when) ?? ContextKeyExpr.true(),
|
|
89
|
-
steps: (
|
|
92
|
+
steps: ( category.content.steps.map((step, index) => {
|
|
90
93
|
return ({
|
|
91
94
|
...step,
|
|
92
95
|
completionEvents: step.completionEvents ?? [],
|
|
@@ -109,11 +112,11 @@ let WalkthroughsService = class WalkthroughsService extends Disposable {
|
|
|
109
112
|
: {
|
|
110
113
|
type: 'markdown',
|
|
111
114
|
path: convertInternalMediaPathToFileURI(step.media.path).with({ query: JSON.stringify({ moduleId: 'vs/workbench/contrib/welcomeGettingStarted/common/media/' + step.media.path }) }),
|
|
112
|
-
base: (
|
|
113
|
-
root: (
|
|
115
|
+
base: ( FileAccess.asFileUri('vs/workbench/contrib/welcomeGettingStarted/common/media/')),
|
|
116
|
+
root: ( FileAccess.asFileUri('vs/workbench/contrib/welcomeGettingStarted/common/media/')),
|
|
114
117
|
}
|
|
115
118
|
});
|
|
116
|
-
}))
|
|
119
|
+
}))
|
|
117
120
|
});
|
|
118
121
|
});
|
|
119
122
|
walkthroughsExtensionPoint.setHandler((_, { added, removed }) => {
|
|
@@ -125,9 +128,9 @@ let WalkthroughsService = class WalkthroughsService extends Disposable {
|
|
|
125
128
|
installed.forEach(ext => this.progressByEvent(`extensionInstalled:${ext.identifier.id.toLowerCase()}`));
|
|
126
129
|
});
|
|
127
130
|
this._register(this.extensionManagementService.onDidInstallExtensions((result) => {
|
|
128
|
-
if ((
|
|
129
|
-
e => ExtensionIdentifier.equals(this.productService.
|
|
130
|
-
)))
|
|
131
|
+
if (( result.some(
|
|
132
|
+
e => ExtensionIdentifier.equals(this.productService.defaultChatAgent?.extensionId, e.identifier.id) && !e?.context?.[EXTENSION_INSTALL_SKIP_WALKTHROUGH_CONTEXT]
|
|
133
|
+
))) {
|
|
131
134
|
result.forEach(e => {
|
|
132
135
|
this.sessionInstalledExtensions.add(e.identifier.id.toLowerCase());
|
|
133
136
|
this.progressByEvent(`extensionInstalled:${e.identifier.id.toLowerCase()}`);
|
|
@@ -145,7 +148,7 @@ let WalkthroughsService = class WalkthroughsService extends Disposable {
|
|
|
145
148
|
this._register(this.contextService.onDidChangeContext(event => {
|
|
146
149
|
if (event.affectsSome(this.stepCompletionContextKeys)) {
|
|
147
150
|
this.stepCompletionContextKeyExpressions.forEach(expression => {
|
|
148
|
-
if (event.affectsSome((
|
|
151
|
+
if (event.affectsSome(( new Set(( expression.keys())))) && this.contextService.contextMatchesRules(expression)) {
|
|
149
152
|
this.progressByEvent(`onContext:` + expression.serialize());
|
|
150
153
|
}
|
|
151
154
|
});
|
|
@@ -172,17 +175,17 @@ let WalkthroughsService = class WalkthroughsService extends Disposable {
|
|
|
172
175
|
const walkthrough = this.gettingStartedContributions.get(id);
|
|
173
176
|
const prior = this.metadata.get(id);
|
|
174
177
|
if (prior && walkthrough) {
|
|
175
|
-
this.metadata.set(id, { ...prior, manaullyOpened: true, stepIDs: (
|
|
178
|
+
this.metadata.set(id, { ...prior, manaullyOpened: true, stepIDs: ( walkthrough.steps.map(s => s.id)) });
|
|
176
179
|
}
|
|
177
|
-
this.storageService.store(walkthroughMetadataConfigurationKey, JSON.stringify([...this.metadata.entries()]),
|
|
180
|
+
this.storageService.store(walkthroughMetadataConfigurationKey, JSON.stringify([...this.metadata.entries()]), StorageScope.PROFILE, StorageTarget.USER);
|
|
178
181
|
}
|
|
179
182
|
async registerExtensionWalkthroughContributions(extension) {
|
|
180
183
|
const convertExtensionPathToFileURI = (path) => path.startsWith('https://')
|
|
181
|
-
? (
|
|
184
|
+
? ( URI.parse(path, true))
|
|
182
185
|
: FileAccess.uriToFileUri(joinPath(extension.extensionLocation, path));
|
|
183
186
|
const convertExtensionRelativePathsToBrowserURIs = (path) => {
|
|
184
187
|
const convertPath = (path) => path.startsWith('https://')
|
|
185
|
-
? (
|
|
188
|
+
? ( URI.parse(path, true))
|
|
186
189
|
: FileAccess.uriToBrowserUri(joinPath(extension.extensionLocation, path));
|
|
187
190
|
if (typeof path === 'string') {
|
|
188
191
|
const converted = convertPath(path);
|
|
@@ -206,13 +209,13 @@ let WalkthroughsService = class WalkthroughsService extends Disposable {
|
|
|
206
209
|
const categoryID = extension.identifier.value + '#' + walkthrough.id;
|
|
207
210
|
const isNewlyInstalled = !this.metadata.get(categoryID);
|
|
208
211
|
if (isNewlyInstalled) {
|
|
209
|
-
this.metadata.set(categoryID, { firstSeen: +(
|
|
212
|
+
this.metadata.set(categoryID, { firstSeen: +( new Date()), stepIDs: walkthrough.steps?.map(s => s.id) ?? [], manaullyOpened: false });
|
|
210
213
|
}
|
|
211
214
|
const override = await Promise.race([
|
|
212
215
|
this.tasExperimentService?.getTreatment(`gettingStarted.overrideCategory.${extension.identifier.value + '.' + walkthrough.id}.when`),
|
|
213
|
-
(
|
|
216
|
+
( new Promise(resolve => setTimeout(() => resolve(walkthrough.when), 5000)))
|
|
214
217
|
]);
|
|
215
|
-
if ((
|
|
218
|
+
if (( this.sessionInstalledExtensions.has(extension.identifier.value.toLowerCase()))
|
|
216
219
|
&& this.contextService.contextMatchesRules(ContextKeyExpr.deserialize(override ?? walkthrough.when) ?? ContextKeyExpr.true())) {
|
|
217
220
|
this.sessionInstalledExtensions.delete(extension.identifier.value.toLowerCase());
|
|
218
221
|
if (index < sectionToOpenIndex && isNewlyInstalled) {
|
|
@@ -220,7 +223,7 @@ let WalkthroughsService = class WalkthroughsService extends Disposable {
|
|
|
220
223
|
sectionToOpenIndex = index;
|
|
221
224
|
}
|
|
222
225
|
}
|
|
223
|
-
const steps = ( (
|
|
226
|
+
const steps = ( (walkthrough.steps ?? []).map((step, index) => {
|
|
224
227
|
const description = parseDescription(step.description || '');
|
|
225
228
|
const fullyQualifiedID = extension.identifier.value + '#' + walkthrough.id + '#' + step.id;
|
|
226
229
|
let media;
|
|
@@ -250,7 +253,7 @@ let WalkthroughsService = class WalkthroughsService extends Disposable {
|
|
|
250
253
|
};
|
|
251
254
|
}
|
|
252
255
|
else {
|
|
253
|
-
throw (
|
|
256
|
+
throw ( new Error('Unknown walkthrough format detected for ' + fullyQualifiedID));
|
|
254
257
|
}
|
|
255
258
|
return ({
|
|
256
259
|
description,
|
|
@@ -262,11 +265,11 @@ let WalkthroughsService = class WalkthroughsService extends Disposable {
|
|
|
262
265
|
category: categoryID,
|
|
263
266
|
order: index,
|
|
264
267
|
});
|
|
265
|
-
}))
|
|
268
|
+
}));
|
|
266
269
|
let isFeatured = false;
|
|
267
270
|
if (walkthrough.featuredFor) {
|
|
268
|
-
const folders = (
|
|
269
|
-
const token = (
|
|
271
|
+
const folders = ( this.workspaceContextService.getWorkspace().folders.map(f => f.uri));
|
|
272
|
+
const token = ( new CancellationTokenSource());
|
|
270
273
|
setTimeout(() => token.cancel(), 2000);
|
|
271
274
|
isFeatured = await this.instantiationService.invokeFunction(a => checkGlobFileExists(a, folders, walkthrough.featuredFor, token.token));
|
|
272
275
|
}
|
|
@@ -283,7 +286,7 @@ let WalkthroughsService = class WalkthroughsService extends Disposable {
|
|
|
283
286
|
icon: {
|
|
284
287
|
type: 'image',
|
|
285
288
|
path: iconStr
|
|
286
|
-
? (
|
|
289
|
+
? ( FileAccess.uriToBrowserUri(joinPath(extension.extensionLocation, iconStr)).toString(true))
|
|
287
290
|
: getDefaultIconPath()
|
|
288
291
|
},
|
|
289
292
|
when: ContextKeyExpr.deserialize(override ?? walkthrough.when) ?? ContextKeyExpr.true(),
|
|
@@ -291,11 +294,11 @@ let WalkthroughsService = class WalkthroughsService extends Disposable {
|
|
|
291
294
|
this._registerWalkthrough(walkthoughDescriptor);
|
|
292
295
|
this._onDidAddWalkthrough.fire(this.resolveWalkthrough(walkthoughDescriptor));
|
|
293
296
|
}));
|
|
294
|
-
this.storageService.store(walkthroughMetadataConfigurationKey, JSON.stringify([...this.metadata.entries()]),
|
|
297
|
+
this.storageService.store(walkthroughMetadataConfigurationKey, JSON.stringify([...this.metadata.entries()]), StorageScope.PROFILE, StorageTarget.USER);
|
|
295
298
|
const hadLastFoucs = await this.hostService.hadLastFocus();
|
|
296
299
|
if (hadLastFoucs && sectionToOpen && this.configurationService.getValue('workbench.welcomePage.walkthroughs.openOnInstall')) {
|
|
297
300
|
this.telemetryService.publicLog2('gettingStarted.didAutoOpenWalkthrough', { id: sectionToOpen });
|
|
298
|
-
this.commandService.executeCommand('workbench.action.openWalkthrough', sectionToOpen
|
|
301
|
+
this.commandService.executeCommand('workbench.action.openWalkthrough', sectionToOpen);
|
|
299
302
|
}
|
|
300
303
|
}
|
|
301
304
|
unregisterExtensionWalkthroughContributions(extension) {
|
|
@@ -320,8 +323,8 @@ let WalkthroughsService = class WalkthroughsService extends Disposable {
|
|
|
320
323
|
return this.resolveWalkthrough(walkthrough);
|
|
321
324
|
}
|
|
322
325
|
getWalkthroughs() {
|
|
323
|
-
const registeredCategories = [...(
|
|
324
|
-
const categoriesWithCompletion = ( (
|
|
326
|
+
const registeredCategories = [...( this.gettingStartedContributions.values())];
|
|
327
|
+
const categoriesWithCompletion = ( ( registeredCategories
|
|
325
328
|
.map(category => {
|
|
326
329
|
return {
|
|
327
330
|
...category,
|
|
@@ -330,26 +333,26 @@ let WalkthroughsService = class WalkthroughsService extends Disposable {
|
|
|
330
333
|
steps: category.steps
|
|
331
334
|
}
|
|
332
335
|
};
|
|
333
|
-
}))
|
|
336
|
+
}))
|
|
334
337
|
.filter(category => category.content.type !== 'steps' || category.content.steps.length)
|
|
335
|
-
.map(category => this.resolveWalkthrough(category)))
|
|
338
|
+
.map(category => this.resolveWalkthrough(category)));
|
|
336
339
|
return categoriesWithCompletion;
|
|
337
340
|
}
|
|
338
341
|
resolveWalkthrough(category) {
|
|
339
|
-
const stepsWithProgress = (
|
|
342
|
+
const stepsWithProgress = ( category.steps.map(step => this.getStepProgress(step)));
|
|
340
343
|
const hasOpened = this.metadata.get(category.id)?.manaullyOpened;
|
|
341
344
|
const firstSeenDate = this.metadata.get(category.id)?.firstSeen;
|
|
342
|
-
const isNew = firstSeenDate && firstSeenDate > (+(
|
|
345
|
+
const isNew = firstSeenDate && firstSeenDate > (+( new Date()) - NEW_WALKTHROUGH_TIME);
|
|
343
346
|
const lastStepIDs = this.metadata.get(category.id)?.stepIDs;
|
|
344
347
|
const rawCategory = this.gettingStartedContributions.get(category.id);
|
|
345
348
|
if (!rawCategory) {
|
|
346
349
|
throw Error('Could not find walkthrough with id ' + category.id);
|
|
347
350
|
}
|
|
348
|
-
const currentStepIds = (
|
|
349
|
-
const hasNewSteps = lastStepIDs && (currentStepIds.length !== lastStepIDs.length || (
|
|
351
|
+
const currentStepIds = ( rawCategory.steps.map(s => s.id));
|
|
352
|
+
const hasNewSteps = lastStepIDs && (currentStepIds.length !== lastStepIDs.length || ( currentStepIds.some((id, index) => id !== lastStepIDs[index])));
|
|
350
353
|
let recencyBonus = 0;
|
|
351
354
|
if (firstSeenDate) {
|
|
352
|
-
const currentDate = +(
|
|
355
|
+
const currentDate = +( new Date());
|
|
353
356
|
const timeSinceFirstSeen = currentDate - firstSeenDate;
|
|
354
357
|
recencyBonus = Math.max(0, (NEW_WALKTHROUGH_TIME - timeSinceFirstSeen) / NEW_WALKTHROUGH_TIME);
|
|
355
358
|
}
|
|
@@ -387,7 +390,7 @@ let WalkthroughsService = class WalkthroughsService extends Disposable {
|
|
|
387
390
|
this._onDidProgressStep.fire(this.getStepProgress(step));
|
|
388
391
|
}
|
|
389
392
|
progressByEvent(event) {
|
|
390
|
-
if ((
|
|
393
|
+
if (( this.sessionEvents.has(event))) {
|
|
391
394
|
return;
|
|
392
395
|
}
|
|
393
396
|
this.sessionEvents.add(event);
|
|
@@ -396,7 +399,7 @@ let WalkthroughsService = class WalkthroughsService extends Disposable {
|
|
|
396
399
|
registerWalkthrough(walkthoughDescriptor) {
|
|
397
400
|
this._registerWalkthrough({
|
|
398
401
|
...walkthoughDescriptor,
|
|
399
|
-
steps: (
|
|
402
|
+
steps: ( walkthoughDescriptor.steps.map(step => ({ ...step, description: parseDescription(step.description) })))
|
|
400
403
|
});
|
|
401
404
|
}
|
|
402
405
|
_registerWalkthrough(walkthroughDescriptor) {
|
|
@@ -407,14 +410,14 @@ let WalkthroughsService = class WalkthroughsService extends Disposable {
|
|
|
407
410
|
}
|
|
408
411
|
this.gettingStartedContributions.set(walkthroughDescriptor.id, walkthroughDescriptor);
|
|
409
412
|
walkthroughDescriptor.steps.forEach(step => {
|
|
410
|
-
if ((
|
|
413
|
+
if (( this.steps.has(step.id))) {
|
|
411
414
|
throw Error('Attempting to register step with id ' + step.id + ' twice. Second is dropped.');
|
|
412
415
|
}
|
|
413
416
|
this.steps.set(step.id, step);
|
|
414
|
-
(
|
|
417
|
+
( step.when.keys()).forEach(key => this.categoryVisibilityContextKeys.add(key));
|
|
415
418
|
this.registerDoneListeners(step);
|
|
416
419
|
});
|
|
417
|
-
(
|
|
420
|
+
( walkthroughDescriptor.when.keys()).forEach(key => this.categoryVisibilityContextKeys.add(key));
|
|
418
421
|
}
|
|
419
422
|
registerDoneListeners(step) {
|
|
420
423
|
if (step.doneOn) {
|
|
@@ -424,7 +427,7 @@ let WalkthroughsService = class WalkthroughsService extends Disposable {
|
|
|
424
427
|
if (!step.completionEvents.length) {
|
|
425
428
|
step.completionEvents = coalesce(step.description
|
|
426
429
|
.filter(linkedText => linkedText.nodes.length === 1)
|
|
427
|
-
.flatMap(linkedText => (
|
|
430
|
+
.flatMap(linkedText => ( linkedText.nodes
|
|
428
431
|
.filter(((node) => typeof node !== 'string'))
|
|
429
432
|
.map(({ href }) => {
|
|
430
433
|
if (href.startsWith('command:')) {
|
|
@@ -434,7 +437,7 @@ let WalkthroughsService = class WalkthroughsService extends Disposable {
|
|
|
434
437
|
return 'onLink:' + href;
|
|
435
438
|
}
|
|
436
439
|
return undefined;
|
|
437
|
-
}))))
|
|
440
|
+
}))));
|
|
438
441
|
}
|
|
439
442
|
if (!step.completionEvents.length) {
|
|
440
443
|
step.completionEvents.push('stepSelected');
|
|
@@ -455,7 +458,7 @@ let WalkthroughsService = class WalkthroughsService extends Disposable {
|
|
|
455
458
|
const expression = ContextKeyExpr.deserialize(argument);
|
|
456
459
|
if (expression) {
|
|
457
460
|
this.stepCompletionContextKeyExpressions.add(expression);
|
|
458
|
-
(
|
|
461
|
+
( expression.keys()).forEach(key => this.stepCompletionContextKeys.add(key));
|
|
459
462
|
event = eventType + ':' + expression.serialize();
|
|
460
463
|
if (this.contextService.contextMatchesRules(expression)) {
|
|
461
464
|
this.sessionEvents.add(event);
|
|
@@ -485,8 +488,8 @@ let WalkthroughsService = class WalkthroughsService extends Disposable {
|
|
|
485
488
|
}
|
|
486
489
|
}
|
|
487
490
|
registerCompletionListener(event, step) {
|
|
488
|
-
if (!(
|
|
489
|
-
this.completionListeners.set(event, (
|
|
491
|
+
if (!( this.completionListeners.has(event))) {
|
|
492
|
+
this.completionListeners.set(event, ( new Set()));
|
|
490
493
|
}
|
|
491
494
|
this.completionListeners.get(event)?.add(step.id);
|
|
492
495
|
}
|
|
@@ -498,28 +501,28 @@ let WalkthroughsService = class WalkthroughsService extends Disposable {
|
|
|
498
501
|
return step;
|
|
499
502
|
}
|
|
500
503
|
};
|
|
501
|
-
WalkthroughsService = (
|
|
502
|
-
(
|
|
503
|
-
(
|
|
504
|
-
(
|
|
505
|
-
(
|
|
506
|
-
(
|
|
507
|
-
(
|
|
508
|
-
(
|
|
509
|
-
(
|
|
510
|
-
(
|
|
511
|
-
(
|
|
512
|
-
(
|
|
513
|
-
(
|
|
514
|
-
(
|
|
515
|
-
], WalkthroughsService))
|
|
516
|
-
const parseDescription = (desc) => (
|
|
504
|
+
WalkthroughsService = ( __decorate([
|
|
505
|
+
( __param(0, IStorageService)),
|
|
506
|
+
( __param(1, ICommandService)),
|
|
507
|
+
( __param(2, IInstantiationService)),
|
|
508
|
+
( __param(3, IWorkspaceContextService)),
|
|
509
|
+
( __param(4, IContextKeyService)),
|
|
510
|
+
( __param(5, IUserDataSyncEnablementService)),
|
|
511
|
+
( __param(6, IConfigurationService)),
|
|
512
|
+
( __param(7, IExtensionManagementService)),
|
|
513
|
+
( __param(8, IHostService)),
|
|
514
|
+
( __param(9, IViewsService)),
|
|
515
|
+
( __param(10, ITelemetryService)),
|
|
516
|
+
( __param(11, IWorkbenchAssignmentService)),
|
|
517
|
+
( __param(12, IProductService))
|
|
518
|
+
], WalkthroughsService));
|
|
519
|
+
const parseDescription = (desc) => ( desc.split('\n').filter(x => x).map(text => parseLinkedText(text)));
|
|
517
520
|
const convertInternalMediaPathToFileURI = (path) => path.startsWith('https://')
|
|
518
|
-
? (
|
|
519
|
-
: (
|
|
521
|
+
? ( URI.parse(path, true))
|
|
522
|
+
: ( FileAccess.asFileUri(`vs/workbench/contrib/welcomeGettingStarted/common/media/${path}`));
|
|
520
523
|
const convertInternalMediaPathToBrowserURI = (path) => path.startsWith('https://')
|
|
521
|
-
? (
|
|
522
|
-
: (
|
|
524
|
+
? ( URI.parse(path, true))
|
|
525
|
+
: ( FileAccess.asBrowserUri(`vs/workbench/contrib/welcomeGettingStarted/common/media/${path}`));
|
|
523
526
|
const convertInternalMediaPathsToBrowserURIs = (path) => {
|
|
524
527
|
if (typeof path === 'string') {
|
|
525
528
|
const converted = convertInternalMediaPathToBrowserURI(path);
|