@codingame/monaco-vscode-scm-service-override 1.83.15

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.
@@ -0,0 +1,49 @@
1
+ import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
2
+ import './media/scm.css.js';
3
+ import { localizeWithPath } from 'monaco-editor/esm/vs/nls.js';
4
+ import { ITelemetryService } from 'monaco-editor/esm/vs/platform/telemetry/common/telemetry.js';
5
+ import { VIEWLET_ID } from 'vscode/vscode/vs/workbench/contrib/scm/common/scm';
6
+ import { IInstantiationService } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
7
+ import { IContextMenuService } from 'monaco-editor/esm/vs/platform/contextview/browser/contextView.js';
8
+ import { IThemeService } from 'monaco-editor/esm/vs/platform/theme/common/themeService.js';
9
+ import { IStorageService } from 'monaco-editor/esm/vs/platform/storage/common/storage.js';
10
+ import { IConfigurationService } from 'monaco-editor/esm/vs/platform/configuration/common/configuration.js';
11
+ import { IWorkbenchLayoutService } from 'vscode/vscode/vs/workbench/services/layout/browser/layoutService';
12
+ import { IExtensionService } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions';
13
+ import { IWorkspaceContextService } from 'monaco-editor/esm/vs/platform/workspace/common/workspace.js';
14
+ import { IViewDescriptorService } from 'vscode/vscode/vs/workbench/common/views';
15
+ import { ViewPaneContainer } from 'vscode/vscode/vs/workbench/browser/parts/views/viewPaneContainer';
16
+
17
+ let SCMViewPaneContainer = class SCMViewPaneContainer extends ViewPaneContainer {
18
+ constructor(layoutService, telemetryService, instantiationService, contextMenuService, themeService, storageService, configurationService, extensionService, contextService, viewDescriptorService) {
19
+ super(VIEWLET_ID, { mergeViewWithContainerWhenSingleView: true }, instantiationService, configurationService, layoutService, contextMenuService, telemetryService, extensionService, themeService, storageService, contextService, viewDescriptorService);
20
+ }
21
+ create(parent) {
22
+ super.create(parent);
23
+ parent.classList.add('scm-viewlet');
24
+ }
25
+ getOptimalWidth() {
26
+ return 400;
27
+ }
28
+ getTitle() {
29
+ return ( localizeWithPath(
30
+ 'vs/workbench/contrib/scm/browser/scmViewPaneContainer',
31
+ 'source control',
32
+ "Source Control"
33
+ ));
34
+ }
35
+ };
36
+ SCMViewPaneContainer = ( __decorate([
37
+ ( __param(0, IWorkbenchLayoutService)),
38
+ ( __param(1, ITelemetryService)),
39
+ ( __param(2, IInstantiationService)),
40
+ ( __param(3, IContextMenuService)),
41
+ ( __param(4, IThemeService)),
42
+ ( __param(5, IStorageService)),
43
+ ( __param(6, IConfigurationService)),
44
+ ( __param(7, IExtensionService)),
45
+ ( __param(8, IWorkspaceContextService)),
46
+ ( __param(9, IViewDescriptorService))
47
+ ], SCMViewPaneContainer));
48
+
49
+ export { SCMViewPaneContainer };
@@ -0,0 +1,305 @@
1
+ import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
2
+ import { DisposableStore } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
3
+ import { Emitter, Event } from 'monaco-editor/esm/vs/base/common/event.js';
4
+ import { ISCMService } from 'vscode/vscode/vs/workbench/contrib/scm/common/scm';
5
+ import { Iterable } from 'monaco-editor/esm/vs/base/common/iterator.js';
6
+ import { IInstantiationService } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
7
+ import { SCMMenus } from './menus.js';
8
+ import { IStorageService } from 'monaco-editor/esm/vs/platform/storage/common/storage.js';
9
+ import { debounce } from 'monaco-editor/esm/vs/base/common/decorators.js';
10
+ import { IWorkspaceContextService } from 'monaco-editor/esm/vs/platform/workspace/common/workspace.js';
11
+ import { comparePaths, compareFileNames } from 'monaco-editor/esm/vs/base/common/comparers.js';
12
+ import { basename } from 'monaco-editor/esm/vs/base/common/resources.js';
13
+ import { binarySearch } from 'monaco-editor/esm/vs/base/common/arrays.js';
14
+ import { IConfigurationService } from 'monaco-editor/esm/vs/platform/configuration/common/configuration.js';
15
+ import { RawContextKey, IContextKeyService } from 'monaco-editor/esm/vs/platform/contextkey/common/contextkey.js';
16
+
17
+ function getProviderStorageKey(provider) {
18
+ return `${provider.contextValue}:${provider.label}${provider.rootUri ? `:${( provider.rootUri.toString())}` : ''}`;
19
+ }
20
+ function getRepositoryName(workspaceContextService, repository) {
21
+ if (!repository.provider.rootUri) {
22
+ return repository.provider.label;
23
+ }
24
+ const folder = workspaceContextService.getWorkspaceFolder(repository.provider.rootUri);
25
+ return folder?.uri.toString() === ( repository.provider.rootUri.toString()) ? folder.name : basename(repository.provider.rootUri);
26
+ }
27
+ const RepositoryContextKeys = {
28
+ RepositorySortKey: ( new RawContextKey(
29
+ 'scmRepositorySortKey',
30
+ "discoveryTime"
31
+ )),
32
+ };
33
+ let SCMViewService = class SCMViewService {
34
+ get repositories() {
35
+ return ( this._repositories.map(r => r.repository));
36
+ }
37
+ get visibleRepositories() {
38
+ if (this._repositoriesSortKey === "discoveryTime" ) {
39
+ return ( this._repositories.filter(r => r.selectionIndex !== -1)
40
+ .sort((r1, r2) => r1.selectionIndex - r2.selectionIndex)
41
+ .map(r => r.repository));
42
+ }
43
+ return ( this._repositories
44
+ .filter(r => r.selectionIndex !== -1)
45
+ .map(r => r.repository));
46
+ }
47
+ set visibleRepositories(visibleRepositories) {
48
+ const set = ( new Set(visibleRepositories));
49
+ const added = ( new Set());
50
+ const removed = ( new Set());
51
+ for (const repositoryView of this._repositories) {
52
+ if (!( set.has(repositoryView.repository)) && repositoryView.selectionIndex !== -1) {
53
+ repositoryView.selectionIndex = -1;
54
+ removed.add(repositoryView.repository);
55
+ }
56
+ if (( set.has(repositoryView.repository))) {
57
+ if (repositoryView.selectionIndex === -1) {
58
+ added.add(repositoryView.repository);
59
+ }
60
+ repositoryView.selectionIndex = visibleRepositories.indexOf(repositoryView.repository);
61
+ }
62
+ }
63
+ if (added.size === 0 && removed.size === 0) {
64
+ return;
65
+ }
66
+ this._onDidSetVisibleRepositories.fire({ added, removed });
67
+ if (this._repositories.find(r => r.focused && r.selectionIndex === -1)) {
68
+ this.focus(this._repositories.find(r => r.selectionIndex !== -1)?.repository);
69
+ }
70
+ }
71
+ get focusedRepository() {
72
+ return this._repositories.find(r => r.focused)?.repository;
73
+ }
74
+ constructor(scmService, contextKeyService, instantiationService, configurationService, storageService, workspaceContextService) {
75
+ this.configurationService = configurationService;
76
+ this.storageService = storageService;
77
+ this.workspaceContextService = workspaceContextService;
78
+ this.didFinishLoading = false;
79
+ this.didSelectRepository = false;
80
+ this.disposables = ( new DisposableStore());
81
+ this._repositories = [];
82
+ this._onDidChangeRepositories = ( new Emitter());
83
+ this.onDidChangeRepositories = this._onDidChangeRepositories.event;
84
+ this._onDidSetVisibleRepositories = ( new Emitter());
85
+ this.onDidChangeVisibleRepositories = Event.any(this._onDidSetVisibleRepositories.event, Event.debounce(this._onDidChangeRepositories.event, (last, e) => {
86
+ if (!last) {
87
+ return e;
88
+ }
89
+ const added = ( new Set(last.added));
90
+ const removed = ( new Set(last.removed));
91
+ for (const repository of e.added) {
92
+ if (( removed.has(repository))) {
93
+ removed.delete(repository);
94
+ }
95
+ else {
96
+ added.add(repository);
97
+ }
98
+ }
99
+ for (const repository of e.removed) {
100
+ if (( added.has(repository))) {
101
+ added.delete(repository);
102
+ }
103
+ else {
104
+ removed.add(repository);
105
+ }
106
+ }
107
+ return { added, removed };
108
+ }, 0, undefined, undefined, undefined, this.disposables));
109
+ this._onDidFocusRepository = ( new Emitter());
110
+ this.onDidFocusRepository = this._onDidFocusRepository.event;
111
+ this.menus = instantiationService.createInstance(SCMMenus);
112
+ try {
113
+ this.previousState = JSON.parse(storageService.get('scm:view:visibleRepositories', 1 , ''));
114
+ }
115
+ catch {
116
+ }
117
+ this._repositoriesSortKey = this.previousState?.sortKey ?? this.getViewSortOrder();
118
+ this._sortKeyContextKey = RepositoryContextKeys.RepositorySortKey.bindTo(contextKeyService);
119
+ this._sortKeyContextKey.set(this._repositoriesSortKey);
120
+ scmService.onDidAddRepository(this.onDidAddRepository, this, this.disposables);
121
+ scmService.onDidRemoveRepository(this.onDidRemoveRepository, this, this.disposables);
122
+ for (const repository of scmService.repositories) {
123
+ this.onDidAddRepository(repository);
124
+ }
125
+ storageService.onWillSaveState(this.onWillSaveState, this, this.disposables);
126
+ }
127
+ onDidAddRepository(repository) {
128
+ if (!this.didFinishLoading) {
129
+ this.eventuallyFinishLoading();
130
+ }
131
+ const repositoryView = {
132
+ repository, discoveryTime: Date.now(), focused: false, selectionIndex: -1
133
+ };
134
+ let removed = Iterable.empty();
135
+ if (this.previousState) {
136
+ const index = this.previousState.all.indexOf(getProviderStorageKey(repository.provider));
137
+ if (index === -1) {
138
+ const added = [];
139
+ this.insertRepositoryView(this._repositories, repositoryView);
140
+ this._repositories.forEach((repositoryView, index) => {
141
+ if (repositoryView.selectionIndex === -1) {
142
+ added.push(repositoryView.repository);
143
+ }
144
+ repositoryView.selectionIndex = index;
145
+ });
146
+ this._onDidChangeRepositories.fire({ added, removed: Iterable.empty() });
147
+ this.didSelectRepository = false;
148
+ return;
149
+ }
150
+ if (this.previousState.visible.indexOf(index) === -1) {
151
+ if (this.didSelectRepository) {
152
+ this.insertRepositoryView(this._repositories, repositoryView);
153
+ this._onDidChangeRepositories.fire({ added: Iterable.empty(), removed: Iterable.empty() });
154
+ return;
155
+ }
156
+ }
157
+ else {
158
+ if (!this.didSelectRepository) {
159
+ removed = [...this.visibleRepositories];
160
+ this._repositories.forEach(r => {
161
+ r.focused = false;
162
+ r.selectionIndex = -1;
163
+ });
164
+ this.didSelectRepository = true;
165
+ }
166
+ }
167
+ }
168
+ const maxSelectionIndex = this.getMaxSelectionIndex();
169
+ this.insertRepositoryView(this._repositories, { ...repositoryView, selectionIndex: maxSelectionIndex + 1 });
170
+ this._onDidChangeRepositories.fire({ added: [repositoryView.repository], removed });
171
+ if (!this._repositories.find(r => r.focused)) {
172
+ this.focus(repository);
173
+ }
174
+ }
175
+ onDidRemoveRepository(repository) {
176
+ if (!this.didFinishLoading) {
177
+ this.eventuallyFinishLoading();
178
+ }
179
+ const repositoriesIndex = this._repositories.findIndex(r => r.repository === repository);
180
+ if (repositoriesIndex === -1) {
181
+ return;
182
+ }
183
+ let added = Iterable.empty();
184
+ const repositoryView = this._repositories.splice(repositoriesIndex, 1);
185
+ if (this._repositories.length > 0 && this.visibleRepositories.length === 0) {
186
+ this._repositories[0].selectionIndex = 0;
187
+ added = [this._repositories[0].repository];
188
+ }
189
+ this._onDidChangeRepositories.fire({ added, removed: ( repositoryView.map(r => r.repository)) });
190
+ if (repositoryView.length === 1 && repositoryView[0].focused && this.visibleRepositories.length > 0) {
191
+ this.focus(this.visibleRepositories[0]);
192
+ }
193
+ }
194
+ isVisible(repository) {
195
+ return this._repositories.find(r => r.repository === repository)?.selectionIndex !== -1;
196
+ }
197
+ toggleVisibility(repository, visible) {
198
+ if (typeof visible === 'undefined') {
199
+ visible = !this.isVisible(repository);
200
+ }
201
+ else if (this.isVisible(repository) === visible) {
202
+ return;
203
+ }
204
+ if (visible) {
205
+ this.visibleRepositories = [...this.visibleRepositories, repository];
206
+ }
207
+ else {
208
+ const index = this.visibleRepositories.indexOf(repository);
209
+ if (index > -1) {
210
+ this.visibleRepositories = [
211
+ ...this.visibleRepositories.slice(0, index),
212
+ ...this.visibleRepositories.slice(index + 1)
213
+ ];
214
+ }
215
+ }
216
+ }
217
+ toggleSortKey(sortKey) {
218
+ this._repositoriesSortKey = sortKey;
219
+ this._sortKeyContextKey.set(this._repositoriesSortKey);
220
+ this._repositories.sort(this.compareRepositories.bind(this));
221
+ this._onDidChangeRepositories.fire({ added: Iterable.empty(), removed: Iterable.empty() });
222
+ }
223
+ focus(repository) {
224
+ if (repository && !this.isVisible(repository)) {
225
+ return;
226
+ }
227
+ this._repositories.forEach(r => r.focused = r.repository === repository);
228
+ if (this._repositories.find(r => r.focused)) {
229
+ this._onDidFocusRepository.fire(repository);
230
+ }
231
+ }
232
+ compareRepositories(op1, op2) {
233
+ if (this._repositoriesSortKey === "discoveryTime" ) {
234
+ return op1.discoveryTime - op2.discoveryTime;
235
+ }
236
+ if (this._repositoriesSortKey === 'path' && op1.repository.provider.rootUri && op2.repository.provider.rootUri) {
237
+ return comparePaths(op1.repository.provider.rootUri.fsPath, op2.repository.provider.rootUri.fsPath);
238
+ }
239
+ const name1 = getRepositoryName(this.workspaceContextService, op1.repository);
240
+ const name2 = getRepositoryName(this.workspaceContextService, op2.repository);
241
+ const nameComparison = compareFileNames(name1, name2);
242
+ if (nameComparison === 0 && op1.repository.provider.rootUri && op2.repository.provider.rootUri) {
243
+ return comparePaths(op1.repository.provider.rootUri.fsPath, op2.repository.provider.rootUri.fsPath);
244
+ }
245
+ return nameComparison;
246
+ }
247
+ getMaxSelectionIndex() {
248
+ return this._repositories.length === 0 ? -1 :
249
+ Math.max(...( this._repositories.map(r => r.selectionIndex)));
250
+ }
251
+ getViewSortOrder() {
252
+ const sortOder = this.configurationService.getValue('scm.repositories.sortOrder');
253
+ switch (sortOder) {
254
+ case 'discovery time':
255
+ return "discoveryTime" ;
256
+ case 'name':
257
+ return "name" ;
258
+ case 'path':
259
+ return "path" ;
260
+ default:
261
+ return "discoveryTime" ;
262
+ }
263
+ }
264
+ insertRepositoryView(repositories, repositoryView) {
265
+ const index = binarySearch(repositories, repositoryView, this.compareRepositories.bind(this));
266
+ repositories.splice(index < 0 ? ~index : index, 0, repositoryView);
267
+ }
268
+ onWillSaveState() {
269
+ if (!this.didFinishLoading) {
270
+ return;
271
+ }
272
+ const all = ( this.repositories.map(r => getProviderStorageKey(r.provider)));
273
+ const visible = ( this.visibleRepositories.map(r => all.indexOf(getProviderStorageKey(r.provider))));
274
+ const raw = JSON.stringify({ all, sortKey: this._repositoriesSortKey, visible });
275
+ this.storageService.store('scm:view:visibleRepositories', raw, 1 , 1 );
276
+ }
277
+ eventuallyFinishLoading() {
278
+ this.finishLoading();
279
+ }
280
+ finishLoading() {
281
+ if (this.didFinishLoading) {
282
+ return;
283
+ }
284
+ this.didFinishLoading = true;
285
+ this.previousState = undefined;
286
+ }
287
+ dispose() {
288
+ this.disposables.dispose();
289
+ this._onDidChangeRepositories.dispose();
290
+ this._onDidSetVisibleRepositories.dispose();
291
+ }
292
+ };
293
+ SCMViewService.__decorator = ( __decorate([
294
+ debounce(5000)
295
+ ], SCMViewService.prototype, "eventuallyFinishLoading", null));
296
+ SCMViewService = ( __decorate([
297
+ ( __param(0, ISCMService)),
298
+ ( __param(1, IContextKeyService)),
299
+ ( __param(2, IInstantiationService)),
300
+ ( __param(3, IConfigurationService)),
301
+ ( __param(4, IStorageService)),
302
+ ( __param(5, IWorkspaceContextService))
303
+ ], SCMViewService));
304
+
305
+ export { RepositoryContextKeys, SCMViewService };
@@ -0,0 +1,86 @@
1
+ import { Action } from 'monaco-editor/esm/vs/base/common/actions.js';
2
+ import { createAndFillInActionBarActions, createAndFillInContextMenuActions, createActionViewItem } from 'monaco-editor/esm/vs/platform/actions/browser/menuEntryActionViewItem.js';
3
+ import { equals } from 'monaco-editor/esm/vs/base/common/arrays.js';
4
+ import { ActionViewItem } from 'monaco-editor/esm/vs/base/browser/ui/actionbar/actionViewItems.js';
5
+ import { renderLabelWithIcons } from 'monaco-editor/esm/vs/base/browser/ui/iconLabel/iconLabels.js';
6
+ import { reset } from 'monaco-editor/esm/vs/base/browser/dom.js';
7
+
8
+ function isSCMRepositoryArray(element) {
9
+ return Array.isArray(element) && element.every(r => isSCMRepository(r));
10
+ }
11
+ function isSCMRepository(element) {
12
+ return !!element.provider && !!element.input;
13
+ }
14
+ function isSCMInput(element) {
15
+ return !!element.validateInput && typeof element.value === 'string';
16
+ }
17
+ function isSCMActionButton(element) {
18
+ return element.type === 'actionButton';
19
+ }
20
+ function isSCMResourceGroup(element) {
21
+ return !!element.provider && !!element.elements;
22
+ }
23
+ function isSCMResource(element) {
24
+ return !!element.sourceUri && isSCMResourceGroup(element.resourceGroup);
25
+ }
26
+ const compareActions = (a, b) => a.id === b.id && a.enabled === b.enabled;
27
+ function connectPrimaryMenu(menu, callback, primaryGroup) {
28
+ let cachedPrimary = [];
29
+ let cachedSecondary = [];
30
+ const updateActions = () => {
31
+ const primary = [];
32
+ const secondary = [];
33
+ createAndFillInActionBarActions(menu, { shouldForwardArgs: true }, { primary, secondary }, primaryGroup);
34
+ if (equals(cachedPrimary, primary, compareActions) && equals(cachedSecondary, secondary, compareActions)) {
35
+ return;
36
+ }
37
+ cachedPrimary = primary;
38
+ cachedSecondary = secondary;
39
+ callback(primary, secondary);
40
+ };
41
+ updateActions();
42
+ return menu.onDidChange(updateActions);
43
+ }
44
+ function connectPrimaryMenuToInlineActionBar(menu, actionBar) {
45
+ return connectPrimaryMenu(menu, (primary) => {
46
+ actionBar.clear();
47
+ actionBar.push(primary, { icon: true, label: false });
48
+ }, 'inline');
49
+ }
50
+ function collectContextMenuActions(menu) {
51
+ const primary = [];
52
+ const actions = [];
53
+ createAndFillInContextMenuActions(menu, { shouldForwardArgs: true }, { primary, secondary: actions }, 'inline');
54
+ return actions;
55
+ }
56
+ class StatusBarAction extends Action {
57
+ constructor(command, commandService) {
58
+ super(`statusbaraction{${command.id}}`, command.title, '', true);
59
+ this.command = command;
60
+ this.commandService = commandService;
61
+ this.tooltip = command.tooltip || '';
62
+ }
63
+ run() {
64
+ return this.commandService.executeCommand(this.command.id, ...(this.command.arguments || []));
65
+ }
66
+ }
67
+ class StatusBarActionViewItem extends ActionViewItem {
68
+ constructor(action) {
69
+ super(null, action, {});
70
+ }
71
+ updateLabel() {
72
+ if (this.options.label && this.label) {
73
+ reset(this.label, ...renderLabelWithIcons(this.action.label));
74
+ }
75
+ }
76
+ }
77
+ function getActionViewItemProvider(instaService) {
78
+ return action => {
79
+ if (action instanceof StatusBarAction) {
80
+ return ( new StatusBarActionViewItem(action));
81
+ }
82
+ return createActionViewItem(instaService, action);
83
+ };
84
+ }
85
+
86
+ export { StatusBarAction, collectContextMenuActions, connectPrimaryMenu, connectPrimaryMenuToInlineActionBar, getActionViewItemProvider, isSCMActionButton, isSCMInput, isSCMRepository, isSCMRepositoryArray, isSCMResource, isSCMResourceGroup };
@@ -0,0 +1,76 @@
1
+ import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
2
+ import { Disposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
3
+ import { isEqualOrParent } from 'monaco-editor/esm/vs/base/common/resources.js';
4
+ import { score } from 'monaco-editor/esm/vs/editor/common/languageSelector.js';
5
+ import { Emitter } from 'monaco-editor/esm/vs/base/common/event.js';
6
+ import { IUriIdentityService } from 'monaco-editor/esm/vs/platform/uriIdentity/common/uriIdentity.js';
7
+
8
+ function createProviderComparer(uri) {
9
+ return (a, b) => {
10
+ if (a.rootUri && !b.rootUri) {
11
+ return -1;
12
+ }
13
+ else if (!a.rootUri && b.rootUri) {
14
+ return 1;
15
+ }
16
+ else if (!a.rootUri && !b.rootUri) {
17
+ return 0;
18
+ }
19
+ const aIsParent = isEqualOrParent(uri, a.rootUri);
20
+ const bIsParent = isEqualOrParent(uri, b.rootUri);
21
+ if (aIsParent && bIsParent) {
22
+ return a.rootUri.fsPath.length - b.rootUri.fsPath.length;
23
+ }
24
+ else if (aIsParent) {
25
+ return -1;
26
+ }
27
+ else if (bIsParent) {
28
+ return 1;
29
+ }
30
+ else {
31
+ return 0;
32
+ }
33
+ };
34
+ }
35
+ let QuickDiffService = class QuickDiffService extends Disposable {
36
+ constructor(uriIdentityService) {
37
+ super();
38
+ this.uriIdentityService = uriIdentityService;
39
+ this.quickDiffProviders = ( new Set());
40
+ this._onDidChangeQuickDiffProviders = this._register(( new Emitter()));
41
+ this.onDidChangeQuickDiffProviders = this._onDidChangeQuickDiffProviders.event;
42
+ }
43
+ addQuickDiffProvider(quickDiff) {
44
+ this.quickDiffProviders.add(quickDiff);
45
+ this._onDidChangeQuickDiffProviders.fire();
46
+ return {
47
+ dispose: () => {
48
+ this.quickDiffProviders.delete(quickDiff);
49
+ this._onDidChangeQuickDiffProviders.fire();
50
+ }
51
+ };
52
+ }
53
+ isQuickDiff(diff) {
54
+ return !!diff.originalResource && (typeof diff.label === 'string') && (typeof diff.isSCM === 'boolean');
55
+ }
56
+ async getQuickDiffs(uri, language = '', isSynchronized = false) {
57
+ const providers = Array.from(this.quickDiffProviders)
58
+ .filter(provider => !provider.rootUri || this.uriIdentityService.extUri.isEqualOrParent(uri, provider.rootUri))
59
+ .sort(createProviderComparer(uri));
60
+ const diffs = await Promise.all(( providers.map(async (provider) => {
61
+ const scoreValue = provider.selector ? score(provider.selector, uri, language, isSynchronized, undefined, undefined) : 10;
62
+ const diff = {
63
+ originalResource: scoreValue > 0 ? (await provider.getOriginalResource(uri)) ?? undefined : undefined,
64
+ label: provider.label,
65
+ isSCM: provider.isSCM
66
+ };
67
+ return diff;
68
+ })));
69
+ return diffs.filter(this.isQuickDiff);
70
+ }
71
+ };
72
+ QuickDiffService = ( __decorate([
73
+ ( __param(0, IUriIdentityService))
74
+ ], QuickDiffService));
75
+
76
+ export { QuickDiffService };