@codingame/monaco-vscode-scm-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.
Files changed (31) hide show
  1. package/index.d.ts +2 -1
  2. package/index.js +22 -1
  3. package/package.json +24 -7
  4. package/vscode/src/vs/workbench/contrib/scm/browser/activity.d.ts +42 -0
  5. package/vscode/src/vs/workbench/contrib/scm/browser/activity.js +34 -32
  6. package/vscode/src/vs/workbench/contrib/scm/browser/diff.d.ts +22 -0
  7. package/vscode/src/vs/workbench/contrib/scm/browser/diff.js +93 -0
  8. package/vscode/src/vs/workbench/contrib/scm/browser/media/scm.css.js +2 -2
  9. package/vscode/src/vs/workbench/contrib/scm/browser/menus.d.ts +49 -0
  10. package/vscode/src/vs/workbench/contrib/scm/browser/menus.js +31 -32
  11. package/vscode/src/vs/workbench/contrib/scm/browser/scm.contribution.d.ts +1 -0
  12. package/vscode/src/vs/workbench/contrib/scm/browser/scm.contribution.js +153 -187
  13. package/vscode/src/vs/workbench/contrib/scm/browser/scmHistoryViewPane.d.ts +59 -0
  14. package/vscode/src/vs/workbench/contrib/scm/browser/scmHistoryViewPane.js +245 -217
  15. package/vscode/src/vs/workbench/contrib/scm/browser/scmRepositoriesViewPane.d.ts +27 -0
  16. package/vscode/src/vs/workbench/contrib/scm/browser/scmRepositoriesViewPane.js +31 -29
  17. package/vscode/src/vs/workbench/contrib/scm/browser/scmRepositoryRenderer.d.ts +57 -0
  18. package/vscode/src/vs/workbench/contrib/scm/browser/scmRepositoryRenderer.js +4 -2
  19. package/vscode/src/vs/workbench/contrib/scm/browser/scmViewPane.d.ts +185 -0
  20. package/vscode/src/vs/workbench/contrib/scm/browser/scmViewPane.js +365 -336
  21. package/vscode/src/vs/workbench/contrib/scm/browser/scmViewPaneContainer.d.ts +17 -0
  22. package/vscode/src/vs/workbench/contrib/scm/browser/scmViewPaneContainer.js +17 -16
  23. package/vscode/src/vs/workbench/contrib/scm/browser/scmViewService.d.ts +66 -0
  24. package/vscode/src/vs/workbench/contrib/scm/browser/scmViewService.js +13 -13
  25. package/vscode/src/vs/workbench/contrib/scm/browser/workingSet.d.ts +25 -0
  26. package/vscode/src/vs/workbench/contrib/scm/browser/workingSet.js +9 -6
  27. package/vscode/src/vs/workbench/contrib/scm/common/quickDiffService.d.ts +16 -0
  28. package/vscode/src/vs/workbench/contrib/scm/common/quickDiffService.js +4 -2
  29. package/vscode/src/vs/workbench/contrib/scm/common/scmService.d.ts +27 -0
  30. package/vscode/src/vs/workbench/contrib/scm/common/scmService.js +13 -11
  31. package/scm.js +0 -17
@@ -1,14 +1,15 @@
1
- import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
1
+
2
+ import { __decorate, __param } from 'vscode/external/tslib/tslib.es6';
2
3
  import './media/scm.css.js';
3
4
  import { Emitter, Event } from 'vscode/vscode/vs/base/common/event';
4
5
  import { basename, dirname } from 'vscode/vscode/vs/base/common/resources';
5
6
  import { Disposable, DisposableStore, toDisposable, combinedDisposable, MutableDisposable, dispose, DisposableMap } from 'vscode/vscode/vs/base/common/lifecycle';
6
- import { ViewAction, ViewPane } from 'vscode/vscode/vs/workbench/browser/parts/views/viewPane';
7
+ import { ViewAction, ViewPane } from '@codingame/monaco-vscode-65619f8f-0eab-5d8b-855a-43b6353fe527-common/vscode/vs/workbench/browser/parts/views/viewPane';
7
8
  import { append, $, Dimension, trackFocus, isPointerEvent, isActiveElement, clearNode } from 'vscode/vscode/vs/base/browser/dom';
8
9
  import { asCSSUrl } from 'vscode/vscode/vs/base/browser/cssValue';
9
- import { VIEW_PANE_ID, SCMInputChangeReason } from 'vscode/vscode/vs/workbench/contrib/scm/common/scm';
10
+ import { VIEW_PANE_ID, ISCMRepositorySortKey, InputValidationType, SCMInputChangeReason } from '@codingame/monaco-vscode-ff9fa663-eae3-5274-8573-c2b918871e4b-common/vscode/vs/workbench/contrib/scm/common/scm';
10
11
  import { ISCMViewService, ISCMService } from 'vscode/vscode/vs/workbench/contrib/scm/common/scm.service';
11
- import { ResourceLabels } from 'vscode/vscode/vs/workbench/browser/labels';
12
+ import { ResourceLabels } from '@codingame/monaco-vscode-9e888134-1a6f-58d9-b0e6-0fc047448366-common/vscode/vs/workbench/browser/labels';
12
13
  import { CountBadge } from 'vscode/vscode/vs/base/browser/ui/countBadge/countBadge';
13
14
  import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
14
15
  import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
@@ -22,21 +23,23 @@ import { IMenuService } from 'vscode/vscode/vs/platform/actions/common/actions.s
22
23
  import { ActionRunner, Action, Separator } from 'vscode/vscode/vs/base/common/actions';
23
24
  import { ActionBar } from 'vscode/vscode/vs/base/browser/ui/actionbar/actionbar';
24
25
  import { IThemeService } from 'vscode/vscode/vs/platform/theme/common/themeService.service';
25
- import { isSCMResource, connectPrimaryMenuToInlineActionBar, isSCMInput, isSCMActionButton, isSCMRepository, isSCMResourceGroup, isSCMResourceNode, getActionViewItemProvider, collectContextMenuActions, isSCMViewService } from 'vscode/vscode/vs/workbench/contrib/scm/browser/util';
26
+ import { isSCMResource, connectPrimaryMenu, isSCMInput, isSCMActionButton, isSCMRepository, isSCMResourceGroup, isSCMResourceNode, getActionViewItemProvider, collectContextMenuActions, isSCMViewService } from '@codingame/monaco-vscode-be8ddbb5-094a-5657-b1cc-fe106c94c632-common/vscode/vs/workbench/contrib/scm/browser/util';
26
27
  import { WorkbenchCompressibleAsyncDataTree } from 'vscode/vscode/vs/platform/list/browser/listService';
28
+ import { ConfigurationTarget } from 'vscode/vscode/vs/platform/configuration/common/configuration';
27
29
  import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
28
30
  import { disposableTimeout, ThrottledDelayer, Sequencer, Throttler } from 'vscode/vscode/vs/base/common/async';
29
- import { ResourceTree } from 'vscode/vscode/vs/base/common/resourceTree';
31
+ import { ResourceTree } from '@codingame/monaco-vscode-be8ddbb5-094a-5657-b1cc-fe106c94c632-common/vscode/vs/base/common/resourceTree';
30
32
  import { Iterable } from 'vscode/vscode/vs/base/common/iterator';
31
33
  import { FileKind } from 'vscode/vscode/vs/platform/files/common/files';
32
34
  import { compareFileNames, comparePaths } from 'vscode/vscode/vs/base/common/comparers';
33
35
  import { createMatches } from 'vscode/vscode/vs/base/common/filters';
34
36
  import { IViewDescriptorService } from 'vscode/vscode/vs/workbench/common/views.service';
35
37
  import { localize } from 'vscode/vscode/vs/nls';
38
+ import { StorageScope, StorageTarget } from 'vscode/vscode/vs/platform/storage/common/storage';
36
39
  import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
37
40
  import { EditorResourceAccessor, SideBySideEditor } from 'vscode/vscode/vs/workbench/common/editor';
38
41
  import { CodeEditorWidget } from 'vscode/vscode/vs/editor/browser/widget/codeEditor/codeEditorWidget';
39
- import { getSimpleEditorOptions, setupSimpleEditorSelectionStyling } from 'vscode/vscode/vs/workbench/contrib/codeEditor/browser/simpleEditorOptions';
42
+ import { getSimpleEditorOptions, setupSimpleEditorSelectionStyling } from '@codingame/monaco-vscode-b4efa70b-52b9-5670-ab5c-f10b10b6834e-common/vscode/vs/workbench/contrib/codeEditor/browser/simpleEditorOptions';
40
43
  import { IModelService } from 'vscode/vscode/vs/editor/common/services/model';
41
44
  import { EditorExtensionsRegistry } from 'vscode/vscode/vs/editor/browser/editorExtensions';
42
45
  import { MenuPreventer } from 'vscode/vscode/vs/workbench/contrib/codeEditor/browser/menuPreventer';
@@ -53,13 +56,15 @@ import { LinkDetector } from 'vscode/vscode/vs/editor/contrib/links/browser/link
53
56
  import { IOpenerService } from 'vscode/vscode/vs/platform/opener/common/opener.service';
54
57
  import { ITelemetryService } from 'vscode/vscode/vs/platform/telemetry/common/telemetry.service';
55
58
  import { ILabelService } from 'vscode/vscode/vs/platform/label/common/label.service';
59
+ import { KeyCode } from 'vscode/vscode/vs/base/common/keyCodes';
56
60
  import { DEFAULT_FONT_FAMILY } from 'vscode/vscode/vs/base/browser/fonts';
57
61
  import { Codicon } from 'vscode/vscode/vs/base/common/codicons';
58
62
  import { ThemeIcon } from 'vscode/vscode/vs/base/common/themables';
63
+ import { AnchorAlignment } from 'vscode/vscode/vs/base/browser/ui/contextview/contextview';
59
64
  import { RepositoryRenderer, RepositoryActionRunner } from './scmRepositoryRenderer.js';
60
65
  import { ColorScheme } from 'vscode/vscode/vs/platform/theme/common/theme';
61
- import { API_OPEN_EDITOR_COMMAND_ID, API_OPEN_DIFF_EDITOR_COMMAND_ID } from 'vscode/vscode/vs/workbench/browser/parts/editor/editorCommands';
62
- import { createAndFillInActionBarActions, createActionViewItem, createAndFillInContextMenuActions } from 'vscode/vscode/vs/platform/actions/browser/menuEntryActionViewItem';
66
+ import { API_OPEN_EDITOR_COMMAND_ID, API_OPEN_DIFF_EDITOR_COMMAND_ID } from '@codingame/monaco-vscode-f48982c4-9e82-55e2-b800-20e6d1e6096f-common/vscode/vs/workbench/browser/parts/editor/editorCommands';
67
+ import { getFlatActionBarActions, createActionViewItem, getFlatContextMenuActions } from 'vscode/vscode/vs/platform/actions/browser/menuEntryActionViewItem';
63
68
  import { MarkdownRenderer, openLinkFromMarkdown } from 'vscode/vscode/vs/editor/browser/widget/markdownRenderer/browser/markdownRenderer';
64
69
  import { ButtonWithDropdown, Button } from 'vscode/vscode/vs/base/browser/ui/button/button';
65
70
  import { INotificationService } from 'vscode/vscode/vs/platform/notification/common/notification.service';
@@ -72,18 +77,18 @@ import { defaultCountBadgeStyles, defaultButtonStyles } from 'vscode/vscode/vs/p
72
77
  import { InlineCompletionsController } from 'vscode/vscode/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController';
73
78
  import { CodeActionController } from 'vscode/vscode/vs/editor/contrib/codeAction/browser/codeActionController';
74
79
  import { Schemas } from 'vscode/vscode/vs/base/common/network';
75
- import { fillEditorsDragData } from 'vscode/vscode/vs/workbench/browser/dnd';
80
+ import { fillEditorsDragData } from '@codingame/monaco-vscode-e571cbbb-526b-5d8b-92c5-a0437d2dabb3-common/vscode/vs/workbench/browser/dnd';
76
81
  import { CodeDataTransfers } from 'vscode/vscode/vs/platform/dnd/browser/dnd';
77
82
  import { FormatOnType } from 'vscode/vscode/vs/editor/contrib/format/browser/formatActions';
78
- import { EditorOptions } from 'vscode/vscode/vs/editor/common/config/editorOptions';
83
+ import { EditorOptions, EditorOption } from 'vscode/vscode/vs/editor/common/config/editorOptions';
79
84
  import { IUriIdentityService } from 'vscode/vscode/vs/platform/uriIdentity/common/uriIdentity.service';
80
85
  import { EditOperation } from 'vscode/vscode/vs/editor/common/core/editOperation';
81
86
  import { WorkbenchToolBar } from 'vscode/vscode/vs/platform/actions/browser/toolbar';
82
87
  import { CancellationTokenSource } from 'vscode/vscode/vs/base/common/cancellation';
83
- import { DropdownWithPrimaryActionViewItem } from 'vscode/vscode/vs/platform/actions/browser/dropdownWithPrimaryActionViewItem';
88
+ import { DropdownWithPrimaryActionViewItem } from '@codingame/monaco-vscode-b4efa70b-52b9-5670-ab5c-f10b10b6834e-common/vscode/vs/platform/actions/browser/dropdownWithPrimaryActionViewItem';
84
89
  import { clamp, rot } from 'vscode/vscode/vs/base/common/numbers';
85
90
  import { IHoverService } from 'vscode/vscode/vs/platform/hover/browser/hover.service';
86
- import { OpenScmGroupAction } from 'vscode/vscode/vs/workbench/contrib/multiDiffEditor/browser/scmMultiDiffSourceResolver';
91
+ import { OpenScmGroupAction } from '@codingame/monaco-vscode-f99b74f5-fcb7-512f-8c6c-35f5a107577d-common/vscode/vs/workbench/contrib/multiDiffEditor/browser/scmMultiDiffSourceResolver';
87
92
  import { ContentHoverController } from 'vscode/vscode/vs/editor/contrib/hover/browser/contentHoverController';
88
93
  import { GlyphHoverController } from 'vscode/vscode/vs/editor/contrib/hover/browser/glyphHoverController';
89
94
  import 'vscode/vscode/vs/base/common/arrays';
@@ -143,23 +148,23 @@ let ActionButtonRenderer = class ActionButtonRenderer {
143
148
  this.commandService = commandService;
144
149
  this.contextMenuService = contextMenuService;
145
150
  this.notificationService = notificationService;
146
- this.actionButtons = ( (new Map()));
151
+ this.actionButtons = ( new Map());
147
152
  }
148
153
  renderTemplate(container) {
149
154
  container.parentElement.parentElement.querySelector('.monaco-tl-twistie').classList.add('force-no-twistie');
150
155
  container.parentElement.parentElement.classList.add('cursor-default', 'force-no-hover');
151
156
  const buttonContainer = append(container, $('.button-container'));
152
- const actionButton = ( (new SCMActionButton(
157
+ const actionButton = ( new SCMActionButton(
153
158
  buttonContainer,
154
159
  this.contextMenuService,
155
160
  this.commandService,
156
161
  this.notificationService
157
- )));
162
+ ));
158
163
  return { actionButton, disposable: Disposable.None, templateDisposable: actionButton };
159
164
  }
160
165
  renderElement(node, index, templateData, height) {
161
166
  templateData.disposable.dispose();
162
- const disposables = ( (new DisposableStore()));
167
+ const disposables = ( new DisposableStore());
163
168
  const actionButton = node.element;
164
169
  templateData.actionButton.setButton(node.element.button);
165
170
  this.actionButtons.set(actionButton, templateData.actionButton);
@@ -167,7 +172,7 @@ let ActionButtonRenderer = class ActionButtonRenderer {
167
172
  templateData.disposable = disposables;
168
173
  }
169
174
  renderCompressedElements() {
170
- throw ( (new Error('Should never happen since node is incompressible')));
175
+ throw ( new Error('Should never happen since node is incompressible'));
171
176
  }
172
177
  focusActionButton(actionButton) {
173
178
  this.actionButtons.get(actionButton)?.focus();
@@ -180,20 +185,18 @@ let ActionButtonRenderer = class ActionButtonRenderer {
180
185
  templateData.templateDisposable.dispose();
181
186
  }
182
187
  };
183
- ActionButtonRenderer = ActionButtonRenderer_1 = ( (__decorate([
184
- ( (__param(0, ICommandService))),
185
- ( (__param(1, IContextMenuService))),
186
- ( (__param(2, INotificationService)))
187
- ], ActionButtonRenderer)));
188
+ ActionButtonRenderer = ActionButtonRenderer_1 = ( __decorate([
189
+ ( __param(0, ICommandService)),
190
+ ( __param(1, IContextMenuService)),
191
+ ( __param(2, INotificationService))
192
+ ], ActionButtonRenderer));
188
193
  class SCMTreeDragAndDrop {
189
194
  constructor(instantiationService) {
190
195
  this.instantiationService = instantiationService;
191
196
  }
192
197
  getDragURI(element) {
193
198
  if (isSCMResource(element)) {
194
- return (
195
- (element.sourceUri.toString())
196
- );
199
+ return ( element.sourceUri.toString());
197
200
  }
198
201
  return null;
199
202
  }
@@ -201,7 +204,7 @@ class SCMTreeDragAndDrop {
201
204
  const items = SCMTreeDragAndDrop.getResourcesFromDragAndDropData(data);
202
205
  if (originalEvent.dataTransfer && items?.length) {
203
206
  this.instantiationService.invokeFunction(accessor => fillEditorsDragData(accessor, items, originalEvent));
204
- const fileResources = ( (items.filter(s => s.scheme === Schemas.file).map(r => r.fsPath)));
207
+ const fileResources = ( items.filter(s => s.scheme === Schemas.file).map(r => r.fsPath));
205
208
  if (fileResources.length) {
206
209
  originalEvent.dataTransfer.setData(CodeDataTransfers.FILES, JSON.stringify(fileResources));
207
210
  }
@@ -241,18 +244,18 @@ let InputRenderer = class InputRenderer {
241
244
  this.overflowWidgetsDomNode = overflowWidgetsDomNode;
242
245
  this.updateHeight = updateHeight;
243
246
  this.instantiationService = instantiationService;
244
- this.inputWidgets = ( (new Map()));
245
- this.contentHeights = ( (new WeakMap()));
246
- this.editorSelections = ( (new WeakMap()));
247
+ this.inputWidgets = ( new Map());
248
+ this.contentHeights = ( new WeakMap());
249
+ this.editorSelections = ( new WeakMap());
247
250
  }
248
251
  renderTemplate(container) {
249
252
  container.parentElement.parentElement.querySelector('.monaco-tl-twistie').classList.add('force-no-twistie');
250
253
  container.parentElement.parentElement.classList.add('force-no-hover');
251
- const templateDisposable = ( (new DisposableStore()));
254
+ const templateDisposable = ( new DisposableStore());
252
255
  const inputElement = append(container, $('.scm-input'));
253
256
  const inputWidget = this.instantiationService.createInstance(SCMInputWidget, inputElement, this.overflowWidgetsDomNode);
254
257
  templateDisposable.add(inputWidget);
255
- return { inputWidget, inputWidgetHeight: InputRenderer_1.DEFAULT_HEIGHT, elementDisposables: ( (new DisposableStore())), templateDisposable };
258
+ return { inputWidget, inputWidgetHeight: InputRenderer_1.DEFAULT_HEIGHT, elementDisposables: ( new DisposableStore()), templateDisposable };
256
259
  }
257
260
  renderElement(node, index, templateData) {
258
261
  const input = node.element;
@@ -291,7 +294,7 @@ let InputRenderer = class InputRenderer {
291
294
  layoutEditor();
292
295
  }
293
296
  renderCompressedElements() {
294
- throw ( (new Error('Should never happen since node is incompressible')));
297
+ throw ( new Error('Should never happen since node is incompressible'));
295
298
  }
296
299
  disposeElement(group, index, template) {
297
300
  template.elementDisposables.clear();
@@ -319,39 +322,55 @@ let InputRenderer = class InputRenderer {
319
322
  }
320
323
  }
321
324
  };
322
- InputRenderer = InputRenderer_1 = ( (__decorate([
323
- ( (__param(3, IInstantiationService)))
324
- ], InputRenderer)));
325
+ InputRenderer = InputRenderer_1 = ( __decorate([
326
+ ( __param(3, IInstantiationService))
327
+ ], InputRenderer));
325
328
  let ResourceGroupRenderer = class ResourceGroupRenderer {
326
329
  static { ResourceGroupRenderer_1 = this; }
327
330
  static { this.TEMPLATE_ID = 'resource group'; }
328
331
  get templateId() { return ResourceGroupRenderer_1.TEMPLATE_ID; }
329
- constructor(actionViewItemProvider, scmViewService) {
332
+ constructor(actionViewItemProvider, commandService, contextKeyService, contextMenuService, keybindingService, menuService, scmViewService, telemetryService) {
330
333
  this.actionViewItemProvider = actionViewItemProvider;
334
+ this.commandService = commandService;
335
+ this.contextKeyService = contextKeyService;
336
+ this.contextMenuService = contextMenuService;
337
+ this.keybindingService = keybindingService;
338
+ this.menuService = menuService;
331
339
  this.scmViewService = scmViewService;
340
+ this.telemetryService = telemetryService;
332
341
  }
333
342
  renderTemplate(container) {
334
343
  container.parentElement.parentElement.querySelector('.monaco-tl-twistie').classList.add('force-twistie');
335
344
  const element = append(container, $('.resource-group'));
336
345
  const name = append(element, $('.name'));
337
346
  const actionsContainer = append(element, $('.actions'));
338
- const actionBar = ( (new ActionBar(actionsContainer, { actionViewItemProvider: this.actionViewItemProvider })));
347
+ const actionBar = ( new WorkbenchToolBar(
348
+ actionsContainer,
349
+ { actionViewItemProvider: this.actionViewItemProvider },
350
+ this.menuService,
351
+ this.contextKeyService,
352
+ this.contextMenuService,
353
+ this.keybindingService,
354
+ this.commandService,
355
+ this.telemetryService
356
+ ));
339
357
  const countContainer = append(element, $('.count'));
340
- const count = ( (new CountBadge(countContainer, {}, defaultCountBadgeStyles)));
341
- const disposables = combinedDisposable(actionBar);
342
- return { name, count, actionBar, elementDisposables: ( (new DisposableStore())), disposables };
358
+ const count = ( new CountBadge(countContainer, {}, defaultCountBadgeStyles));
359
+ const disposables = combinedDisposable(actionBar, count);
360
+ return { name, count, actionBar, elementDisposables: ( new DisposableStore()), disposables };
343
361
  }
344
362
  renderElement(node, index, template) {
345
363
  const group = node.element;
346
364
  template.name.textContent = group.label;
347
- template.actionBar.clear();
348
- template.actionBar.context = group;
349
365
  template.count.setCount(group.resources.length);
350
366
  const menus = this.scmViewService.menus.getRepositoryMenus(group.provider);
351
- template.elementDisposables.add(connectPrimaryMenuToInlineActionBar(menus.getResourceGroupMenu(group), template.actionBar));
367
+ template.elementDisposables.add(connectPrimaryMenu(menus.getResourceGroupMenu(group), primary => {
368
+ template.actionBar.setActions(primary);
369
+ }, 'inline'));
370
+ template.actionBar.context = group;
352
371
  }
353
372
  renderCompressedElements(node, index, templateData, height) {
354
- throw ( (new Error('Should never happen since node is incompressible')));
373
+ throw ( new Error('Should never happen since node is incompressible'));
355
374
  }
356
375
  disposeElement(group, index, template) {
357
376
  template.elementDisposables.clear();
@@ -361,9 +380,15 @@ let ResourceGroupRenderer = class ResourceGroupRenderer {
361
380
  template.disposables.dispose();
362
381
  }
363
382
  };
364
- ResourceGroupRenderer = ResourceGroupRenderer_1 = ( (__decorate([
365
- ( (__param(1, ISCMViewService)))
366
- ], ResourceGroupRenderer)));
383
+ ResourceGroupRenderer = ResourceGroupRenderer_1 = ( __decorate([
384
+ ( __param(1, ICommandService)),
385
+ ( __param(2, IContextKeyService)),
386
+ ( __param(3, IContextMenuService)),
387
+ ( __param(4, IKeybindingService)),
388
+ ( __param(5, IMenuService)),
389
+ ( __param(6, ISCMViewService)),
390
+ ( __param(7, ITelemetryService))
391
+ ], ResourceGroupRenderer));
367
392
  class RepositoryPaneActionRunner extends ActionRunner {
368
393
  constructor(getSelectedResources) {
369
394
  super();
@@ -374,9 +399,9 @@ class RepositoryPaneActionRunner extends ActionRunner {
374
399
  return super.runAction(action, context);
375
400
  }
376
401
  const selection = this.getSelectedResources();
377
- const contextIsSelected = ( (selection.some(s => s === context)));
402
+ const contextIsSelected = ( selection.some(s => s === context));
378
403
  const actualContext = contextIsSelected ? selection : [context];
379
- const args = ( (actualContext.map(e => ResourceTree.isResourceNode(e) ? ResourceTree.collect(e) : [e]))).flat();
404
+ const args = ( actualContext.map(e => ResourceTree.isResourceNode(e) ? ResourceTree.collect(e) : [e])).flat();
380
405
  await action.run(...args);
381
406
  }
382
407
  }
@@ -384,16 +409,22 @@ let ResourceRenderer = class ResourceRenderer {
384
409
  static { ResourceRenderer_1 = this; }
385
410
  static { this.TEMPLATE_ID = 'resource'; }
386
411
  get templateId() { return ResourceRenderer_1.TEMPLATE_ID; }
387
- constructor(viewMode, labels, actionViewItemProvider, actionRunner, labelService, scmViewService, themeService) {
412
+ constructor(viewMode, labels, actionViewItemProvider, actionRunner, commandService, contextKeyService, contextMenuService, keybindingService, labelService, menuService, scmViewService, telemetryService, themeService) {
388
413
  this.viewMode = viewMode;
389
414
  this.labels = labels;
390
415
  this.actionViewItemProvider = actionViewItemProvider;
391
416
  this.actionRunner = actionRunner;
417
+ this.commandService = commandService;
418
+ this.contextKeyService = contextKeyService;
419
+ this.contextMenuService = contextMenuService;
420
+ this.keybindingService = keybindingService;
392
421
  this.labelService = labelService;
422
+ this.menuService = menuService;
393
423
  this.scmViewService = scmViewService;
424
+ this.telemetryService = telemetryService;
394
425
  this.themeService = themeService;
395
- this.disposables = ( (new DisposableStore()));
396
- this.renderedResources = ( (new Map()));
426
+ this.disposables = ( new DisposableStore());
427
+ this.renderedResources = ( new Map());
397
428
  themeService.onDidColorThemeChange(this.onDidColorThemeChange, this, this.disposables);
398
429
  }
399
430
  renderTemplate(container) {
@@ -401,14 +432,14 @@ let ResourceRenderer = class ResourceRenderer {
401
432
  const name = append(element, $('.name'));
402
433
  const fileLabel = this.labels.create(name, { supportDescriptionHighlights: true, supportHighlights: true });
403
434
  const actionsContainer = append(fileLabel.element, $('.actions'));
404
- const actionBar = ( (new ActionBar(actionsContainer, {
435
+ const actionBar = ( new WorkbenchToolBar(actionsContainer, {
405
436
  actionViewItemProvider: this.actionViewItemProvider,
406
437
  actionRunner: this.actionRunner
407
- })));
438
+ }, this.menuService, this.contextKeyService, this.contextMenuService, this.keybindingService, this.commandService, this.telemetryService));
408
439
  const decorationIcon = append(element, $('.decoration-icon'));
409
- const actionBarMenuListener = ( (new MutableDisposable()));
440
+ const actionBarMenuListener = ( new MutableDisposable());
410
441
  const disposables = combinedDisposable(actionBar, fileLabel, actionBarMenuListener);
411
- return { element, name, fileLabel, decorationIcon, actionBar, actionBarMenu: undefined, actionBarMenuListener, elementDisposables: ( (new DisposableStore())), disposables };
442
+ return { element, name, fileLabel, decorationIcon, actionBar, actionBarMenu: undefined, actionBarMenuListener, elementDisposables: ( new DisposableStore()), disposables };
412
443
  }
413
444
  renderElement(node, index, template) {
414
445
  const resourceOrFolder = node.element;
@@ -416,7 +447,7 @@ let ResourceRenderer = class ResourceRenderer {
416
447
  const uri = ResourceTree.isResourceNode(resourceOrFolder) ? resourceOrFolder.uri : resourceOrFolder.sourceUri;
417
448
  const fileKind = ResourceTree.isResourceNode(resourceOrFolder) ? FileKind.FOLDER : FileKind.FILE;
418
449
  const tooltip = !ResourceTree.isResourceNode(resourceOrFolder) && resourceOrFolder.decorations.tooltip || '';
419
- const hidePath = this.viewMode() === "tree" ;
450
+ const hidePath = this.viewMode() === ViewMode.Tree;
420
451
  let matches;
421
452
  let descriptionMatches;
422
453
  let strikethrough;
@@ -455,7 +486,7 @@ let ResourceRenderer = class ResourceRenderer {
455
486
  renderCompressedElements(node, index, template, height) {
456
487
  const compressed = node.element;
457
488
  const folder = compressed.elements[compressed.elements.length - 1];
458
- const label = ( (compressed.elements.map(e => e.name)));
489
+ const label = ( compressed.elements.map(e => e.name));
459
490
  const fileKind = FileKind.FOLDER;
460
491
  const matches = createMatches(node.filterData);
461
492
  template.fileLabel.setResource({ resource: folder.uri, name: label }, {
@@ -481,9 +512,10 @@ let ResourceRenderer = class ResourceRenderer {
481
512
  }
482
513
  _renderActionBar(template, resourceOrFolder, menu) {
483
514
  if (!template.actionBarMenu || template.actionBarMenu !== menu) {
484
- template.actionBar.clear();
485
515
  template.actionBarMenu = menu;
486
- template.actionBarMenuListener.value = connectPrimaryMenuToInlineActionBar(menu, template.actionBar);
516
+ template.actionBarMenuListener.value = connectPrimaryMenu(menu, primary => {
517
+ template.actionBar.setActions(primary);
518
+ }, 'inline');
487
519
  }
488
520
  template.actionBar.context = resourceOrFolder;
489
521
  }
@@ -528,11 +560,17 @@ let ResourceRenderer = class ResourceRenderer {
528
560
  this.disposables.dispose();
529
561
  }
530
562
  };
531
- ResourceRenderer = ResourceRenderer_1 = ( (__decorate([
532
- ( (__param(4, ILabelService))),
533
- ( (__param(5, ISCMViewService))),
534
- ( (__param(6, IThemeService)))
535
- ], ResourceRenderer)));
563
+ ResourceRenderer = ResourceRenderer_1 = ( __decorate([
564
+ ( __param(4, ICommandService)),
565
+ ( __param(5, IContextKeyService)),
566
+ ( __param(6, IContextMenuService)),
567
+ ( __param(7, IKeybindingService)),
568
+ ( __param(8, ILabelService)),
569
+ ( __param(9, IMenuService)),
570
+ ( __param(10, ISCMViewService)),
571
+ ( __param(11, ITelemetryService)),
572
+ ( __param(12, IThemeService))
573
+ ], ResourceRenderer));
536
574
  class ListDelegate {
537
575
  constructor(inputRenderer) {
538
576
  this.inputRenderer = inputRenderer;
@@ -565,7 +603,7 @@ class ListDelegate {
565
603
  return ResourceRenderer.TEMPLATE_ID;
566
604
  }
567
605
  else {
568
- throw ( (new Error('Unknown element')));
606
+ throw ( new Error('Unknown element'));
569
607
  }
570
608
  }
571
609
  }
@@ -595,7 +633,7 @@ class SCMTreeSorter {
595
633
  compare(one, other) {
596
634
  if (isSCMRepository(one)) {
597
635
  if (!isSCMRepository(other)) {
598
- throw ( (new Error('Invalid comparison')));
636
+ throw ( new Error('Invalid comparison'));
599
637
  }
600
638
  return 0;
601
639
  }
@@ -614,13 +652,13 @@ class SCMTreeSorter {
614
652
  if (isSCMResourceGroup(one)) {
615
653
  return isSCMResourceGroup(other) ? 0 : -1;
616
654
  }
617
- if (this.viewMode() === "list" ) {
618
- if (this.viewSortKey() === "name" ) {
655
+ if (this.viewMode() === ViewMode.List) {
656
+ if (this.viewSortKey() === ViewSortKey.Name) {
619
657
  const oneName = basename(one.sourceUri);
620
658
  const otherName = basename(other.sourceUri);
621
659
  return compareFileNames(oneName, otherName);
622
660
  }
623
- if (this.viewSortKey() === "status" ) {
661
+ if (this.viewSortKey() === ViewSortKey.Status) {
624
662
  const oneTooltip = one.decorations.tooltip ?? '';
625
663
  const otherTooltip = other.decorations.tooltip ?? '';
626
664
  if (oneTooltip !== otherTooltip) {
@@ -657,7 +695,7 @@ let SCMTreeKeyboardNavigationLabelProvider = class SCMTreeKeyboardNavigationLabe
657
695
  return element.label;
658
696
  }
659
697
  else {
660
- if (this.viewMode() === "list" ) {
698
+ if (this.viewMode() === ViewMode.List) {
661
699
  const fileName = basename(element.sourceUri);
662
700
  const filePath = this.labelService.getUriLabel(element.sourceUri, { relative: true });
663
701
  return [fileName, filePath];
@@ -669,12 +707,12 @@ let SCMTreeKeyboardNavigationLabelProvider = class SCMTreeKeyboardNavigationLabe
669
707
  }
670
708
  getCompressedNodeKeyboardNavigationLabel(elements) {
671
709
  const folders = elements;
672
- return ( (folders.map(e => e.name))).join('/');
710
+ return ( folders.map(e => e.name)).join('/');
673
711
  }
674
712
  };
675
- SCMTreeKeyboardNavigationLabelProvider = ( (__decorate([
676
- ( (__param(1, ILabelService)))
677
- ], SCMTreeKeyboardNavigationLabelProvider)));
713
+ SCMTreeKeyboardNavigationLabelProvider = ( __decorate([
714
+ ( __param(1, ILabelService))
715
+ ], SCMTreeKeyboardNavigationLabelProvider));
678
716
  function getSCMResourceId(element) {
679
717
  if (isSCMRepository(element)) {
680
718
  const provider = element.provider;
@@ -695,14 +733,14 @@ function getSCMResourceId(element) {
695
733
  else if (isSCMResource(element)) {
696
734
  const group = element.resourceGroup;
697
735
  const provider = group.provider;
698
- return `resource:${provider.id}/${group.id}/${( (element.sourceUri.toString()))}`;
736
+ return `resource:${provider.id}/${group.id}/${( element.sourceUri.toString())}`;
699
737
  }
700
738
  else if (isSCMResourceNode(element)) {
701
739
  const group = element.context;
702
- return `folder:${group.provider.id}/${group.id}/$FOLDER/${( (element.uri.toString()))}`;
740
+ return `folder:${group.provider.id}/${group.id}/$FOLDER/${( element.uri.toString())}`;
703
741
  }
704
742
  else {
705
- throw ( (new Error('Invalid tree element')));
743
+ throw ( new Error('Invalid tree element'));
706
744
  }
707
745
  }
708
746
  class SCMResourceIdentityProvider {
@@ -715,7 +753,7 @@ let SCMAccessibilityProvider = class SCMAccessibilityProvider {
715
753
  this.labelService = labelService;
716
754
  }
717
755
  getWidgetAriaLabel() {
718
- return ( localize(6588, "Source Control Management"));
756
+ return localize(8547, "Source Control Management");
719
757
  }
720
758
  getAriaLabel(element) {
721
759
  if (ResourceTree.isResourceNode(element)) {
@@ -725,7 +763,7 @@ let SCMAccessibilityProvider = class SCMAccessibilityProvider {
725
763
  return `${element.provider.name} ${element.provider.label}`;
726
764
  }
727
765
  else if (isSCMInput(element)) {
728
- return ( localize(6589, "Source Control Input"));
766
+ return localize(8548, "Source Control Input");
729
767
  }
730
768
  else if (isSCMActionButton(element)) {
731
769
  return element.button?.command.title ?? '';
@@ -747,43 +785,51 @@ let SCMAccessibilityProvider = class SCMAccessibilityProvider {
747
785
  }
748
786
  }
749
787
  };
750
- SCMAccessibilityProvider = ( (__decorate([
751
- ( (__param(0, ILabelService)))
752
- ], SCMAccessibilityProvider)));
788
+ SCMAccessibilityProvider = ( __decorate([
789
+ ( __param(0, ILabelService))
790
+ ], SCMAccessibilityProvider));
791
+ var ViewMode;
792
+ (function (ViewMode) {
793
+ ViewMode["List"] = "list";
794
+ ViewMode["Tree"] = "tree";
795
+ })(ViewMode || (ViewMode = {}));
796
+ var ViewSortKey;
797
+ (function (ViewSortKey) {
798
+ ViewSortKey["Path"] = "path";
799
+ ViewSortKey["Name"] = "name";
800
+ ViewSortKey["Status"] = "status";
801
+ })(ViewSortKey || (ViewSortKey = {}));
753
802
  const Menus = {
754
- ViewSort: ( (new MenuId('SCMViewSort'))),
755
- Repositories: ( (new MenuId('SCMRepositories'))),
756
- ChangesSettings: ( (new MenuId('SCMChangesSettings'))),
803
+ ViewSort: ( new MenuId('SCMViewSort')),
804
+ Repositories: ( new MenuId('SCMRepositories')),
805
+ ChangesSettings: ( new MenuId('SCMChangesSettings')),
757
806
  };
758
807
  const ContextKeys = {
759
- SCMViewMode: ( (new RawContextKey('scmViewMode', "list" ))),
760
- SCMViewSortKey: ( (new RawContextKey('scmViewSortKey', "path" ))),
761
- SCMViewAreAllRepositoriesCollapsed: ( (new RawContextKey('scmViewAreAllRepositoriesCollapsed', false))),
762
- SCMViewIsAnyRepositoryCollapsible: ( (new RawContextKey('scmViewIsAnyRepositoryCollapsible', false))),
763
- SCMProvider: ( (new RawContextKey('scmProvider', undefined))),
764
- SCMProviderRootUri: ( (new RawContextKey('scmProviderRootUri', undefined))),
765
- SCMProviderHasRootUri: ( (new RawContextKey('scmProviderHasRootUri', undefined))),
766
- SCMHistoryItemCount: ( (new RawContextKey('scmHistoryItemCount', 0))),
767
- RepositoryCount: ( (new RawContextKey('scmRepositoryCount', 0))),
768
- RepositoryVisibilityCount: ( (new RawContextKey('scmRepositoryVisibleCount', 0))),
808
+ SCMViewMode: ( new RawContextKey('scmViewMode', ViewMode.List)),
809
+ SCMViewSortKey: ( new RawContextKey('scmViewSortKey', ViewSortKey.Path)),
810
+ SCMViewAreAllRepositoriesCollapsed: ( new RawContextKey('scmViewAreAllRepositoriesCollapsed', false)),
811
+ SCMViewIsAnyRepositoryCollapsible: ( new RawContextKey('scmViewIsAnyRepositoryCollapsible', false)),
812
+ SCMProvider: ( new RawContextKey('scmProvider', undefined)),
813
+ SCMProviderRootUri: ( new RawContextKey('scmProviderRootUri', undefined)),
814
+ SCMProviderHasRootUri: ( new RawContextKey('scmProviderHasRootUri', undefined)),
815
+ SCMHistoryItemCount: ( new RawContextKey('scmHistoryItemCount', 0)),
816
+ SCMCurrentHistoryItemRefHasRemote: ( new RawContextKey('scmCurrentHistoryItemRefHasRemote', false)),
817
+ SCMCurrentHistoryItemRefInFilter: ( new RawContextKey('scmCurrentHistoryItemRefInFilter', false)),
818
+ RepositoryCount: ( new RawContextKey('scmRepositoryCount', 0)),
819
+ RepositoryVisibilityCount: ( new RawContextKey('scmRepositoryVisibleCount', 0)),
769
820
  RepositoryVisibility(repository) {
770
- return (
771
- (new RawContextKey(`scmRepositoryVisible:${repository.provider.id}`, false))
772
- );
821
+ return ( new RawContextKey(`scmRepositoryVisible:${repository.provider.id}`, false));
773
822
  }
774
823
  };
775
824
  MenuRegistry.appendMenuItem(MenuId.SCMTitle, {
776
- title: ( localize(6590, "View & Sort")),
825
+ title: ( localize(8549, "View & Sort")),
777
826
  submenu: Menus.ViewSort,
778
- when: ( (ContextKeyExpr.and(
779
- (ContextKeyExpr.equals('view', VIEW_PANE_ID)),
780
- (ContextKeys.RepositoryCount.notEqualsTo(0))
781
- ))),
827
+ when: ( ContextKeyExpr.and(( ContextKeyExpr.equals('view', VIEW_PANE_ID)), ( ContextKeys.RepositoryCount.notEqualsTo(0)))),
782
828
  group: '0_view&sort',
783
829
  order: 1
784
830
  });
785
831
  MenuRegistry.appendMenuItem(Menus.ViewSort, {
786
- title: ( localize(6591, "Repositories")),
832
+ title: ( localize(8550, "Repositories")),
787
833
  submenu: Menus.Repositories,
788
834
  when: ContextKeyExpr.greater(ContextKeys.RepositoryCount.key, 1),
789
835
  group: '0_repositories'
@@ -794,11 +840,8 @@ class RepositoryVisibilityAction extends Action2 {
794
840
  id: `workbench.scm.action.toggleRepositoryVisibility.${repository.provider.id}`,
795
841
  title: repository.provider.name,
796
842
  f1: false,
797
- precondition: ( (ContextKeyExpr.or(
798
- (ContextKeys.RepositoryVisibilityCount.notEqualsTo(1)),
799
- (ContextKeys.RepositoryVisibility(repository).isEqualTo(false))
800
- ))),
801
- toggled: ( (ContextKeys.RepositoryVisibility(repository).isEqualTo(true))),
843
+ precondition: ( ContextKeyExpr.or(( ContextKeys.RepositoryVisibilityCount.notEqualsTo(1)), ( ContextKeys.RepositoryVisibility(repository).isEqualTo(false)))),
844
+ toggled: ( ContextKeys.RepositoryVisibility(repository).isEqualTo(true)),
802
845
  menu: { id: Menus.Repositories, group: '0_repositories' }
803
846
  });
804
847
  this.repository = repository;
@@ -812,8 +855,8 @@ let RepositoryVisibilityActionController = class RepositoryVisibilityActionContr
812
855
  constructor(contextKeyService, scmViewService, scmService) {
813
856
  this.contextKeyService = contextKeyService;
814
857
  this.scmViewService = scmViewService;
815
- this.items = ( (new Map()));
816
- this.disposables = ( (new DisposableStore()));
858
+ this.items = ( new Map());
859
+ this.disposables = ( new DisposableStore());
817
860
  this.repositoryCountContextKey = ContextKeys.RepositoryCount.bindTo(contextKeyService);
818
861
  this.repositoryVisibilityCountContextKey = ContextKeys.RepositoryVisibilityCount.bindTo(contextKeyService);
819
862
  scmViewService.onDidChangeVisibleRepositories(this.onDidChangeVisibleRepositories, this, this.disposables);
@@ -859,46 +902,42 @@ let RepositoryVisibilityActionController = class RepositoryVisibilityActionContr
859
902
  }
860
903
  updateRepositoryContextKeys() {
861
904
  this.repositoryCountContextKey.set(this.items.size);
862
- this.repositoryVisibilityCountContextKey.set(Iterable.reduce(( (this.items.keys())), (r, repository) => r + (this.scmViewService.isVisible(repository) ? 1 : 0), 0));
905
+ this.repositoryVisibilityCountContextKey.set(Iterable.reduce(( this.items.keys()), (r, repository) => r + (this.scmViewService.isVisible(repository) ? 1 : 0), 0));
863
906
  }
864
907
  dispose() {
865
908
  this.disposables.dispose();
866
- dispose(( (this.items.values())));
909
+ dispose(( this.items.values()));
867
910
  this.items.clear();
868
911
  }
869
912
  };
870
- RepositoryVisibilityActionController = ( (__decorate([
871
- ( (__param(0, IContextKeyService))),
872
- ( (__param(1, ISCMViewService))),
873
- ( (__param(2, ISCMService)))
874
- ], RepositoryVisibilityActionController)));
913
+ RepositoryVisibilityActionController = ( __decorate([
914
+ ( __param(0, IContextKeyService)),
915
+ ( __param(1, ISCMViewService)),
916
+ ( __param(2, ISCMService))
917
+ ], RepositoryVisibilityActionController));
875
918
  class SetListViewModeAction extends ViewAction {
876
919
  constructor(id = 'workbench.scm.action.setListViewMode', menu = {}) {
877
920
  super({
878
921
  id,
879
- title: ( localize(6592, "View as List")),
922
+ title: ( localize(8551, "View as List")),
880
923
  viewId: VIEW_PANE_ID,
881
924
  f1: false,
882
925
  icon: Codicon.listTree,
883
- toggled: ( (ContextKeys.SCMViewMode.isEqualTo("list" ))),
926
+ toggled: ( ContextKeys.SCMViewMode.isEqualTo(ViewMode.List)),
884
927
  menu: { id: Menus.ViewSort, group: '1_viewmode', ...menu }
885
928
  });
886
929
  }
887
930
  async runInView(_, view) {
888
- view.viewMode = "list" ;
931
+ view.viewMode = ViewMode.List;
889
932
  }
890
933
  }
891
934
  class SetListViewModeNavigationAction extends SetListViewModeAction {
892
935
  constructor() {
893
936
  super('workbench.scm.action.setListViewModeNavigation', {
894
937
  id: MenuId.SCMTitle,
895
- when: ( (ContextKeyExpr.and(
896
- (ContextKeyExpr.equals('view', VIEW_PANE_ID)),
897
- (ContextKeys.RepositoryCount.notEqualsTo(0)),
898
- (ContextKeys.SCMViewMode.isEqualTo("tree" ))
899
- ))),
938
+ when: ( ContextKeyExpr.and(( ContextKeyExpr.equals('view', VIEW_PANE_ID)), ( ContextKeys.RepositoryCount.notEqualsTo(0)), ( ContextKeys.SCMViewMode.isEqualTo(ViewMode.Tree)))),
900
939
  group: 'navigation',
901
- order: -1000
940
+ order: -1e3
902
941
  });
903
942
  }
904
943
  }
@@ -906,29 +945,25 @@ class SetTreeViewModeAction extends ViewAction {
906
945
  constructor(id = 'workbench.scm.action.setTreeViewMode', menu = {}) {
907
946
  super({
908
947
  id,
909
- title: ( localize(6593, "View as Tree")),
948
+ title: ( localize(8552, "View as Tree")),
910
949
  viewId: VIEW_PANE_ID,
911
950
  f1: false,
912
951
  icon: Codicon.listFlat,
913
- toggled: ( (ContextKeys.SCMViewMode.isEqualTo("tree" ))),
952
+ toggled: ( ContextKeys.SCMViewMode.isEqualTo(ViewMode.Tree)),
914
953
  menu: { id: Menus.ViewSort, group: '1_viewmode', ...menu }
915
954
  });
916
955
  }
917
956
  async runInView(_, view) {
918
- view.viewMode = "tree" ;
957
+ view.viewMode = ViewMode.Tree;
919
958
  }
920
959
  }
921
960
  class SetTreeViewModeNavigationAction extends SetTreeViewModeAction {
922
961
  constructor() {
923
962
  super('workbench.scm.action.setTreeViewModeNavigation', {
924
963
  id: MenuId.SCMTitle,
925
- when: ( (ContextKeyExpr.and(
926
- (ContextKeyExpr.equals('view', VIEW_PANE_ID)),
927
- (ContextKeys.RepositoryCount.notEqualsTo(0)),
928
- (ContextKeys.SCMViewMode.isEqualTo("list" ))
929
- ))),
964
+ when: ( ContextKeyExpr.and(( ContextKeyExpr.equals('view', VIEW_PANE_ID)), ( ContextKeys.RepositoryCount.notEqualsTo(0)), ( ContextKeys.SCMViewMode.isEqualTo(ViewMode.List)))),
930
965
  group: 'navigation',
931
- order: -1000
966
+ order: -1e3
932
967
  });
933
968
  }
934
969
  }
@@ -943,7 +978,7 @@ class RepositorySortAction extends ViewAction {
943
978
  title,
944
979
  viewId: VIEW_PANE_ID,
945
980
  f1: false,
946
- toggled: ( (RepositoryContextKeys.RepositorySortKey.isEqualTo(sortKey))),
981
+ toggled: ( RepositoryContextKeys.RepositorySortKey.isEqualTo(sortKey)),
947
982
  menu: [
948
983
  {
949
984
  id: Menus.Repositories,
@@ -963,17 +998,17 @@ class RepositorySortAction extends ViewAction {
963
998
  }
964
999
  class RepositorySortByDiscoveryTimeAction extends RepositorySortAction {
965
1000
  constructor() {
966
- super("discoveryTime" , ( localize(6594, "Sort by Discovery Time")));
1001
+ super(ISCMRepositorySortKey.DiscoveryTime, ( localize(8553, "Sort by Discovery Time")));
967
1002
  }
968
1003
  }
969
1004
  class RepositorySortByNameAction extends RepositorySortAction {
970
1005
  constructor() {
971
- super("name" , ( localize(6595, "Sort by Name")));
1006
+ super(ISCMRepositorySortKey.Name, ( localize(8554, "Sort by Name")));
972
1007
  }
973
1008
  }
974
1009
  class RepositorySortByPathAction extends RepositorySortAction {
975
1010
  constructor() {
976
- super("path" , ( localize(6596, "Sort by Path")));
1011
+ super(ISCMRepositorySortKey.Path, ( localize(8555, "Sort by Path")));
977
1012
  }
978
1013
  }
979
1014
  registerAction2(RepositorySortByDiscoveryTimeAction);
@@ -986,8 +1021,8 @@ class SetSortKeyAction extends ViewAction {
986
1021
  title,
987
1022
  viewId: VIEW_PANE_ID,
988
1023
  f1: false,
989
- toggled: ( (ContextKeys.SCMViewSortKey.isEqualTo(sortKey))),
990
- precondition: ( (ContextKeys.SCMViewMode.isEqualTo("list" ))),
1024
+ toggled: ( ContextKeys.SCMViewSortKey.isEqualTo(sortKey)),
1025
+ precondition: ( ContextKeys.SCMViewMode.isEqualTo(ViewMode.List)),
991
1026
  menu: { id: Menus.ViewSort, group: '2_sort' }
992
1027
  });
993
1028
  this.sortKey = sortKey;
@@ -998,17 +1033,17 @@ class SetSortKeyAction extends ViewAction {
998
1033
  }
999
1034
  class SetSortByNameAction extends SetSortKeyAction {
1000
1035
  constructor() {
1001
- super("name" , ( localize(6597, "Sort Changes by Name")));
1036
+ super(ViewSortKey.Name, ( localize(8556, "Sort Changes by Name")));
1002
1037
  }
1003
1038
  }
1004
1039
  class SetSortByPathAction extends SetSortKeyAction {
1005
1040
  constructor() {
1006
- super("path" , ( localize(6598, "Sort Changes by Path")));
1041
+ super(ViewSortKey.Path, ( localize(8557, "Sort Changes by Path")));
1007
1042
  }
1008
1043
  }
1009
1044
  class SetSortByStatusAction extends SetSortKeyAction {
1010
1045
  constructor() {
1011
- super("status" , ( localize(6599, "Sort Changes by Status")));
1046
+ super(ViewSortKey.Status, ( localize(8558, "Sort Changes by Status")));
1012
1047
  }
1013
1048
  }
1014
1049
  registerAction2(SetSortByNameAction);
@@ -1018,18 +1053,14 @@ class CollapseAllRepositoriesAction extends ViewAction {
1018
1053
  constructor() {
1019
1054
  super({
1020
1055
  id: `workbench.scm.action.collapseAllRepositories`,
1021
- title: ( localize(6600, "Collapse All Repositories")),
1056
+ title: ( localize(8559, "Collapse All Repositories")),
1022
1057
  viewId: VIEW_PANE_ID,
1023
1058
  f1: false,
1024
1059
  icon: Codicon.collapseAll,
1025
1060
  menu: {
1026
1061
  id: MenuId.SCMTitle,
1027
1062
  group: 'navigation',
1028
- when: ( (ContextKeyExpr.and(
1029
- (ContextKeyExpr.equals('view', VIEW_PANE_ID)),
1030
- (ContextKeys.SCMViewIsAnyRepositoryCollapsible.isEqualTo(true)),
1031
- (ContextKeys.SCMViewAreAllRepositoriesCollapsed.isEqualTo(false))
1032
- )))
1063
+ when: ( ContextKeyExpr.and(( ContextKeyExpr.equals('view', VIEW_PANE_ID)), ( ContextKeys.SCMViewIsAnyRepositoryCollapsible.isEqualTo(true)), ( ContextKeys.SCMViewAreAllRepositoriesCollapsed.isEqualTo(false))))
1033
1064
  }
1034
1065
  });
1035
1066
  }
@@ -1041,18 +1072,14 @@ class ExpandAllRepositoriesAction extends ViewAction {
1041
1072
  constructor() {
1042
1073
  super({
1043
1074
  id: `workbench.scm.action.expandAllRepositories`,
1044
- title: ( localize(6601, "Expand All Repositories")),
1075
+ title: ( localize(8560, "Expand All Repositories")),
1045
1076
  viewId: VIEW_PANE_ID,
1046
1077
  f1: false,
1047
1078
  icon: Codicon.expandAll,
1048
1079
  menu: {
1049
1080
  id: MenuId.SCMTitle,
1050
1081
  group: 'navigation',
1051
- when: ( (ContextKeyExpr.and(
1052
- (ContextKeyExpr.equals('view', VIEW_PANE_ID)),
1053
- (ContextKeys.SCMViewIsAnyRepositoryCollapsible.isEqualTo(true)),
1054
- (ContextKeys.SCMViewAreAllRepositoriesCollapsed.isEqualTo(true))
1055
- )))
1082
+ when: ( ContextKeyExpr.and(( ContextKeyExpr.equals('view', VIEW_PANE_ID)), ( ContextKeys.SCMViewIsAnyRepositoryCollapsible.isEqualTo(true)), ( ContextKeys.SCMViewAreAllRepositoriesCollapsed.isEqualTo(true))))
1056
1083
  }
1057
1084
  });
1058
1085
  }
@@ -1062,19 +1089,27 @@ class ExpandAllRepositoriesAction extends ViewAction {
1062
1089
  }
1063
1090
  registerAction2(CollapseAllRepositoriesAction);
1064
1091
  registerAction2(ExpandAllRepositoriesAction);
1092
+ var SCMInputWidgetCommandId;
1093
+ (function (SCMInputWidgetCommandId) {
1094
+ SCMInputWidgetCommandId["CancelAction"] = "scm.input.cancelAction";
1095
+ })(SCMInputWidgetCommandId || (SCMInputWidgetCommandId = {}));
1096
+ var SCMInputWidgetStorageKey;
1097
+ (function (SCMInputWidgetStorageKey) {
1098
+ SCMInputWidgetStorageKey["LastActionId"] = "scm.input.lastActionId";
1099
+ })(SCMInputWidgetStorageKey || (SCMInputWidgetStorageKey = {}));
1065
1100
  let SCMInputWidgetActionRunner = class SCMInputWidgetActionRunner extends ActionRunner {
1066
1101
  get runningActions() { return this._runningActions; }
1067
1102
  constructor(input, storageService) {
1068
1103
  super();
1069
1104
  this.input = input;
1070
1105
  this.storageService = storageService;
1071
- this._runningActions = ( (new Set()));
1106
+ this._runningActions = ( new Set());
1072
1107
  }
1073
1108
  async runAction(action) {
1074
1109
  try {
1075
1110
  if (this.runningActions.size !== 0) {
1076
1111
  this._cts?.cancel();
1077
- if (action.id === "scm.input.cancelAction" ) {
1112
+ if (action.id === SCMInputWidgetCommandId.CancelAction) {
1078
1113
  return;
1079
1114
  }
1080
1115
  }
@@ -1082,24 +1117,24 @@ let SCMInputWidgetActionRunner = class SCMInputWidgetActionRunner extends Action
1082
1117
  for (const group of this.input.repository.provider.groups) {
1083
1118
  context.push({
1084
1119
  resourceGroupId: group.id,
1085
- resources: [...( (group.resources.map(r => r.sourceUri)))]
1120
+ resources: [...( group.resources.map(r => r.sourceUri))]
1086
1121
  });
1087
1122
  }
1088
1123
  this._runningActions.add(action);
1089
- this._cts = ( (new CancellationTokenSource()));
1124
+ this._cts = ( new CancellationTokenSource());
1090
1125
  await action.run(...[this.input.repository.provider.rootUri, context, this._cts.token]);
1091
1126
  }
1092
1127
  finally {
1093
1128
  this._runningActions.delete(action);
1094
1129
  if (this._runningActions.size === 0) {
1095
- this.storageService.store("scm.input.lastActionId" , action.id, 0 , 0 );
1130
+ this.storageService.store(SCMInputWidgetStorageKey.LastActionId, action.id, StorageScope.PROFILE, StorageTarget.USER);
1096
1131
  }
1097
1132
  }
1098
1133
  }
1099
1134
  };
1100
- SCMInputWidgetActionRunner = ( (__decorate([
1101
- ( (__param(1, IStorageService)))
1102
- ], SCMInputWidgetActionRunner)));
1135
+ SCMInputWidgetActionRunner = ( __decorate([
1136
+ ( __param(1, IStorageService))
1137
+ ], SCMInputWidgetActionRunner));
1103
1138
  let SCMInputWidgetToolbar = class SCMInputWidgetToolbar extends WorkbenchToolBar {
1104
1139
  get dropdownActions() { return this._dropdownActions; }
1105
1140
  get dropdownAction() { return this._dropdownAction; }
@@ -1109,18 +1144,18 @@ let SCMInputWidgetToolbar = class SCMInputWidgetToolbar extends WorkbenchToolBar
1109
1144
  this.contextKeyService = contextKeyService;
1110
1145
  this.storageService = storageService;
1111
1146
  this._dropdownActions = [];
1112
- this._onDidChange = ( (new Emitter()));
1147
+ this._onDidChange = ( new Emitter());
1113
1148
  this.onDidChange = this._onDidChange.event;
1114
- this._disposables = this._register(( (new MutableDisposable())));
1115
- this._dropdownAction = ( (new Action('scmInputMoreActions', ( localize(6602, "More Actions...")), 'codicon-chevron-down')));
1116
- this._cancelAction = ( (new MenuItemAction({
1117
- id: "scm.input.cancelAction" ,
1118
- title: ( localize(6603, "Cancel")),
1119
- icon: Codicon.debugStop,
1120
- }, undefined, undefined, undefined, undefined, contextKeyService, commandService)));
1149
+ this._disposables = this._register(( new MutableDisposable()));
1150
+ this._dropdownAction = ( new Action('scmInputMoreActions', ( localize(8561, "More Actions...")), 'codicon-chevron-down'));
1151
+ this._cancelAction = ( new MenuItemAction({
1152
+ id: SCMInputWidgetCommandId.CancelAction,
1153
+ title: ( localize(8562, "Cancel")),
1154
+ icon: Codicon.stopCircle,
1155
+ }, undefined, undefined, undefined, undefined, contextKeyService, commandService));
1121
1156
  }
1122
1157
  setInput(input) {
1123
- this._disposables.value = ( (new DisposableStore()));
1158
+ this._disposables.value = ( new DisposableStore());
1124
1159
  const contextKeyService = this.contextKeyService.createOverlay([
1125
1160
  ['scmProvider', input.repository.provider.contextValue],
1126
1161
  ['scmProviderRootUri', input.repository.provider.rootUri?.toString()],
@@ -1128,13 +1163,10 @@ let SCMInputWidgetToolbar = class SCMInputWidgetToolbar extends WorkbenchToolBar
1128
1163
  ]);
1129
1164
  const menu = this._disposables.value.add(this.menuService.createMenu(MenuId.SCMInputBox, contextKeyService, { emitEventsForSubmenuChanges: true }));
1130
1165
  const isEnabled = () => {
1131
- return (
1132
- (input.repository.provider.groups.some(g => g.resources.length > 0))
1133
- );
1166
+ return ( input.repository.provider.groups.some(g => g.resources.length > 0));
1134
1167
  };
1135
1168
  const updateToolbar = () => {
1136
- const actions = [];
1137
- createAndFillInActionBarActions(menu, { shouldForwardArgs: true }, actions);
1169
+ const actions = getFlatActionBarActions(menu.getActions({ shouldForwardArgs: true }));
1138
1170
  for (const action of actions) {
1139
1171
  action.enabled = isEnabled();
1140
1172
  }
@@ -1144,7 +1176,7 @@ let SCMInputWidgetToolbar = class SCMInputWidgetToolbar extends WorkbenchToolBar
1144
1176
  primaryAction = actions[0];
1145
1177
  }
1146
1178
  else if (actions.length > 1) {
1147
- const lastActionId = this.storageService.get("scm.input.lastActionId" , 0 , '');
1179
+ const lastActionId = this.storageService.get(SCMInputWidgetStorageKey.LastActionId, StorageScope.PROFILE, '');
1148
1180
  primaryAction = actions.find(a => a.id === lastActionId) ?? actions[0];
1149
1181
  }
1150
1182
  this._dropdownActions = actions.length === 1 ? [] : actions;
@@ -1153,8 +1185,8 @@ let SCMInputWidgetToolbar = class SCMInputWidgetToolbar extends WorkbenchToolBar
1153
1185
  };
1154
1186
  this._disposables.value.add(menu.onDidChange(() => updateToolbar()));
1155
1187
  this._disposables.value.add(input.repository.provider.onDidChangeResources(() => updateToolbar()));
1156
- this._disposables.value.add(this.storageService.onDidChangeValue(0 , "scm.input.lastActionId" , this._disposables.value)(() => updateToolbar()));
1157
- this.actionRunner = ( (new SCMInputWidgetActionRunner(input, this.storageService)));
1188
+ this._disposables.value.add(this.storageService.onDidChangeValue(StorageScope.PROFILE, SCMInputWidgetStorageKey.LastActionId, this._disposables.value)(() => updateToolbar()));
1189
+ this.actionRunner = ( new SCMInputWidgetActionRunner(input, this.storageService));
1158
1190
  this._disposables.value.add(this.actionRunner.onWillRun(e => {
1159
1191
  if (this.actionRunner.runningActions.size === 0) {
1160
1192
  super.setActions([this._cancelAction], []);
@@ -1169,23 +1201,23 @@ let SCMInputWidgetToolbar = class SCMInputWidgetToolbar extends WorkbenchToolBar
1169
1201
  updateToolbar();
1170
1202
  }
1171
1203
  };
1172
- SCMInputWidgetToolbar = ( (__decorate([
1173
- ( (__param(2, IMenuService))),
1174
- ( (__param(3, IContextKeyService))),
1175
- ( (__param(4, IContextMenuService))),
1176
- ( (__param(5, ICommandService))),
1177
- ( (__param(6, IKeybindingService))),
1178
- ( (__param(7, IStorageService))),
1179
- ( (__param(8, ITelemetryService)))
1180
- ], SCMInputWidgetToolbar)));
1204
+ SCMInputWidgetToolbar = ( __decorate([
1205
+ ( __param(2, IMenuService)),
1206
+ ( __param(3, IContextKeyService)),
1207
+ ( __param(4, IContextMenuService)),
1208
+ ( __param(5, ICommandService)),
1209
+ ( __param(6, IKeybindingService)),
1210
+ ( __param(7, IStorageService)),
1211
+ ( __param(8, ITelemetryService))
1212
+ ], SCMInputWidgetToolbar));
1181
1213
  class SCMInputWidgetEditorOptions {
1182
1214
  constructor(overflowWidgetsDomNode, configurationService) {
1183
1215
  this.overflowWidgetsDomNode = overflowWidgetsDomNode;
1184
1216
  this.configurationService = configurationService;
1185
- this._onDidChange = ( (new Emitter()));
1217
+ this._onDidChange = ( new Emitter());
1186
1218
  this.onDidChange = this._onDidChange.event;
1187
1219
  this.defaultInputFontFamily = DEFAULT_FONT_FAMILY;
1188
- this._disposables = ( (new DisposableStore()));
1220
+ this._disposables = ( new DisposableStore());
1189
1221
  const onDidChangeConfiguration = Event.filter(this.configurationService.onDidChangeConfiguration, e => {
1190
1222
  return e.affectsConfiguration('editor.accessibilitySupport') ||
1191
1223
  e.affectsConfiguration('editor.cursorBlinking') ||
@@ -1262,9 +1294,9 @@ class SCMInputWidgetEditorOptions {
1262
1294
  let SCMInputWidget = class SCMInputWidget {
1263
1295
  static { SCMInputWidget_1 = this; }
1264
1296
  static { this.ValidationTimeouts = {
1265
- [2 ]: 5000,
1266
- [1 ]: 8000,
1267
- [0 ]: 10000
1297
+ [InputValidationType.Information]: 5000,
1298
+ [InputValidationType.Warning]: 8000,
1299
+ [InputValidationType.Error]: 10000
1268
1300
  }; }
1269
1301
  get input() {
1270
1302
  return this.model?.input;
@@ -1285,9 +1317,9 @@ let SCMInputWidget = class SCMInputWidget {
1285
1317
  const textModel = input.repository.provider.inputBoxTextModel;
1286
1318
  this.inputEditor.setModel(textModel);
1287
1319
  if (this.configurationService.getValue('editor.wordBasedSuggestions', { resource: textModel.uri }) !== 'off') {
1288
- this.configurationService.updateValue('editor.wordBasedSuggestions', 'off', { resource: textModel.uri }, 8 );
1320
+ this.configurationService.updateValue('editor.wordBasedSuggestions', 'off', { resource: textModel.uri }, ConfigurationTarget.MEMORY);
1289
1321
  }
1290
- const validationDelayer = ( (new ThrottledDelayer(200)));
1322
+ const validationDelayer = ( new ThrottledDelayer(200));
1291
1323
  const validate = async () => {
1292
1324
  const position = this.inputEditor.getSelection()?.getStartPosition();
1293
1325
  const offset = position && textModel.getOffsetAt(position);
@@ -1298,7 +1330,7 @@ let SCMInputWidget = class SCMInputWidget {
1298
1330
  this.repositoryDisposables.add(validationDelayer);
1299
1331
  this.repositoryDisposables.add(this.inputEditor.onDidChangeCursorPosition(triggerValidation));
1300
1332
  const opts = this.modelService.getCreationOptions(textModel.getLanguageId(), textModel.uri, textModel.isForSimpleWidget);
1301
- const onEnter = Event.filter(this.inputEditor.onKeyDown, e => e.keyCode === 3 , this.repositoryDisposables);
1333
+ const onEnter = Event.filter(this.inputEditor.onKeyDown, e => e.keyCode === KeyCode.Enter, this.repositoryDisposables);
1302
1334
  this.repositoryDisposables.add(onEnter(() => textModel.detectIndentation(opts.insertSpaces, opts.tabSize)));
1303
1335
  textModel.setValue(input.value);
1304
1336
  this.repositoryDisposables.add(input.onDidChange(({ value, reason }) => {
@@ -1381,8 +1413,8 @@ let SCMInputWidget = class SCMInputWidget {
1381
1413
  this.scmViewService = scmViewService;
1382
1414
  this.contextViewService = contextViewService;
1383
1415
  this.openerService = openerService;
1384
- this.disposables = ( (new DisposableStore()));
1385
- this.repositoryDisposables = ( (new DisposableStore()));
1416
+ this.disposables = ( new DisposableStore());
1417
+ this.repositoryDisposables = ( new DisposableStore());
1386
1418
  this.validationHasFocus = false;
1387
1419
  this.lastLayoutWasTrash = false;
1388
1420
  this.shouldFocusAfterLayout = false;
@@ -1391,7 +1423,7 @@ let SCMInputWidget = class SCMInputWidget {
1391
1423
  this.toolbarContainer = append(this.element, $('.scm-editor-toolbar'));
1392
1424
  this.contextKeyService = contextKeyService.createScoped(this.element);
1393
1425
  this.repositoryIdContextKey = this.contextKeyService.createKey('scmRepository', undefined);
1394
- this.inputEditorOptions = ( (new SCMInputWidgetEditorOptions(overflowWidgetsDomNode, this.configurationService)));
1426
+ this.inputEditorOptions = ( new SCMInputWidgetEditorOptions(overflowWidgetsDomNode, this.configurationService));
1395
1427
  this.disposables.add(this.inputEditorOptions.onDidChange(this.onDidChangeEditorOptions, this));
1396
1428
  this.disposables.add(this.inputEditorOptions);
1397
1429
  const codeEditorWidgetOptions = {
@@ -1417,7 +1449,7 @@ let SCMInputWidget = class SCMInputWidget {
1417
1449
  ]),
1418
1450
  isSimpleWidget: true
1419
1451
  };
1420
- const services = ( (new ServiceCollection([IContextKeyService, this.contextKeyService])));
1452
+ const services = ( new ServiceCollection([IContextKeyService, this.contextKeyService]));
1421
1453
  const instantiationService2 = instantiationService.createChild(services, this.disposables);
1422
1454
  const editorConstructionOptions = this.inputEditorOptions.getEditorConstructionOptions();
1423
1455
  this.inputEditor = instantiationService2.createInstance(CodeEditorWidget, this.editorContainer, editorConstructionOptions, codeEditorWidgetOptions);
@@ -1471,8 +1503,8 @@ let SCMInputWidget = class SCMInputWidget {
1471
1503
  this.disposables.add(this.toolbar);
1472
1504
  }
1473
1505
  getContentHeight() {
1474
- const lineHeight = this.inputEditor.getOption(68 );
1475
- const { top, bottom } = this.inputEditor.getOption(86 );
1506
+ const lineHeight = this.inputEditor.getOption(EditorOption.lineHeight);
1507
+ const { top, bottom } = this.inputEditor.getOption(EditorOption.padding);
1476
1508
  const inputMinLinesConfig = this.configurationService.getValue('scm.inputMinLineCount');
1477
1509
  const inputMinLines = typeof inputMinLinesConfig === 'number' ? clamp(inputMinLinesConfig, 1, 50) : 1;
1478
1510
  const editorMinHeight = inputMinLines * lineHeight + top + bottom;
@@ -1484,7 +1516,7 @@ let SCMInputWidget = class SCMInputWidget {
1484
1516
  layout() {
1485
1517
  const editorHeight = this.getContentHeight();
1486
1518
  const toolbarWidth = this.getToolbarWidth();
1487
- const dimension = ( (new Dimension(this.element.clientWidth - toolbarWidth, editorHeight)));
1519
+ const dimension = ( new Dimension(this.element.clientWidth - toolbarWidth, editorHeight));
1488
1520
  if (dimension.width < 0) {
1489
1521
  this.lastLayoutWasTrash = true;
1490
1522
  return;
@@ -1516,22 +1548,22 @@ let SCMInputWidget = class SCMInputWidget {
1516
1548
  }
1517
1549
  renderValidation() {
1518
1550
  this.clearValidation();
1519
- this.element.classList.toggle('validation-info', this.validation?.type === 2 );
1520
- this.element.classList.toggle('validation-warning', this.validation?.type === 1 );
1521
- this.element.classList.toggle('validation-error', this.validation?.type === 0 );
1551
+ this.element.classList.toggle('validation-info', this.validation?.type === InputValidationType.Information);
1552
+ this.element.classList.toggle('validation-warning', this.validation?.type === InputValidationType.Warning);
1553
+ this.element.classList.toggle('validation-error', this.validation?.type === InputValidationType.Error);
1522
1554
  if (!this.validation || !this.inputEditor.hasTextFocus()) {
1523
1555
  return;
1524
1556
  }
1525
- const disposables = ( (new DisposableStore()));
1557
+ const disposables = ( new DisposableStore());
1526
1558
  this.validationContextView = this.contextViewService.showContextView({
1527
1559
  getAnchor: () => this.element,
1528
1560
  render: container => {
1529
1561
  this.element.style.borderBottomLeftRadius = '0';
1530
1562
  this.element.style.borderBottomRightRadius = '0';
1531
1563
  const validationContainer = append(container, $('.scm-editor-validation-container'));
1532
- validationContainer.classList.toggle('validation-info', this.validation.type === 2 );
1533
- validationContainer.classList.toggle('validation-warning', this.validation.type === 1 );
1534
- validationContainer.classList.toggle('validation-error', this.validation.type === 0 );
1564
+ validationContainer.classList.toggle('validation-info', this.validation.type === InputValidationType.Information);
1565
+ validationContainer.classList.toggle('validation-warning', this.validation.type === InputValidationType.Warning);
1566
+ validationContainer.classList.toggle('validation-error', this.validation.type === InputValidationType.Error);
1535
1567
  validationContainer.style.width = `${this.element.clientWidth + 2}px`;
1536
1568
  const element = append(validationContainer, $('.scm-editor-validation'));
1537
1569
  const message = this.validation.message;
@@ -1564,12 +1596,12 @@ let SCMInputWidget = class SCMInputWidget {
1564
1596
  element.appendChild(renderedMarkdown.element);
1565
1597
  }
1566
1598
  const actionsContainer = append(validationContainer, $('.scm-editor-validation-actions'));
1567
- const actionbar = ( (new ActionBar(actionsContainer)));
1568
- const action = ( (new Action('scmInputWidget.validationMessage.close', ( localize(6604, "Close")), ThemeIcon.asClassName(Codicon.close), true, () => {
1599
+ const actionbar = ( new ActionBar(actionsContainer));
1600
+ const action = ( new Action('scmInputWidget.validationMessage.close', ( localize(8563, "Close")), ThemeIcon.asClassName(Codicon.close), true, () => {
1569
1601
  this.contextViewService.hideContextView();
1570
1602
  this.element.style.borderBottomLeftRadius = '2px';
1571
1603
  this.element.style.borderBottomRightRadius = '2px';
1572
- })));
1604
+ }));
1573
1605
  disposables.add(actionbar);
1574
1606
  actionbar.push(action, { icon: true, label: false });
1575
1607
  return Disposable.None;
@@ -1580,7 +1612,7 @@ let SCMInputWidget = class SCMInputWidget {
1580
1612
  this.element.style.borderBottomRightRadius = '2px';
1581
1613
  disposables.dispose();
1582
1614
  },
1583
- anchorAlignment: 0
1615
+ anchorAlignment: AnchorAlignment.LEFT
1584
1616
  });
1585
1617
  }
1586
1618
  getToolbarWidth() {
@@ -1604,16 +1636,16 @@ let SCMInputWidget = class SCMInputWidget {
1604
1636
  this.disposables.dispose();
1605
1637
  }
1606
1638
  };
1607
- SCMInputWidget = SCMInputWidget_1 = ( (__decorate([
1608
- ( (__param(2, IContextKeyService))),
1609
- ( (__param(3, IModelService))),
1610
- ( (__param(4, IKeybindingService))),
1611
- ( (__param(5, IConfigurationService))),
1612
- ( (__param(6, IInstantiationService))),
1613
- ( (__param(7, ISCMViewService))),
1614
- ( (__param(8, IContextViewService))),
1615
- ( (__param(9, IOpenerService)))
1616
- ], SCMInputWidget)));
1639
+ SCMInputWidget = SCMInputWidget_1 = ( __decorate([
1640
+ ( __param(2, IContextKeyService)),
1641
+ ( __param(3, IModelService)),
1642
+ ( __param(4, IKeybindingService)),
1643
+ ( __param(5, IConfigurationService)),
1644
+ ( __param(6, IInstantiationService)),
1645
+ ( __param(7, ISCMViewService)),
1646
+ ( __param(8, IContextViewService)),
1647
+ ( __param(9, IOpenerService))
1648
+ ], SCMInputWidget));
1617
1649
  let SCMViewPane = class SCMViewPane extends ViewPane {
1618
1650
  get viewMode() { return this._viewMode; }
1619
1651
  set viewMode(mode) {
@@ -1627,7 +1659,7 @@ let SCMViewPane = class SCMViewPane extends ViewPane {
1627
1659
  this._onDidChangeViewMode.fire(mode);
1628
1660
  this.viewModeContextKey.set(mode);
1629
1661
  this.updateIndentStyles(this.themeService.getFileIconTheme());
1630
- this.storageService.store(`scm.viewMode`, mode, 1 , 0 );
1662
+ this.storageService.store(`scm.viewMode`, mode, StorageScope.WORKSPACE, StorageTarget.USER);
1631
1663
  }
1632
1664
  get viewSortKey() { return this._viewSortKey; }
1633
1665
  set viewSortKey(sortKey) {
@@ -1638,8 +1670,8 @@ let SCMViewPane = class SCMViewPane extends ViewPane {
1638
1670
  this.updateChildren();
1639
1671
  this.viewSortKeyContextKey.set(sortKey);
1640
1672
  this._onDidChangeViewSortKey.fire(sortKey);
1641
- if (this._viewMode === "list" ) {
1642
- this.storageService.store(`scm.viewSortKey`, sortKey, 1 , 0 );
1673
+ if (this._viewMode === ViewMode.List) {
1674
+ this.storageService.store(`scm.viewSortKey`, sortKey, StorageScope.WORKSPACE, StorageTarget.USER);
1643
1675
  }
1644
1676
  }
1645
1677
  constructor(options, commandService, editorService, menuService, scmService, scmViewService, storageService, uriIdentityService, keybindingService, themeService, contextMenuService, instantiationService, viewDescriptorService, configurationService, contextKeyService, openerService, telemetryService, hoverService) {
@@ -1651,16 +1683,16 @@ let SCMViewPane = class SCMViewPane extends ViewPane {
1651
1683
  this.scmViewService = scmViewService;
1652
1684
  this.storageService = storageService;
1653
1685
  this.uriIdentityService = uriIdentityService;
1654
- this._onDidChangeViewMode = ( (new Emitter()));
1686
+ this._onDidChangeViewMode = ( new Emitter());
1655
1687
  this.onDidChangeViewMode = this._onDidChangeViewMode.event;
1656
- this._onDidChangeViewSortKey = ( (new Emitter()));
1688
+ this._onDidChangeViewSortKey = ( new Emitter());
1657
1689
  this.onDidChangeViewSortKey = this._onDidChangeViewSortKey.event;
1658
- this.items = ( (new DisposableMap()));
1659
- this.visibilityDisposables = ( (new DisposableStore()));
1660
- this.treeOperationSequencer = ( (new Sequencer()));
1661
- this.revealResourceThrottler = ( (new Throttler()));
1662
- this.updateChildrenThrottler = ( (new Throttler()));
1663
- this.disposables = ( (new DisposableStore()));
1690
+ this.items = ( new DisposableMap());
1691
+ this.visibilityDisposables = ( new DisposableStore());
1692
+ this.treeOperationSequencer = ( new Sequencer());
1693
+ this.revealResourceThrottler = ( new Throttler());
1694
+ this.updateChildrenThrottler = ( new Throttler());
1695
+ this.disposables = ( new DisposableStore());
1664
1696
  this._viewMode = this.getViewMode();
1665
1697
  this._viewSortKey = this.getViewSortKey();
1666
1698
  this.viewModeContextKey = ContextKeys.SCMViewMode.bindTo(contextKeyService);
@@ -1672,9 +1704,9 @@ let SCMViewPane = class SCMViewPane extends ViewPane {
1672
1704
  this.scmProviderContextKey = ContextKeys.SCMProvider.bindTo(contextKeyService);
1673
1705
  this.scmProviderRootUriContextKey = ContextKeys.SCMProviderRootUri.bindTo(contextKeyService);
1674
1706
  this.scmProviderHasRootUriContextKey = ContextKeys.SCMProviderHasRootUri.bindTo(contextKeyService);
1675
- this._onDidLayout = ( (new Emitter()));
1707
+ this._onDidLayout = ( new Emitter());
1676
1708
  this.layoutCache = { height: undefined, width: undefined, onDidChange: this._onDidLayout.event };
1677
- this.storageService.onDidChangeValue(1 , undefined, this.disposables)(e => {
1709
+ this.storageService.onDidChangeValue(StorageScope.WORKSPACE, undefined, this.disposables)(e => {
1678
1710
  switch (e.key) {
1679
1711
  case 'scm.viewMode':
1680
1712
  this.viewMode = this.getViewMode();
@@ -1746,7 +1778,7 @@ let SCMViewPane = class SCMViewPane extends ViewPane {
1746
1778
  }
1747
1779
  else {
1748
1780
  this.visibilityDisposables.clear();
1749
- this.onDidChangeVisibleRepositories({ added: Iterable.empty(), removed: [...( (this.items.keys()))] });
1781
+ this.onDidChangeVisibleRepositories({ added: Iterable.empty(), removed: [...( this.items.keys())] });
1750
1782
  this.treeScrollTop = this.tree.scrollTop;
1751
1783
  this.updateRepositoryCollapseAllContextKeys();
1752
1784
  }
@@ -1766,13 +1798,13 @@ let SCMViewPane = class SCMViewPane extends ViewPane {
1766
1798
  this.actionButtonRenderer = this.instantiationService.createInstance(ActionButtonRenderer);
1767
1799
  this.listLabels = this.instantiationService.createInstance(ResourceLabels, { onDidChangeVisibility: this.onDidChangeBodyVisibility });
1768
1800
  this.disposables.add(this.listLabels);
1769
- const resourceActionRunner = ( (new RepositoryPaneActionRunner(() => this.getSelectedResources())));
1801
+ const resourceActionRunner = ( new RepositoryPaneActionRunner(() => this.getSelectedResources()));
1770
1802
  resourceActionRunner.onWillRun(() => this.tree.domFocus(), this, this.disposables);
1771
1803
  this.disposables.add(resourceActionRunner);
1772
1804
  const treeDataSource = this.instantiationService.createInstance(SCMTreeDataSource, () => this.viewMode);
1773
1805
  this.disposables.add(treeDataSource);
1774
1806
  const compressionEnabled = observableConfigValue('scm.compactFolders', true, this.configurationService);
1775
- this.tree = this.instantiationService.createInstance(WorkbenchCompressibleAsyncDataTree, 'SCM Tree Repo', container, ( (new ListDelegate(this.inputRenderer))), ( (new SCMTreeCompressionDelegate())), [
1807
+ this.tree = this.instantiationService.createInstance(WorkbenchCompressibleAsyncDataTree, 'SCM Tree Repo', container, ( new ListDelegate(this.inputRenderer)), ( new SCMTreeCompressionDelegate()), [
1776
1808
  this.inputRenderer,
1777
1809
  this.actionButtonRenderer,
1778
1810
  this.instantiationService.createInstance(RepositoryRenderer, MenuId.SCMTitle, getActionViewItemProvider(this.instantiationService)),
@@ -1782,10 +1814,10 @@ let SCMViewPane = class SCMViewPane extends ViewPane {
1782
1814
  horizontalScrolling: false,
1783
1815
  setRowLineHeight: false,
1784
1816
  transformOptimization: false,
1785
- filter: ( (new SCMTreeFilter())),
1786
- dnd: ( (new SCMTreeDragAndDrop(this.instantiationService))),
1787
- identityProvider: ( (new SCMResourceIdentityProvider())),
1788
- sorter: ( (new SCMTreeSorter(() => this.viewMode, () => this.viewSortKey))),
1817
+ filter: ( new SCMTreeFilter()),
1818
+ dnd: ( new SCMTreeDragAndDrop(this.instantiationService)),
1819
+ identityProvider: ( new SCMResourceIdentityProvider()),
1820
+ sorter: ( new SCMTreeSorter(() => this.viewMode, () => this.viewSortKey)),
1789
1821
  keyboardNavigationLabelProvider: this.instantiationService.createInstance(SCMTreeKeyboardNavigationLabelProvider, () => this.viewMode),
1790
1822
  overrideStyles: this.getLocationBasedColors().listOverrideStyles,
1791
1823
  compressionEnabled: compressionEnabled.get(),
@@ -1896,12 +1928,12 @@ let SCMViewPane = class SCMViewPane extends ViewPane {
1896
1928
  if (!uri) {
1897
1929
  return;
1898
1930
  }
1899
- if (( (this.tree.getFocus().some(
1900
- e => isSCMResource(e) && this.uriIdentityService.extUri.isEqual(e.sourceUri, uri)
1901
- ))) &&
1902
- ( (this.tree.getSelection().some(
1931
+ if (( this.tree.getFocus().some(
1903
1932
  e => isSCMResource(e) && this.uriIdentityService.extUri.isEqual(e.sourceUri, uri)
1904
- )))) {
1933
+ )) &&
1934
+ ( this.tree.getSelection().some(
1935
+ e => isSCMResource(e) && this.uriIdentityService.extUri.isEqual(e.sourceUri, uri)
1936
+ ))) {
1905
1937
  return;
1906
1938
  }
1907
1939
  this.revealResourceThrottler.queue(() => this.treeOperationSequencer.queue(async () => {
@@ -1912,7 +1944,7 @@ let SCMViewPane = class SCMViewPane extends ViewPane {
1912
1944
  }
1913
1945
  for (let j = repository.provider.groups.length - 1; j >= 0; j--) {
1914
1946
  const groupItem = repository.provider.groups[j];
1915
- const resource = this.viewMode === "tree"
1947
+ const resource = this.viewMode === ViewMode.Tree
1916
1948
  ? groupItem.resourceTree.getNode(uri)?.element
1917
1949
  : groupItem.resources.find(r => this.uriIdentityService.extUri.isEqual(r.sourceUri, uri));
1918
1950
  if (resource) {
@@ -1928,14 +1960,14 @@ let SCMViewPane = class SCMViewPane extends ViewPane {
1928
1960
  }
1929
1961
  onDidChangeVisibleRepositories({ added, removed }) {
1930
1962
  for (const repository of added) {
1931
- const repositoryDisposables = ( (new DisposableStore()));
1963
+ const repositoryDisposables = ( new DisposableStore());
1932
1964
  repositoryDisposables.add(autorun(reader => {
1933
1965
  repository.provider.actionButton.read(reader);
1934
1966
  this.updateChildren(repository);
1935
1967
  }));
1936
1968
  repositoryDisposables.add(repository.input.onDidChangeVisibility(() => this.updateChildren(repository)));
1937
1969
  repositoryDisposables.add(repository.provider.onDidChangeResourceGroups(() => this.updateChildren(repository)));
1938
- const resourceGroupDisposables = repositoryDisposables.add(( (new DisposableMap())));
1970
+ const resourceGroupDisposables = repositoryDisposables.add(( new DisposableMap()));
1939
1971
  const onDidChangeResourceGroups = () => {
1940
1972
  for (const [resourceGroup] of resourceGroupDisposables) {
1941
1973
  if (!repository.provider.groups.includes(resourceGroup)) {
@@ -1943,8 +1975,8 @@ let SCMViewPane = class SCMViewPane extends ViewPane {
1943
1975
  }
1944
1976
  }
1945
1977
  for (const resourceGroup of repository.provider.groups) {
1946
- if (!( (resourceGroupDisposables.has(resourceGroup)))) {
1947
- const disposableStore = ( (new DisposableStore()));
1978
+ if (!( resourceGroupDisposables.has(resourceGroup))) {
1979
+ const disposableStore = ( new DisposableStore());
1948
1980
  disposableStore.add(resourceGroup.onDidChange(() => this.updateChildren(repository)));
1949
1981
  disposableStore.add(resourceGroup.onDidChangeResources(() => this.updateChildren(repository)));
1950
1982
  resourceGroupDisposables.set(resourceGroup, disposableStore);
@@ -1964,8 +1996,7 @@ let SCMViewPane = class SCMViewPane extends ViewPane {
1964
1996
  onListContextMenu(e) {
1965
1997
  if (!e.element) {
1966
1998
  const menu = this.menuService.getMenuActions(Menus.ViewSort, this.contextKeyService);
1967
- const actions = [];
1968
- createAndFillInContextMenuActions(menu, actions);
1999
+ const actions = getFlatContextMenuActions(menu);
1969
2000
  return this.contextMenuService.showContextMenu({
1970
2001
  getAnchor: () => e.anchor,
1971
2002
  getActions: () => actions,
@@ -1975,12 +2006,12 @@ let SCMViewPane = class SCMViewPane extends ViewPane {
1975
2006
  const element = e.element;
1976
2007
  let context = element;
1977
2008
  let actions = [];
1978
- let actionRunner = ( (new RepositoryPaneActionRunner(() => this.getSelectedResources())));
2009
+ let actionRunner = ( new RepositoryPaneActionRunner(() => this.getSelectedResources()));
1979
2010
  if (isSCMRepository(element)) {
1980
2011
  const menus = this.scmViewService.menus.getRepositoryMenus(element.provider);
1981
2012
  const menu = menus.repositoryContextMenu;
1982
2013
  context = element.provider;
1983
- actionRunner = ( (new RepositoryActionRunner(() => this.getSelectedRepositories())));
2014
+ actionRunner = ( new RepositoryActionRunner(() => this.getSelectedRepositories()));
1984
2015
  actions = collectContextMenuActions(menu);
1985
2016
  }
1986
2017
  else if (isSCMInput(element) || isSCMActionButton(element)) ;
@@ -2017,45 +2048,45 @@ let SCMViewPane = class SCMViewPane extends ViewPane {
2017
2048
  getSelectedRepositories() {
2018
2049
  const focusedRepositories = this.tree.getFocus().filter(r => !!r && isSCMRepository(r));
2019
2050
  const selectedRepositories = this.tree.getSelection().filter(r => !!r && isSCMRepository(r));
2020
- return Array.from(( (new Set([...focusedRepositories, ...selectedRepositories]))));
2051
+ return Array.from(( new Set([...focusedRepositories, ...selectedRepositories])));
2021
2052
  }
2022
2053
  getSelectedResources() {
2023
2054
  return this.tree.getSelection()
2024
2055
  .filter(r => !!r && !isSCMResourceGroup(r));
2025
2056
  }
2026
2057
  getViewMode() {
2027
- let mode = this.configurationService.getValue('scm.defaultViewMode') === 'list' ? "list" : "tree" ;
2028
- const storageMode = this.storageService.get(`scm.viewMode`, 1 );
2058
+ let mode = this.configurationService.getValue('scm.defaultViewMode') === 'list' ? ViewMode.List : ViewMode.Tree;
2059
+ const storageMode = this.storageService.get(`scm.viewMode`, StorageScope.WORKSPACE);
2029
2060
  if (typeof storageMode === 'string') {
2030
2061
  mode = storageMode;
2031
2062
  }
2032
2063
  return mode;
2033
2064
  }
2034
2065
  getViewSortKey() {
2035
- if (this._viewMode === "tree" ) {
2036
- return "path" ;
2066
+ if (this._viewMode === ViewMode.Tree) {
2067
+ return ViewSortKey.Path;
2037
2068
  }
2038
2069
  let viewSortKey;
2039
2070
  const viewSortKeyString = this.configurationService.getValue('scm.defaultViewSortKey');
2040
2071
  switch (viewSortKeyString) {
2041
2072
  case 'name':
2042
- viewSortKey = "name" ;
2073
+ viewSortKey = ViewSortKey.Name;
2043
2074
  break;
2044
2075
  case 'status':
2045
- viewSortKey = "status" ;
2076
+ viewSortKey = ViewSortKey.Status;
2046
2077
  break;
2047
2078
  default:
2048
- viewSortKey = "path" ;
2079
+ viewSortKey = ViewSortKey.Path;
2049
2080
  break;
2050
2081
  }
2051
- const storageSortKey = this.storageService.get(`scm.viewSortKey`, 1 );
2082
+ const storageSortKey = this.storageService.get(`scm.viewSortKey`, StorageScope.WORKSPACE);
2052
2083
  if (typeof storageSortKey === 'string') {
2053
2084
  viewSortKey = storageSortKey;
2054
2085
  }
2055
2086
  return viewSortKey;
2056
2087
  }
2057
2088
  loadTreeViewState() {
2058
- const storageViewState = this.storageService.get('scm.viewState2', 1 );
2089
+ const storageViewState = this.storageService.get('scm.viewState2', StorageScope.WORKSPACE);
2059
2090
  if (!storageViewState) {
2060
2091
  return undefined;
2061
2092
  }
@@ -2069,7 +2100,7 @@ let SCMViewPane = class SCMViewPane extends ViewPane {
2069
2100
  }
2070
2101
  storeTreeViewState() {
2071
2102
  if (this.tree) {
2072
- this.storageService.store('scm.viewState2', JSON.stringify(this.tree.getViewState()), 1 , 1 );
2103
+ this.storageService.store('scm.viewState2', JSON.stringify(this.tree.getViewState()), StorageScope.WORKSPACE, StorageTarget.MACHINE);
2073
2104
  }
2074
2105
  }
2075
2106
  updateChildren(element) {
@@ -2089,15 +2120,15 @@ let SCMViewPane = class SCMViewPane extends ViewPane {
2089
2120
  }));
2090
2121
  }
2091
2122
  updateIndentStyles(theme) {
2092
- this.treeContainer.classList.toggle('list-view-mode', this.viewMode === "list" );
2093
- this.treeContainer.classList.toggle('tree-view-mode', this.viewMode === "tree" );
2094
- this.treeContainer.classList.toggle('align-icons-and-twisties', (this.viewMode === "list" && theme.hasFileIcons) || (theme.hasFileIcons && !theme.hasFolderIcons));
2095
- this.treeContainer.classList.toggle('hide-arrows', this.viewMode === "tree" && theme.hidesExplorerArrows === true);
2123
+ this.treeContainer.classList.toggle('list-view-mode', this.viewMode === ViewMode.List);
2124
+ this.treeContainer.classList.toggle('tree-view-mode', this.viewMode === ViewMode.Tree);
2125
+ this.treeContainer.classList.toggle('align-icons-and-twisties', (this.viewMode === ViewMode.List && theme.hasFileIcons) || (theme.hasFileIcons && !theme.hasFolderIcons));
2126
+ this.treeContainer.classList.toggle('hide-arrows', this.viewMode === ViewMode.Tree && theme.hidesExplorerArrows === true);
2096
2127
  }
2097
2128
  updateScmProviderContextKeys() {
2098
2129
  const alwaysShowRepositories = this.configurationService.getValue('scm.alwaysShowRepositories');
2099
2130
  if (!alwaysShowRepositories && this.items.size === 1) {
2100
- const provider = Iterable.first(( (this.items.keys()))).provider;
2131
+ const provider = Iterable.first(( this.items.keys())).provider;
2101
2132
  this.scmProviderContextKey.set(provider.contextValue);
2102
2133
  this.scmProviderRootUriContextKey.set(provider.rootUri?.toString());
2103
2134
  this.scmProviderHasRootUriContextKey.set(!!provider.rootUri);
@@ -2114,7 +2145,7 @@ let SCMViewPane = class SCMViewPane extends ViewPane {
2114
2145
  this.areAllRepositoriesCollapsedContextKey.set(false);
2115
2146
  return;
2116
2147
  }
2117
- this.isAnyRepositoryCollapsibleContextKey.set(( (this.scmViewService.visibleRepositories.some(r => this.tree.hasNode(r) && this.tree.isCollapsible(r)))));
2148
+ this.isAnyRepositoryCollapsibleContextKey.set(( this.scmViewService.visibleRepositories.some(r => this.tree.hasNode(r) && this.tree.isCollapsible(r))));
2118
2149
  this.areAllRepositoriesCollapsedContextKey.set(this.scmViewService.visibleRepositories.every(r => this.tree.hasNode(r) && (!this.tree.isCollapsible(r) || this.tree.isCollapsed(r))));
2119
2150
  }
2120
2151
  collapseAllRepositories() {
@@ -2207,24 +2238,22 @@ let SCMViewPane = class SCMViewPane extends ViewPane {
2207
2238
  focus() {
2208
2239
  super.focus();
2209
2240
  this.treeOperationSequencer.queue(() => {
2210
- return (
2211
- (new Promise(resolve => {
2212
- if (this.isExpanded()) {
2213
- if (this.tree.getFocus().length === 0) {
2214
- for (const repository of this.scmViewService.visibleRepositories) {
2215
- const widget = this.inputRenderer.getRenderedInputWidget(repository.input);
2216
- if (widget) {
2217
- widget.focus();
2218
- resolve();
2219
- return;
2220
- }
2241
+ return ( new Promise(resolve => {
2242
+ if (this.isExpanded()) {
2243
+ if (this.tree.getFocus().length === 0) {
2244
+ for (const repository of this.scmViewService.visibleRepositories) {
2245
+ const widget = this.inputRenderer.getRenderedInputWidget(repository.input);
2246
+ if (widget) {
2247
+ widget.focus();
2248
+ resolve();
2249
+ return;
2221
2250
  }
2222
2251
  }
2223
- this.tree.domFocus();
2224
- resolve();
2225
2252
  }
2226
- }))
2227
- );
2253
+ this.tree.domFocus();
2254
+ resolve();
2255
+ }
2256
+ }));
2228
2257
  });
2229
2258
  }
2230
2259
  dispose() {
@@ -2234,25 +2263,25 @@ let SCMViewPane = class SCMViewPane extends ViewPane {
2234
2263
  super.dispose();
2235
2264
  }
2236
2265
  };
2237
- SCMViewPane = ( (__decorate([
2238
- ( (__param(1, ICommandService))),
2239
- ( (__param(2, IEditorService))),
2240
- ( (__param(3, IMenuService))),
2241
- ( (__param(4, ISCMService))),
2242
- ( (__param(5, ISCMViewService))),
2243
- ( (__param(6, IStorageService))),
2244
- ( (__param(7, IUriIdentityService))),
2245
- ( (__param(8, IKeybindingService))),
2246
- ( (__param(9, IThemeService))),
2247
- ( (__param(10, IContextMenuService))),
2248
- ( (__param(11, IInstantiationService))),
2249
- ( (__param(12, IViewDescriptorService))),
2250
- ( (__param(13, IConfigurationService))),
2251
- ( (__param(14, IContextKeyService))),
2252
- ( (__param(15, IOpenerService))),
2253
- ( (__param(16, ITelemetryService))),
2254
- ( (__param(17, IHoverService)))
2255
- ], SCMViewPane)));
2266
+ SCMViewPane = ( __decorate([
2267
+ ( __param(1, ICommandService)),
2268
+ ( __param(2, IEditorService)),
2269
+ ( __param(3, IMenuService)),
2270
+ ( __param(4, ISCMService)),
2271
+ ( __param(5, ISCMViewService)),
2272
+ ( __param(6, IStorageService)),
2273
+ ( __param(7, IUriIdentityService)),
2274
+ ( __param(8, IKeybindingService)),
2275
+ ( __param(9, IThemeService)),
2276
+ ( __param(10, IContextMenuService)),
2277
+ ( __param(11, IInstantiationService)),
2278
+ ( __param(12, IViewDescriptorService)),
2279
+ ( __param(13, IConfigurationService)),
2280
+ ( __param(14, IContextKeyService)),
2281
+ ( __param(15, IOpenerService)),
2282
+ ( __param(16, ITelemetryService)),
2283
+ ( __param(17, IHoverService))
2284
+ ], SCMViewPane));
2256
2285
  let SCMTreeDataSource = class SCMTreeDataSource extends Disposable {
2257
2286
  constructor(viewMode, configurationService, scmViewService) {
2258
2287
  super();
@@ -2282,17 +2311,17 @@ let SCMTreeDataSource = class SCMTreeDataSource extends Disposable {
2282
2311
  button: actionButton
2283
2312
  });
2284
2313
  }
2285
- const hasSomeChanges = ( (resourceGroups.some(group => group.resources.length > 0)));
2314
+ const hasSomeChanges = ( resourceGroups.some(group => group.resources.length > 0));
2286
2315
  if (hasSomeChanges || (repositoryCount === 1 && (!showActionButton || !actionButton))) {
2287
2316
  children.push(...resourceGroups);
2288
2317
  }
2289
2318
  return children;
2290
2319
  }
2291
2320
  else if (isSCMResourceGroup(inputOrElement)) {
2292
- if (this.viewMode() === "list" ) {
2321
+ if (this.viewMode() === ViewMode.List) {
2293
2322
  return inputOrElement.resources;
2294
2323
  }
2295
- else if (this.viewMode() === "tree" ) {
2324
+ else if (this.viewMode() === ViewMode.Tree) {
2296
2325
  const children = [];
2297
2326
  for (const node of inputOrElement.resourceTree.root.children) {
2298
2327
  children.push(node.element && node.childrenCount === 0 ? node.element : node);
@@ -2318,17 +2347,17 @@ let SCMTreeDataSource = class SCMTreeDataSource extends Disposable {
2318
2347
  return element.parent;
2319
2348
  }
2320
2349
  else {
2321
- throw ( (new Error('Invalid element passed to getParent')));
2350
+ throw ( new Error('Invalid element passed to getParent'));
2322
2351
  }
2323
2352
  }
2324
2353
  else if (isSCMResource(element)) {
2325
- if (this.viewMode() === "list" ) {
2354
+ if (this.viewMode() === ViewMode.List) {
2326
2355
  return element.resourceGroup;
2327
2356
  }
2328
2357
  const node = element.resourceGroup.resourceTree.getNode(element.sourceUri);
2329
2358
  const result = node?.parent;
2330
2359
  if (!result) {
2331
- throw ( (new Error('Invalid element passed to getParent')));
2360
+ throw ( new Error('Invalid element passed to getParent'));
2332
2361
  }
2333
2362
  if (result === element.resourceGroup.resourceTree.root) {
2334
2363
  return element.resourceGroup;
@@ -2341,12 +2370,12 @@ let SCMTreeDataSource = class SCMTreeDataSource extends Disposable {
2341
2370
  else if (isSCMResourceGroup(element)) {
2342
2371
  const repository = this.scmViewService.visibleRepositories.find(r => r.provider === element.provider);
2343
2372
  if (!repository) {
2344
- throw ( (new Error('Invalid element passed to getParent')));
2373
+ throw ( new Error('Invalid element passed to getParent'));
2345
2374
  }
2346
2375
  return repository;
2347
2376
  }
2348
2377
  else {
2349
- throw ( (new Error('Unexpected call to getParent')));
2378
+ throw ( new Error('Unexpected call to getParent'));
2350
2379
  }
2351
2380
  }
2352
2381
  hasChildren(inputOrElement) {
@@ -2372,21 +2401,21 @@ let SCMTreeDataSource = class SCMTreeDataSource extends Disposable {
2372
2401
  return inputOrElement.childrenCount > 0;
2373
2402
  }
2374
2403
  else {
2375
- throw ( (new Error('hasChildren not implemented.')));
2404
+ throw ( new Error('hasChildren not implemented.'));
2376
2405
  }
2377
2406
  }
2378
2407
  };
2379
- SCMTreeDataSource = ( (__decorate([
2380
- ( (__param(1, IConfigurationService))),
2381
- ( (__param(2, ISCMViewService)))
2382
- ], SCMTreeDataSource)));
2408
+ SCMTreeDataSource = ( __decorate([
2409
+ ( __param(1, IConfigurationService)),
2410
+ ( __param(2, ISCMViewService))
2411
+ ], SCMTreeDataSource));
2383
2412
  class SCMActionButton {
2384
2413
  constructor(container, contextMenuService, commandService, notificationService) {
2385
2414
  this.container = container;
2386
2415
  this.contextMenuService = contextMenuService;
2387
2416
  this.commandService = commandService;
2388
2417
  this.notificationService = notificationService;
2389
- this.disposables = ( (new MutableDisposable()));
2418
+ this.disposables = ( new MutableDisposable());
2390
2419
  }
2391
2420
  dispose() {
2392
2421
  this.disposables?.dispose();
@@ -2401,33 +2430,33 @@ class SCMActionButton {
2401
2430
  for (let index = 0; index < button.secondaryCommands.length; index++) {
2402
2431
  const commands = button.secondaryCommands[index];
2403
2432
  for (const command of commands) {
2404
- actions.push(( (new Action(
2433
+ actions.push(( new Action(
2405
2434
  command.id,
2406
2435
  command.title,
2407
2436
  undefined,
2408
2437
  true,
2409
2438
  async () => await this.executeCommand(command.id, ...(command.arguments || []))
2410
- ))));
2439
+ )));
2411
2440
  }
2412
2441
  if (commands.length) {
2413
- actions.push(( (new Separator())));
2442
+ actions.push(( new Separator()));
2414
2443
  }
2415
2444
  }
2416
2445
  actions.pop();
2417
- this.button = ( (new ButtonWithDropdown(this.container, {
2446
+ this.button = ( new ButtonWithDropdown(this.container, {
2418
2447
  actions: actions,
2419
2448
  addPrimaryActionToDropdown: false,
2420
2449
  contextMenuProvider: this.contextMenuService,
2421
2450
  title: button.command.tooltip,
2422
2451
  supportIcons: true,
2423
2452
  ...defaultButtonStyles
2424
- })));
2453
+ }));
2425
2454
  }
2426
2455
  else {
2427
- this.button = ( (new Button(
2456
+ this.button = ( new Button(
2428
2457
  this.container,
2429
2458
  { supportIcons: true, supportShortLabel: !!button.command.shortTitle, title: button.command.tooltip, ...defaultButtonStyles }
2430
- )));
2459
+ ));
2431
2460
  }
2432
2461
  this.button.enabled = button.enabled;
2433
2462
  this.button.label = button.command.title;
@@ -2441,7 +2470,7 @@ class SCMActionButton {
2441
2470
  this.button?.focus();
2442
2471
  }
2443
2472
  clear() {
2444
- this.disposables.value = ( (new DisposableStore()));
2473
+ this.disposables.value = ( new DisposableStore());
2445
2474
  this.button = undefined;
2446
2475
  clearNode(this.container);
2447
2476
  }