@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 { language } from 'vscode/vscode/vs/base/common/platform';
4
5
  import { $, reset, append, h } from 'vscode/vscode/vs/base/browser/dom';
5
6
  import { IconLabel } from 'vscode/vscode/vs/base/browser/ui/iconLabel/iconLabel';
6
- import { fromNow } from 'vscode/vscode/vs/base/common/date';
7
+ import { safeIntl, fromNow } from 'vscode/vscode/vs/base/common/date';
7
8
  import { createMatches } from 'vscode/vscode/vs/base/common/filters';
8
9
  import { MarkdownString } from 'vscode/vscode/vs/base/common/htmlContent';
9
10
  import { DisposableStore, Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
10
11
  import { observableValue } from 'vscode/vscode/vs/base/common/observableInternal/base';
11
- import { tail, delta, groupBy as groupBy$1 } from 'vscode/vscode/vs/base/common/arrays';
12
+ import { delta, groupBy as groupBy$1 } from 'vscode/vscode/vs/base/common/arrays';
12
13
  import { Event } from 'vscode/vscode/vs/base/common/event';
13
14
  import { autorun, autorunWithStore } from 'vscode/vscode/vs/base/common/observableInternal/autorun';
14
15
  import { derived } from 'vscode/vscode/vs/base/common/observableInternal/derived';
@@ -39,19 +40,23 @@ import 'vscode/vscode/vs/platform/theme/common/colors/miscColors';
39
40
  import 'vscode/vscode/vs/platform/theme/common/colors/quickpickColors';
40
41
  import 'vscode/vscode/vs/platform/theme/common/colors/searchColors';
41
42
  import { IThemeService } from 'vscode/vscode/vs/platform/theme/common/themeService.service';
42
- import { ViewAction, ViewPane, ViewPaneShowActions } from 'vscode/vscode/vs/workbench/browser/parts/views/viewPane';
43
+ import { ViewAction, ViewPane, ViewPaneShowActions } from '@codingame/monaco-vscode-65619f8f-0eab-5d8b-855a-43b6353fe527-common/vscode/vs/workbench/browser/parts/views/viewPane';
44
+ import { ViewContainerLocation } from 'vscode/vscode/vs/workbench/common/views';
43
45
  import { IViewDescriptorService } from 'vscode/vscode/vs/workbench/common/views.service';
44
- import { renderSCMHistoryItemGraph, historyItemHoverLabelForeground, historyItemHoverDefaultLabelBackground, historyItemHoverAdditionsForeground, historyItemHoverDeletionsForeground, historyItemHoverDefaultLabelForeground, SWIMLANE_WIDTH, renderSCMHistoryGraphPlaceholder, toISCMHistoryItemViewModelArray } from 'vscode/vscode/vs/workbench/contrib/scm/browser/scmHistory';
45
- import { getHistoryItemEditorTitle, isSCMHistoryItemViewModelTreeElement, isSCMHistoryItemLoadMoreTreeElement, isSCMRepository, getProviderKey } from 'vscode/vscode/vs/workbench/contrib/scm/browser/util';
46
- import { HISTORY_VIEW_PANE_ID } from 'vscode/vscode/vs/workbench/contrib/scm/common/scm';
46
+ import { renderSCMHistoryItemGraph, historyItemHoverLabelForeground, historyItemHoverDefaultLabelBackground, historyItemHoverAdditionsForeground, historyItemHoverDeletionsForeground, historyItemHoverDefaultLabelForeground, SWIMLANE_WIDTH, renderSCMHistoryGraphPlaceholder, toISCMHistoryItemViewModelArray } from '@codingame/monaco-vscode-be8ddbb5-094a-5657-b1cc-fe106c94c632-common/vscode/vs/workbench/contrib/scm/browser/scmHistory';
47
+ import { getHistoryItemEditorTitle, isSCMHistoryItemViewModelTreeElement, isSCMHistoryItemLoadMoreTreeElement, isSCMRepository, getProviderKey } from '@codingame/monaco-vscode-be8ddbb5-094a-5657-b1cc-fe106c94c632-common/vscode/vs/workbench/contrib/scm/browser/util';
48
+ import { HISTORY_VIEW_PANE_ID } from '@codingame/monaco-vscode-ff9fa663-eae3-5274-8573-c2b918871e4b-common/vscode/vs/workbench/contrib/scm/common/scm';
47
49
  import { ISCMService, ISCMViewService } from 'vscode/vscode/vs/workbench/contrib/scm/common/scm.service';
48
50
  import { stripIcons } from 'vscode/vscode/vs/base/common/iconLabels';
51
+ import { Position } from '@codingame/monaco-vscode-e571cbbb-526b-5d8b-92c5-a0437d2dabb3-common/vscode/vs/workbench/services/layout/browser/layoutService';
49
52
  import { IWorkbenchLayoutService } from 'vscode/vscode/vs/workbench/services/layout/browser/layoutService.service';
50
- import { registerAction2, MenuId, Action2 } from 'vscode/vscode/vs/platform/actions/common/actions';
53
+ import { HoverPosition } from 'vscode/vscode/vs/base/browser/ui/hover/hoverWidget';
54
+ import { registerAction2, MenuId, Action2, MenuItemAction } from 'vscode/vscode/vs/platform/actions/common/actions';
55
+ import { IMenuService } from 'vscode/vscode/vs/platform/actions/common/actions.service';
51
56
  import { Sequencer, Throttler } from 'vscode/vscode/vs/base/common/async';
52
57
  import { URI } from 'vscode/vscode/vs/base/common/uri';
53
58
  import { ICommandService } from 'vscode/vscode/vs/platform/commands/common/commands.service';
54
- import { ActionRunner } from 'vscode/vscode/vs/base/common/actions';
59
+ import { ActionRunner, Separator, SubmenuAction } from 'vscode/vscode/vs/base/common/actions';
55
60
  import { Codicon } from 'vscode/vscode/vs/base/common/codicons';
56
61
  import { IProgressService } from 'vscode/vscode/vs/platform/progress/common/progress.service';
57
62
  import { ContextKeys } from './scmViewPane.js';
@@ -63,10 +68,11 @@ import { observableConfigValue } from 'vscode/vscode/vs/platform/observable/comm
63
68
  import { compare } from 'vscode/vscode/vs/base/common/strings';
64
69
  import { IClipboardService } from 'vscode/vscode/vs/platform/clipboard/common/clipboardService.service';
65
70
  import { getDefaultHoverDelegate } from 'vscode/vscode/vs/base/browser/ui/hover/hoverDelegateFactory';
71
+ import { StorageScope, StorageTarget } from 'vscode/vscode/vs/platform/storage/common/storage';
66
72
  import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
67
- import { INotificationService } from 'vscode/vscode/vs/platform/notification/common/notification.service';
68
73
  import { IExtensionService } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions.service';
69
74
  import { groupBy } from 'vscode/vscode/vs/base/common/collections';
75
+ import { getFlatContextMenuActions } from 'vscode/vscode/vs/platform/actions/browser/menuEntryActionViewItem';
70
76
 
71
77
  var HistoryItemRenderer_1, HistoryItemLoadMoreRenderer_1;
72
78
  const PICK_REPOSITORY_ACTION_ID = 'workbench.scm.action.graph.pickRepository';
@@ -103,23 +109,23 @@ class SCMHistoryItemRefsActionViewItem extends ActionViewItem {
103
109
  icon.classList.add(...ThemeIcon.asClassNameArray(Codicon.gitBranch));
104
110
  const name = $('.name');
105
111
  if (this._historyItemsFilter === 'all') {
106
- name.textContent = ( localize(6608, "All"));
112
+ name.textContent = ( localize(8522, "All"));
107
113
  }
108
114
  else if (this._historyItemsFilter === 'auto') {
109
- name.textContent = ( localize(6609, "Auto"));
115
+ name.textContent = ( localize(8523, "Auto"));
110
116
  }
111
117
  else if (this._historyItemsFilter.length === 1) {
112
118
  name.textContent = this._historyItemsFilter[0].name;
113
119
  }
114
120
  else {
115
- name.textContent = ( localize(6610, "{0} Items", this._historyItemsFilter.length));
121
+ name.textContent = ( localize(8524, "{0} Items", this._historyItemsFilter.length));
116
122
  }
117
123
  reset(this.label, icon, name);
118
124
  }
119
125
  }
120
126
  getTooltip() {
121
127
  if (this._historyItemsFilter === 'all') {
122
- return ( localize(6611, "All history item references"));
128
+ return localize(8525, "All history item references");
123
129
  }
124
130
  else if (this._historyItemsFilter === 'auto') {
125
131
  const historyProvider = this._repository.provider.historyProvider.get();
@@ -133,7 +139,7 @@ class SCMHistoryItemRefsActionViewItem extends ActionViewItem {
133
139
  return this._historyItemsFilter[0].name;
134
140
  }
135
141
  else {
136
- return ( (this._historyItemsFilter.map(ref => ref.name))).join(', ');
142
+ return ( this._historyItemsFilter.map(ref => ref.name)).join(', ');
137
143
  }
138
144
  }
139
145
  }
@@ -141,15 +147,12 @@ registerAction2(class extends ViewAction {
141
147
  constructor() {
142
148
  super({
143
149
  id: PICK_REPOSITORY_ACTION_ID,
144
- title: ( localize(6612, "Repository Picker")),
150
+ title: ( localize(8526, "Repository Picker")),
145
151
  viewId: HISTORY_VIEW_PANE_ID,
146
152
  f1: false,
147
153
  menu: {
148
154
  id: MenuId.SCMHistoryTitle,
149
- when: ( (ContextKeyExpr.and(
150
- (ContextKeyExpr.has('scm.providerCount')),
151
- ContextKeyExpr.greater('scm.providerCount', 1)
152
- ))),
155
+ when: ( ContextKeyExpr.and(( ContextKeyExpr.has('scm.providerCount')), ContextKeyExpr.greater('scm.providerCount', 1))),
153
156
  group: 'navigation',
154
157
  order: 0
155
158
  }
@@ -163,10 +166,10 @@ registerAction2(class extends ViewAction {
163
166
  constructor() {
164
167
  super({
165
168
  id: PICK_HISTORY_ITEM_REFS_ACTION_ID,
166
- title: ( localize(6613, "History Item Reference Picker")),
169
+ title: ( localize(8527, "History Item Reference Picker")),
167
170
  icon: Codicon.gitBranch,
168
171
  viewId: HISTORY_VIEW_PANE_ID,
169
- precondition: ( (ContextKeys.SCMHistoryItemCount.notEqualsTo(0))),
172
+ precondition: ( ContextKeys.SCMHistoryItemCount.notEqualsTo(0)),
170
173
  f1: false,
171
174
  menu: {
172
175
  id: MenuId.SCMHistoryTitle,
@@ -183,10 +186,10 @@ registerAction2(class extends ViewAction {
183
186
  constructor() {
184
187
  super({
185
188
  id: 'workbench.scm.action.graph.revealCurrentHistoryItem',
186
- title: ( localize(6614, "Go to Current History Item")),
189
+ title: ( localize(8528, "Go to Current History Item")),
187
190
  icon: Codicon.target,
188
191
  viewId: HISTORY_VIEW_PANE_ID,
189
- precondition: ( (ContextKeys.SCMHistoryItemCount.notEqualsTo(0))),
192
+ precondition: ( ContextKeyExpr.and(( ContextKeys.SCMHistoryItemCount.notEqualsTo(0)), ( ContextKeys.SCMCurrentHistoryItemRefInFilter.isEqualTo(true)))),
190
193
  f1: false,
191
194
  menu: {
192
195
  id: MenuId.SCMHistoryTitle,
@@ -203,7 +206,7 @@ registerAction2(class extends ViewAction {
203
206
  constructor() {
204
207
  super({
205
208
  id: 'workbench.scm.action.graph.refresh',
206
- title: ( localize(6615, "Refresh")),
209
+ title: ( localize(8529, "Refresh")),
207
210
  viewId: HISTORY_VIEW_PANE_ID,
208
211
  f1: false,
209
212
  icon: Codicon.refresh,
@@ -222,13 +225,13 @@ registerAction2(class extends Action2 {
222
225
  constructor() {
223
226
  super({
224
227
  id: 'workbench.scm.action.graph.viewChanges',
225
- title: ( localize(6616, "View Changes")),
228
+ title: ( localize(8530, "View Changes")),
226
229
  f1: false,
227
230
  menu: [
228
231
  {
229
232
  id: MenuId.SCMChangesContext,
230
233
  group: '0_view',
231
- when: ( (ContextKeyExpr.equals('config.multiDiffEditor.experimental.enabled', true)))
234
+ when: ( ContextKeyExpr.equals('config.multiDiffEditor.experimental.enabled', true))
232
235
  }
233
236
  ]
234
237
  });
@@ -255,17 +258,17 @@ registerAction2(class extends Action2 {
255
258
  const title = historyItems.length === 1 ?
256
259
  getHistoryItemEditorTitle(historyItem) :
257
260
  ( localize(
258
- 6617,
259
- "All Changes ({0} ↔ {1})",
260
- historyItemLast.displayId ?? historyItemLast.id,
261
- historyItem.displayId ?? historyItem.id
262
- ));
261
+ 8531,
262
+ "All Changes ({0} ↔ {1})",
263
+ historyItemLast.displayId ?? historyItemLast.id,
264
+ historyItem.displayId ?? historyItem.id
265
+ ));
263
266
  const rootUri = provider.rootUri;
264
267
  const path = rootUri ? rootUri.path : provider.label;
265
- const multiDiffSourceUri = ( (URI.from(
268
+ const multiDiffSourceUri = ( URI.from(
266
269
  { scheme: 'scm-history-item', path: `${path}/${historyItemParentId}..${historyItem.id}` },
267
270
  true
268
- )));
271
+ ));
269
272
  commandService.executeCommand('_workbench.openMultiDiffEditor', { title, multiDiffSourceUri, resources: historyItemChanges });
270
273
  }
271
274
  });
@@ -281,7 +284,7 @@ class ListDelegate {
281
284
  return HistoryItemLoadMoreRenderer.TEMPLATE_ID;
282
285
  }
283
286
  else {
284
- throw ( (new Error('Unknown element')));
287
+ throw ( new Error('Unknown element'));
285
288
  }
286
289
  }
287
290
  }
@@ -301,13 +304,13 @@ let HistoryItemRenderer = class HistoryItemRenderer {
301
304
  container.parentElement.parentElement.querySelector('.monaco-tl-twistie').classList.add('force-no-twistie');
302
305
  const element = append(container, $('.history-item'));
303
306
  const graphContainer = append(element, $('.graph-container'));
304
- const iconLabel = ( (new IconLabel(
307
+ const iconLabel = ( new IconLabel(
305
308
  element,
306
309
  { supportIcons: true, supportHighlights: true, supportDescriptionHighlights: true }
307
- )));
310
+ ));
308
311
  const labelContainer = append(element, $('.label-container'));
309
312
  element.appendChild(labelContainer);
310
- return { element, graphContainer, label: iconLabel, labelContainer, elementDisposables: ( (new DisposableStore())), disposables: ( (new DisposableStore())) };
313
+ return { element, graphContainer, label: iconLabel, labelContainer, elementDisposables: ( new DisposableStore()), disposables: ( new DisposableStore()) };
311
314
  }
312
315
  renderElement(node, index, templateData, height) {
313
316
  const historyItemViewModel = node.element.historyItemViewModel;
@@ -373,7 +376,7 @@ let HistoryItemRenderer = class HistoryItemRenderer {
373
376
  }
374
377
  })
375
378
  ]);
376
- elements.count.textContent = historyItemRefs.length > 1 ? ( (historyItemRefs.length.toString())) : '';
379
+ elements.count.textContent = historyItemRefs.length > 1 ? ( historyItemRefs.length.toString()) : '';
377
380
  elements.icon.classList.add(...ThemeIcon.asClassNameArray(historyItemRefs[0].icon));
378
381
  elements.description.textContent = showDescription ? historyItemRefs[0].name : '';
379
382
  append(templateData.labelContainer, elements.root);
@@ -389,7 +392,7 @@ let HistoryItemRenderer = class HistoryItemRenderer {
389
392
  {
390
393
  commandId: 'workbench.scm.action.graph.copyHistoryItemMessage',
391
394
  iconClass: 'codicon.codicon-copy',
392
- label: ( localize(6618, "Message")),
395
+ label: ( localize(8532, "Message")),
393
396
  run: () => this._clipboardService.writeText(historyItem.message)
394
397
  }
395
398
  ];
@@ -397,11 +400,11 @@ let HistoryItemRenderer = class HistoryItemRenderer {
397
400
  _getHoverContent(element) {
398
401
  const colorTheme = this._themeService.getColorTheme();
399
402
  const historyItem = element.historyItemViewModel.historyItem;
400
- const markdown = ( (new MarkdownString('', { isTrusted: true, supportThemeIcons: true })));
403
+ const markdown = ( new MarkdownString('', { isTrusted: true, supportThemeIcons: true }));
401
404
  if (historyItem.author) {
402
405
  markdown.appendMarkdown(`$(account) **${historyItem.author}**`);
403
406
  if (historyItem.timestamp) {
404
- const dateFormatter = new Intl.DateTimeFormat(language, { year: 'numeric', month: 'long', day: 'numeric', hour: 'numeric', minute: 'numeric' });
407
+ const dateFormatter = safeIntl.DateTimeFormat(language, { year: 'numeric', month: 'long', day: 'numeric', hour: 'numeric', minute: 'numeric' });
405
408
  markdown.appendMarkdown(`, $(history) ${fromNow(historyItem.timestamp, true, true)} (${dateFormatter.format(historyItem.timestamp)})`);
406
409
  }
407
410
  markdown.appendMarkdown('\n\n');
@@ -410,29 +413,29 @@ let HistoryItemRenderer = class HistoryItemRenderer {
410
413
  if (historyItem.statistics) {
411
414
  markdown.appendMarkdown(`---\n\n`);
412
415
  markdown.appendMarkdown(`<span>${historyItem.statistics.files === 1 ?
413
- ( localize(6619, "{0} file changed", historyItem.statistics.files)) :
414
- ( localize(6620, "{0} files changed", historyItem.statistics.files))}</span>`);
416
+ ( localize(8533, "{0} file changed", historyItem.statistics.files)) :
417
+ ( localize(8534, "{0} files changed", historyItem.statistics.files))}</span>`);
415
418
  if (historyItem.statistics.insertions) {
416
419
  const additionsForegroundColor = colorTheme.getColor(historyItemHoverAdditionsForeground);
417
420
  markdown.appendMarkdown(`,&nbsp;<span style="color:${additionsForegroundColor};">${historyItem.statistics.insertions === 1 ?
418
- ( localize(6621, "{0} insertion{1}", historyItem.statistics.insertions, '(+)')) :
419
- ( localize(6622, "{0} insertions{1}", historyItem.statistics.insertions, '(+)'))}</span>`);
421
+ ( localize(8535, "{0} insertion{1}", historyItem.statistics.insertions, '(+)')) :
422
+ ( localize(8536, "{0} insertions{1}", historyItem.statistics.insertions, '(+)'))}</span>`);
420
423
  }
421
424
  if (historyItem.statistics.deletions) {
422
425
  const deletionsForegroundColor = colorTheme.getColor(historyItemHoverDeletionsForeground);
423
426
  markdown.appendMarkdown(`,&nbsp;<span style="color:${deletionsForegroundColor};">${historyItem.statistics.deletions === 1 ?
424
- ( localize(6623, "{0} deletion{1}", historyItem.statistics.deletions, '(-)')) :
425
- ( localize(6624, "{0} deletions{1}", historyItem.statistics.deletions, '(-)'))}</span>`);
427
+ ( localize(8537, "{0} deletion{1}", historyItem.statistics.deletions, '(-)')) :
428
+ ( localize(8538, "{0} deletions{1}", historyItem.statistics.deletions, '(-)'))}</span>`);
426
429
  }
427
430
  }
428
431
  if ((historyItem.references ?? []).length > 0) {
429
432
  markdown.appendMarkdown(`\n\n---\n\n`);
430
- markdown.appendMarkdown(( ((historyItem.references ?? []).map(ref => {
433
+ markdown.appendMarkdown(( (historyItem.references ?? []).map(ref => {
431
434
  const labelIconId = ThemeIcon.isThemeIcon(ref.icon) ? ref.icon.id : '';
432
435
  const labelBackgroundColor = ref.color ? asCssVariable(ref.color) : asCssVariable(historyItemHoverDefaultLabelBackground);
433
436
  const labelForegroundColor = ref.color ? asCssVariable(historyItemHoverLabelForeground) : asCssVariable(historyItemHoverDefaultLabelForeground);
434
437
  return `<span style="color:${labelForegroundColor};background-color:${labelBackgroundColor};border-radius:10px;">&nbsp;$(${labelIconId})&nbsp;${ref.name}&nbsp;&nbsp;</span>`;
435
- }))).join('&nbsp;&nbsp;'));
438
+ })).join('&nbsp;&nbsp;'));
436
439
  }
437
440
  return { markdown, markdownNotSupportedFallback: historyItem.message };
438
441
  }
@@ -452,12 +455,12 @@ let HistoryItemRenderer = class HistoryItemRenderer {
452
455
  templateData.disposables.dispose();
453
456
  }
454
457
  };
455
- HistoryItemRenderer = HistoryItemRenderer_1 = ( (__decorate([
456
- ( (__param(1, IClipboardService))),
457
- ( (__param(2, IConfigurationService))),
458
- ( (__param(3, IHoverService))),
459
- ( (__param(4, IThemeService)))
460
- ], HistoryItemRenderer)));
458
+ HistoryItemRenderer = HistoryItemRenderer_1 = ( __decorate([
459
+ ( __param(1, IClipboardService)),
460
+ ( __param(2, IConfigurationService)),
461
+ ( __param(3, IHoverService)),
462
+ ( __param(4, IThemeService))
463
+ ], HistoryItemRenderer));
461
464
  let HistoryItemLoadMoreRenderer = class HistoryItemLoadMoreRenderer {
462
465
  static { HistoryItemLoadMoreRenderer_1 = this; }
463
466
  static { this.TEMPLATE_ID = 'historyItemLoadMore'; }
@@ -472,8 +475,8 @@ let HistoryItemLoadMoreRenderer = class HistoryItemLoadMoreRenderer {
472
475
  const element = append(container, $('.history-item-load-more'));
473
476
  const graphPlaceholder = append(element, $('.graph-placeholder'));
474
477
  const historyItemPlaceholderContainer = append(element, $('.history-item-placeholder'));
475
- const historyItemPlaceholderLabel = ( (new IconLabel(historyItemPlaceholderContainer, { supportIcons: true })));
476
- return { element, graphPlaceholder, historyItemPlaceholderContainer, historyItemPlaceholderLabel, elementDisposables: ( (new DisposableStore())), disposables: ( (new DisposableStore())) };
478
+ const historyItemPlaceholderLabel = ( new IconLabel(historyItemPlaceholderContainer, { supportIcons: true }));
479
+ return { element, graphPlaceholder, historyItemPlaceholderContainer, historyItemPlaceholderLabel, elementDisposables: ( new DisposableStore()), disposables: ( new DisposableStore()) };
477
480
  }
478
481
  renderElement(element, index, templateData, height) {
479
482
  templateData.graphPlaceholder.textContent = '';
@@ -489,7 +492,7 @@ let HistoryItemLoadMoreRenderer = class HistoryItemLoadMoreRenderer {
489
492
  templateData.elementDisposables.add(autorun(reader => {
490
493
  const isLoadingMore = this._isLoadingMore.read(reader);
491
494
  const icon = `$(${isLoadingMore ? 'loading~spin' : 'fold-down'})`;
492
- templateData.historyItemPlaceholderLabel.setLabel(( localize(6625, "{0} Load More...", icon)));
495
+ templateData.historyItemPlaceholderLabel.setLabel(( localize(8539, "{0} Load More...", icon)));
493
496
  }));
494
497
  }
495
498
  }
@@ -500,9 +503,9 @@ let HistoryItemLoadMoreRenderer = class HistoryItemLoadMoreRenderer {
500
503
  templateData.disposables.dispose();
501
504
  }
502
505
  };
503
- HistoryItemLoadMoreRenderer = HistoryItemLoadMoreRenderer_1 = ( (__decorate([
504
- ( (__param(2, IConfigurationService)))
505
- ], HistoryItemLoadMoreRenderer)));
506
+ HistoryItemLoadMoreRenderer = HistoryItemLoadMoreRenderer_1 = ( __decorate([
507
+ ( __param(2, IConfigurationService))
508
+ ], HistoryItemLoadMoreRenderer));
506
509
  let HistoryItemHoverDelegate = class HistoryItemHoverDelegate extends WorkbenchHoverDelegate {
507
510
  constructor(_viewContainerLocation, layoutService, configurationService, hoverService) {
508
511
  super('element', true, () => this.getHoverOptions(), configurationService, hoverService);
@@ -512,23 +515,23 @@ let HistoryItemHoverDelegate = class HistoryItemHoverDelegate extends WorkbenchH
512
515
  getHoverOptions() {
513
516
  const sideBarPosition = this.layoutService.getSideBarPosition();
514
517
  let hoverPosition;
515
- if (this._viewContainerLocation === 0 ) {
516
- hoverPosition = sideBarPosition === 0 ? 1 : 0 ;
518
+ if (this._viewContainerLocation === ViewContainerLocation.Sidebar) {
519
+ hoverPosition = sideBarPosition === Position.LEFT ? HoverPosition.RIGHT : HoverPosition.LEFT;
517
520
  }
518
- else if (this._viewContainerLocation === 2 ) {
519
- hoverPosition = sideBarPosition === 0 ? 0 : 1 ;
521
+ else if (this._viewContainerLocation === ViewContainerLocation.AuxiliaryBar) {
522
+ hoverPosition = sideBarPosition === Position.LEFT ? HoverPosition.LEFT : HoverPosition.RIGHT;
520
523
  }
521
524
  else {
522
- hoverPosition = 1 ;
525
+ hoverPosition = HoverPosition.RIGHT;
523
526
  }
524
527
  return { additionalClasses: ['history-item-hover'], position: { hoverPosition, forcePosition: true } };
525
528
  }
526
529
  };
527
- HistoryItemHoverDelegate = ( (__decorate([
528
- ( (__param(1, IWorkbenchLayoutService))),
529
- ( (__param(2, IConfigurationService))),
530
- ( (__param(3, IHoverService)))
531
- ], HistoryItemHoverDelegate)));
530
+ HistoryItemHoverDelegate = ( __decorate([
531
+ ( __param(1, IWorkbenchLayoutService)),
532
+ ( __param(2, IConfigurationService)),
533
+ ( __param(3, IHoverService))
534
+ ], HistoryItemHoverDelegate));
532
535
  let SCMHistoryViewPaneActionRunner = class SCMHistoryViewPaneActionRunner extends ActionRunner {
533
536
  constructor(_progressService) {
534
537
  super();
@@ -538,12 +541,12 @@ let SCMHistoryViewPaneActionRunner = class SCMHistoryViewPaneActionRunner extend
538
541
  return this._progressService.withProgress({ location: HISTORY_VIEW_PANE_ID }, async () => await super.runAction(action, context));
539
542
  }
540
543
  };
541
- SCMHistoryViewPaneActionRunner = ( (__decorate([
542
- ( (__param(0, IProgressService)))
543
- ], SCMHistoryViewPaneActionRunner)));
544
+ SCMHistoryViewPaneActionRunner = ( __decorate([
545
+ ( __param(0, IProgressService))
546
+ ], SCMHistoryViewPaneActionRunner));
544
547
  class SCMHistoryTreeAccessibilityProvider {
545
548
  getWidgetAriaLabel() {
546
- return ( localize(6626, "Source Control History"));
549
+ return localize(8540, "Source Control History");
547
550
  }
548
551
  getAriaLabel(element) {
549
552
  if (isSCMRepository(element)) {
@@ -574,7 +577,7 @@ class SCMHistoryTreeIdentityProvider {
574
577
  return `historyItemLoadMore:${provider.id}}`;
575
578
  }
576
579
  else {
577
- throw ( (new Error('Invalid tree element')));
580
+ throw ( new Error('Invalid tree element'));
578
581
  }
579
582
  }
580
583
  }
@@ -590,7 +593,7 @@ class SCMHistoryTreeKeyboardNavigationLabelProvider {
590
593
  return '';
591
594
  }
592
595
  else {
593
- throw ( (new Error('Invalid tree element')));
596
+ throw ( new Error('Invalid tree element'));
594
597
  }
595
598
  }
596
599
  }
@@ -603,7 +606,7 @@ class SCMHistoryTreeDataSource extends Disposable {
603
606
  const historyItems = await inputOrElement.getHistoryItems();
604
607
  children.push(...historyItems);
605
608
  const repository = inputOrElement.repository.get();
606
- const lastHistoryItem = tail(historyItems);
609
+ const lastHistoryItem = historyItems.at(-1);
607
610
  if (repository && lastHistoryItem && lastHistoryItem.historyItemViewModel.outputSwimlanes.length > 0) {
608
611
  children.push({
609
612
  repository,
@@ -641,8 +644,8 @@ let SCMHistoryViewModel = class SCMHistoryViewModel extends Disposable {
641
644
  this.repository = latestChangedValue(this, [this._firstRepository, this._graphRepository]);
642
645
  this.onDidChangeHistoryItemsFilter = observableSignal(this);
643
646
  this.isViewModelEmpty = observableValue(this, false);
644
- this._repositoryState = ( (new Map()));
645
- this._repositoryFilterState = ( (new Map()));
647
+ this._repositoryState = ( new Map());
648
+ this._repositoryFilterState = ( new Map());
646
649
  this._repositoryFilterState = this._loadHistoryItemsFilterState();
647
650
  this._extensionService.onWillStop(this._saveHistoryItemsFilterState, this, this._store);
648
651
  this._storageService.onWillSaveState(this._saveHistoryItemsFilterState, this, this._store);
@@ -717,19 +720,19 @@ let SCMHistoryViewModel = class SCMHistoryViewModel extends Disposable {
717
720
  const historyItemRefs = state?.historyItemsFilter ??
718
721
  (await this._resolveHistoryItemFilter(repository, historyProvider));
719
722
  const limit = clamp(this._configurationService.getValue('scm.graph.pageSize'), 1, 1000);
720
- const historyItemRefIds = ( (historyItemRefs.map(ref => ref.revision ?? ref.id)));
723
+ const historyItemRefIds = ( historyItemRefs.map(ref => ref.revision ?? ref.id));
721
724
  do {
722
725
  historyItems.push(...((await historyProvider.provideHistoryItems({
723
726
  historyItemRefs: historyItemRefIds, limit, skip: historyItems.length
724
727
  })) ?? []));
725
728
  } while (typeof state?.loadMore === 'string' && !historyItems.find(item => item.id === state?.loadMore));
726
729
  const colorMap = this._getGraphColorMap(historyItemRefs);
727
- const viewModels = ( (toISCMHistoryItemViewModelArray(historyItems, colorMap, historyProvider.historyItemRef.get())
730
+ const viewModels = ( toISCMHistoryItemViewModelArray(historyItems, colorMap, historyProvider.historyItemRef.get())
728
731
  .map(historyItemViewModel => ({
729
732
  repository,
730
733
  historyItemViewModel,
731
734
  type: 'historyItemViewModel'
732
- }))));
735
+ })));
733
736
  state = { historyItemsFilter: historyItemRefs, viewModels, loadMore: false };
734
737
  this._repositoryState.set(repository, state);
735
738
  this._scmHistoryItemCountCtx.set(viewModels.length);
@@ -760,7 +763,7 @@ let SCMHistoryViewModel = class SCMHistoryViewModel extends Disposable {
760
763
  const historyItemRef = historyProvider?.historyItemRef.get();
761
764
  const historyItemRemoteRef = historyProvider?.historyItemRemoteRef.get();
762
765
  const historyItemBaseRef = historyProvider?.historyItemBaseRef.get();
763
- const colorMap = ( (new Map()));
766
+ const colorMap = ( new Map());
764
767
  if (historyItemRef) {
765
768
  colorMap.set(historyItemRef.id, historyItemRef.color);
766
769
  if (historyItemRemoteRef) {
@@ -771,7 +774,7 @@ let SCMHistoryViewModel = class SCMHistoryViewModel extends Disposable {
771
774
  }
772
775
  }
773
776
  for (const ref of historyItemRefs) {
774
- if (!( (colorMap.has(ref.id)))) {
777
+ if (!( colorMap.has(ref.id))) {
775
778
  colorMap.set(ref.id, undefined);
776
779
  }
777
780
  }
@@ -793,7 +796,7 @@ let SCMHistoryViewModel = class SCMHistoryViewModel extends Disposable {
793
796
  break;
794
797
  default: {
795
798
  const refs = ((await historyProvider.provideHistoryItemRefs(historyItemsFilter)) ?? [])
796
- .filter(ref => ( (historyItemsFilter.some(filter => filter === ref.id))));
799
+ .filter(ref => ( historyItemsFilter.some(filter => filter === ref.id)));
797
800
  if (refs.length === 0) {
798
801
  historyItemRefs.push(...[
799
802
  historyProvider.historyItemRef.get(),
@@ -804,7 +807,7 @@ let SCMHistoryViewModel = class SCMHistoryViewModel extends Disposable {
804
807
  }
805
808
  else {
806
809
  historyItemRefs.push(...refs);
807
- this._repositoryFilterState.set(getProviderKey(repository.provider), ( (refs.map(ref => ref.id))));
810
+ this._repositoryFilterState.set(getProviderKey(repository.provider), ( refs.map(ref => ref.id)));
808
811
  }
809
812
  this._saveHistoryItemsFilterState();
810
813
  break;
@@ -814,43 +817,39 @@ let SCMHistoryViewModel = class SCMHistoryViewModel extends Disposable {
814
817
  }
815
818
  _loadHistoryItemsFilterState() {
816
819
  try {
817
- const filterData = this._storageService.get('scm.graphView.referencesFilter', 1 );
820
+ const filterData = this._storageService.get('scm.graphView.referencesFilter', StorageScope.WORKSPACE);
818
821
  if (filterData) {
819
- return (
820
- (new Map(JSON.parse(filterData)))
821
- );
822
+ return ( new Map(JSON.parse(filterData)));
822
823
  }
823
824
  }
824
825
  catch { }
825
- return (
826
- (new Map())
827
- );
826
+ return ( new Map());
828
827
  }
829
828
  _saveHistoryItemsFilterState() {
830
829
  const filter = Array.from(this._repositoryFilterState.entries());
831
- this._storageService.store('scm.graphView.referencesFilter', JSON.stringify(filter), 1 , 0 );
830
+ this._storageService.store('scm.graphView.referencesFilter', JSON.stringify(filter), StorageScope.WORKSPACE, StorageTarget.USER);
832
831
  }
833
832
  dispose() {
834
833
  this._repositoryState.clear();
835
834
  super.dispose();
836
835
  }
837
836
  };
838
- SCMHistoryViewModel = ( (__decorate([
839
- ( (__param(0, IConfigurationService))),
840
- ( (__param(1, IContextKeyService))),
841
- ( (__param(2, IExtensionService))),
842
- ( (__param(3, ISCMService))),
843
- ( (__param(4, ISCMViewService))),
844
- ( (__param(5, IStorageService)))
845
- ], SCMHistoryViewModel)));
837
+ SCMHistoryViewModel = ( __decorate([
838
+ ( __param(0, IConfigurationService)),
839
+ ( __param(1, IContextKeyService)),
840
+ ( __param(2, IExtensionService)),
841
+ ( __param(3, ISCMService)),
842
+ ( __param(4, ISCMViewService)),
843
+ ( __param(5, IStorageService))
844
+ ], SCMHistoryViewModel));
846
845
  let RepositoryPicker = class RepositoryPicker extends Disposable {
847
846
  constructor(_quickInputService, _scmViewService) {
848
847
  super();
849
848
  this._quickInputService = _quickInputService;
850
849
  this._scmViewService = _scmViewService;
851
850
  this._autoQuickPickItem = {
852
- label: ( localize(6609, "Auto")),
853
- description: ( localize(6627, "Show the source control graph for the active repository")),
851
+ label: ( localize(8523, "Auto")),
852
+ description: ( localize(8541, "Show the source control graph for the active repository")),
854
853
  repository: 'auto'
855
854
  };
856
855
  }
@@ -859,21 +858,21 @@ let RepositoryPicker = class RepositoryPicker extends Disposable {
859
858
  this._autoQuickPickItem,
860
859
  { type: 'separator' }
861
860
  ];
862
- picks.push(...( (this._scmViewService.repositories.map(r => ({
861
+ picks.push(...( this._scmViewService.repositories.map(r => ({
863
862
  label: r.provider.name,
864
863
  description: r.provider.rootUri?.fsPath,
865
864
  iconClass: ThemeIcon.asClassName(Codicon.repo),
866
865
  repository: r
867
- })))));
866
+ }))));
868
867
  return this._quickInputService.pick(picks, {
869
- placeHolder: ( localize(6628, "Select the repository to view, type to filter all repositories"))
868
+ placeHolder: ( localize(8542, "Select the repository to view, type to filter all repositories"))
870
869
  });
871
870
  }
872
871
  };
873
- RepositoryPicker = ( (__decorate([
874
- ( (__param(0, IQuickInputService))),
875
- ( (__param(1, ISCMViewService)))
876
- ], RepositoryPicker)));
872
+ RepositoryPicker = ( __decorate([
873
+ ( __param(0, IQuickInputService)),
874
+ ( __param(1, ISCMViewService))
875
+ ], RepositoryPicker));
877
876
  let HistoryItemRefPicker = class HistoryItemRefPicker extends Disposable {
878
877
  constructor(_historyProvider, _historyItemsFilter, _quickInputService) {
879
878
  super();
@@ -882,21 +881,21 @@ let HistoryItemRefPicker = class HistoryItemRefPicker extends Disposable {
882
881
  this._quickInputService = _quickInputService;
883
882
  this._allQuickPickItem = {
884
883
  id: 'all',
885
- label: ( localize(6608, "All")),
886
- description: ( localize(6611, "All history item references")),
884
+ label: ( localize(8522, "All")),
885
+ description: ( localize(8525, "All history item references")),
887
886
  historyItemRef: 'all'
888
887
  };
889
888
  this._autoQuickPickItem = {
890
889
  id: 'auto',
891
- label: ( localize(6609, "Auto")),
892
- description: ( localize(6629, "Current history item reference(s)")),
890
+ label: ( localize(8523, "Auto")),
891
+ description: ( localize(8543, "Current history item reference(s)")),
893
892
  historyItemRef: 'auto'
894
893
  };
895
894
  }
896
895
  async pickHistoryItemRef() {
897
896
  const quickPick = this._quickInputService.createQuickPick({ useSeparators: true });
898
897
  this._store.add(quickPick);
899
- quickPick.placeholder = ( localize(6630, "Select one/more history item references to view, type to filter"));
898
+ quickPick.placeholder = ( localize(8544, "Select one/more history item references to view, type to filter"));
900
899
  quickPick.canSelectMany = true;
901
900
  quickPick.hideCheckAll = true;
902
901
  quickPick.busy = true;
@@ -916,7 +915,7 @@ let HistoryItemRefPicker = class HistoryItemRefPicker extends Disposable {
916
915
  index++;
917
916
  continue;
918
917
  }
919
- if (( (this._historyItemsFilter.some(ref => ref.id === items[index].id)))) {
918
+ if (( this._historyItemsFilter.some(ref => ref.id === items[index].id))) {
920
919
  const item = items.splice(index, 1);
921
920
  selectedItems.push(...item);
922
921
  }
@@ -929,42 +928,40 @@ let HistoryItemRefPicker = class HistoryItemRefPicker extends Disposable {
929
928
  quickPick.items = items;
930
929
  quickPick.selectedItems = selectedItems;
931
930
  quickPick.busy = false;
932
- return (
933
- (new Promise(resolve => {
934
- this._store.add(quickPick.onDidChangeSelection(items => {
935
- const { added } = delta(selectedItems, items, (a, b) => compare(a.id ?? '', b.id ?? ''));
936
- if (added.length > 0) {
937
- if (added[0].historyItemRef === 'all' || added[0].historyItemRef === 'auto') {
938
- quickPick.selectedItems = [added[0]];
939
- }
940
- else {
941
- quickPick.selectedItems = [...quickPick.selectedItems
942
- .filter(i => i.historyItemRef !== 'all' && i.historyItemRef !== 'auto')];
943
- }
944
- }
945
- selectedItems = [...quickPick.selectedItems];
946
- }));
947
- this._store.add(quickPick.onDidAccept(() => {
948
- if (selectedItems.length === 0) {
949
- resolve(undefined);
950
- }
951
- else if (selectedItems.length === 1 && selectedItems[0].historyItemRef === 'all') {
952
- resolve('all');
953
- }
954
- else if (selectedItems.length === 1 && selectedItems[0].historyItemRef === 'auto') {
955
- resolve('auto');
931
+ return ( new Promise(resolve => {
932
+ this._store.add(quickPick.onDidChangeSelection(items => {
933
+ const { added } = delta(selectedItems, items, (a, b) => compare(a.id ?? '', b.id ?? ''));
934
+ if (added.length > 0) {
935
+ if (added[0].historyItemRef === 'all' || added[0].historyItemRef === 'auto') {
936
+ quickPick.selectedItems = [added[0]];
956
937
  }
957
938
  else {
958
- resolve(( (selectedItems.map(item => item.historyItemRef.id))));
939
+ quickPick.selectedItems = [...quickPick.selectedItems
940
+ .filter(i => i.historyItemRef !== 'all' && i.historyItemRef !== 'auto')];
959
941
  }
960
- quickPick.hide();
961
- }));
962
- this._store.add(quickPick.onDidHide(() => {
942
+ }
943
+ selectedItems = [...quickPick.selectedItems];
944
+ }));
945
+ this._store.add(quickPick.onDidAccept(() => {
946
+ if (selectedItems.length === 0) {
963
947
  resolve(undefined);
964
- this.dispose();
965
- }));
966
- }))
967
- );
948
+ }
949
+ else if (selectedItems.length === 1 && selectedItems[0].historyItemRef === 'all') {
950
+ resolve('all');
951
+ }
952
+ else if (selectedItems.length === 1 && selectedItems[0].historyItemRef === 'auto') {
953
+ resolve('auto');
954
+ }
955
+ else {
956
+ resolve(( selectedItems.map(item => item.historyItemRef.id)));
957
+ }
958
+ quickPick.hide();
959
+ }));
960
+ this._store.add(quickPick.onDidHide(() => {
961
+ resolve(undefined);
962
+ this.dispose();
963
+ }));
964
+ }));
968
965
  }
969
966
  async _createQuickPickItems() {
970
967
  const picks = [
@@ -977,7 +974,7 @@ let HistoryItemRefPicker = class HistoryItemRefPicker extends Disposable {
977
974
  continue;
978
975
  }
979
976
  picks.push({ type: 'separator', label: refs[0].category });
980
- picks.push(...( (refs.map(ref => {
977
+ picks.push(...( refs.map(ref => {
981
978
  return {
982
979
  id: ref.id,
983
980
  label: ref.name,
@@ -986,16 +983,16 @@ let HistoryItemRefPicker = class HistoryItemRefPicker extends Disposable {
986
983
  ThemeIcon.asClassName(ref.icon) : undefined,
987
984
  historyItemRef: ref
988
985
  };
989
- }))));
986
+ })));
990
987
  }
991
988
  return picks;
992
989
  }
993
990
  };
994
- HistoryItemRefPicker = ( (__decorate([
995
- ( (__param(2, IQuickInputService)))
996
- ], HistoryItemRefPicker)));
991
+ HistoryItemRefPicker = ( __decorate([
992
+ ( __param(2, IQuickInputService))
993
+ ], HistoryItemRefPicker));
997
994
  let SCMHistoryViewPane = class SCMHistoryViewPane extends ViewPane {
998
- constructor(options, _commandService, _instantiationService, _notificationService, _progressService, configurationService, contextMenuService, keybindingService, instantiationService, viewDescriptorService, contextKeyService, openerService, themeService, telemetryService, hoverService) {
995
+ constructor(options, _commandService, _instantiationService, _menuService, _progressService, configurationService, contextMenuService, keybindingService, instantiationService, viewDescriptorService, contextKeyService, openerService, themeService, telemetryService, hoverService) {
999
996
  super({
1000
997
  ...options,
1001
998
  titleMenuId: MenuId.SCMHistoryTitle,
@@ -1003,15 +1000,17 @@ let SCMHistoryViewPane = class SCMHistoryViewPane extends ViewPane {
1003
1000
  }, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService, hoverService);
1004
1001
  this._commandService = _commandService;
1005
1002
  this._instantiationService = _instantiationService;
1006
- this._notificationService = _notificationService;
1003
+ this._menuService = _menuService;
1007
1004
  this._progressService = _progressService;
1008
1005
  this._repositoryIsLoadingMore = observableValue(this, false);
1009
1006
  this._repositoryOutdated = observableValue(this, false);
1010
- this._visibilityDisposables = ( (new DisposableStore()));
1011
- this._treeOperationSequencer = ( (new Sequencer()));
1012
- this._treeLoadMoreSequencer = ( (new Sequencer()));
1013
- this._updateChildrenThrottler = ( (new Throttler()));
1007
+ this._visibilityDisposables = ( new DisposableStore());
1008
+ this._treeOperationSequencer = ( new Sequencer());
1009
+ this._treeLoadMoreSequencer = ( new Sequencer());
1010
+ this._updateChildrenThrottler = ( new Throttler());
1014
1011
  this._scmProviderCtx = ContextKeys.SCMProvider.bindTo(this.scopedContextKeyService);
1012
+ this._scmCurrentHistoryItemRefHasRemote = ContextKeys.SCMCurrentHistoryItemRefHasRemote.bindTo(this.scopedContextKeyService);
1013
+ this._scmCurrentHistoryItemRefInFilter = ContextKeys.SCMCurrentHistoryItemRefInFilter.bindTo(this.scopedContextKeyService);
1015
1014
  this._actionRunner = this.instantiationService.createInstance(SCMHistoryViewPaneActionRunner);
1016
1015
  this._register(this._actionRunner);
1017
1016
  this._register(this._updateChildrenThrottler);
@@ -1025,7 +1024,7 @@ let SCMHistoryViewPane = class SCMHistoryViewPane extends ViewPane {
1025
1024
  container.appendChild(element.root);
1026
1025
  this._register(this.hoverService.setupManagedHover(getDefaultHoverDelegate('mouse'), element.root, {
1027
1026
  markdown: {
1028
- value: ( localize(6631, "Please refresh the graph using the refresh action ($(refresh)).")),
1027
+ value: ( localize(8545, "Please refresh the graph using the refresh action ($(refresh)).")),
1029
1028
  supportThemeIcons: true
1030
1029
  },
1031
1030
  markdownNotSupportedFallback: undefined
@@ -1047,14 +1046,14 @@ let SCMHistoryViewPane = class SCMHistoryViewPane extends ViewPane {
1047
1046
  }
1048
1047
  this._treeViewModel = this.instantiationService.createInstance(SCMHistoryViewModel);
1049
1048
  this._visibilityDisposables.add(this._treeViewModel);
1049
+ const firstRepositoryInitialized = derived(this, reader => {
1050
+ const repository = this._treeViewModel.repository.read(reader);
1051
+ const historyProvider = repository?.provider.historyProvider.read(reader);
1052
+ const historyItemRef = historyProvider?.historyItemRef.read(reader);
1053
+ return historyItemRef !== undefined ? true : undefined;
1054
+ });
1055
+ await waitForState(firstRepositoryInitialized);
1050
1056
  await this._progressService.withProgress({ location: this.id }, async () => {
1051
- const firstRepositoryInitialized = derived(this, reader => {
1052
- const repository = this._treeViewModel.repository.read(reader);
1053
- const historyProvider = repository?.provider.historyProvider.read(reader);
1054
- const historyItemRef = historyProvider?.historyItemRef.read(reader);
1055
- return historyItemRef !== undefined ? true : undefined;
1056
- });
1057
- await waitForState(firstRepositoryInitialized);
1058
1057
  await this._treeOperationSequencer.queue(async () => {
1059
1058
  await this._tree.setInput(this._treeViewModel);
1060
1059
  this._tree.scrollTop = 0;
@@ -1071,12 +1070,12 @@ let SCMHistoryViewPane = class SCMHistoryViewPane extends ViewPane {
1071
1070
  if (!repository || !historyProvider) {
1072
1071
  return;
1073
1072
  }
1074
- this._scmProviderCtx.set(repository.provider.contextValue);
1075
1073
  const historyItemRefId = derived(reader => {
1076
1074
  return historyProvider.historyItemRef.read(reader)?.id;
1077
1075
  });
1078
- store.add(runOnChange(historyItemRefId, () => {
1079
- this.refresh();
1076
+ store.add(runOnChange(historyItemRefId, async (historyItemRefIdValue) => {
1077
+ await this.refresh();
1078
+ this._scmCurrentHistoryItemRefInFilter.set(this._isCurrentHistoryItemInFilter(historyItemRefIdValue));
1080
1079
  }));
1081
1080
  store.add(runOnChange(historyProvider.historyItemRefChanges, changes => {
1082
1081
  if (changes.silent) {
@@ -1089,9 +1088,15 @@ let SCMHistoryViewPane = class SCMHistoryViewPane extends ViewPane {
1089
1088
  }
1090
1089
  this.refresh();
1091
1090
  }));
1092
- store.add(runOnChange(this._treeViewModel.onDidChangeHistoryItemsFilter, () => {
1093
- this.refresh();
1091
+ store.add(runOnChange(this._treeViewModel.onDidChangeHistoryItemsFilter, async () => {
1092
+ await this.refresh();
1093
+ this._scmCurrentHistoryItemRefInFilter.set(this._isCurrentHistoryItemInFilter(historyItemRefId.get()));
1094
+ }));
1095
+ store.add(autorun(reader => {
1096
+ this._scmCurrentHistoryItemRefHasRemote.set(!!historyProvider.historyItemRemoteRef.read(reader));
1094
1097
  }));
1098
+ this._scmProviderCtx.set(repository.provider.contextValue);
1099
+ this._scmCurrentHistoryItemRefInFilter.set(this._isCurrentHistoryItemInFilter(historyItemRefId.get()));
1095
1100
  if (!isFirstRun) {
1096
1101
  this.refresh();
1097
1102
  }
@@ -1113,25 +1118,21 @@ let SCMHistoryViewPane = class SCMHistoryViewPane extends ViewPane {
1113
1118
  if (action.id === PICK_REPOSITORY_ACTION_ID) {
1114
1119
  const repository = this._treeViewModel?.repository.get();
1115
1120
  if (repository) {
1116
- return (
1117
- (new SCMRepositoryActionViewItem(repository, action, options))
1118
- );
1121
+ return ( new SCMRepositoryActionViewItem(repository, action, options));
1119
1122
  }
1120
1123
  }
1121
1124
  else if (action.id === PICK_HISTORY_ITEM_REFS_ACTION_ID) {
1122
1125
  const repository = this._treeViewModel?.repository.get();
1123
1126
  const historyItemsFilter = this._treeViewModel?.getHistoryItemsFilter();
1124
1127
  if (repository && historyItemsFilter) {
1125
- return (
1126
- (new SCMHistoryItemRefsActionViewItem(repository, historyItemsFilter, action, options))
1127
- );
1128
+ return ( new SCMHistoryItemRefsActionViewItem(repository, historyItemsFilter, action, options));
1128
1129
  }
1129
1130
  }
1130
1131
  return super.getActionViewItem(action, options);
1131
1132
  }
1132
1133
  focus() {
1133
1134
  super.focus();
1134
- const fakeKeyboardEvent = ( (new KeyboardEvent('keydown')));
1135
+ const fakeKeyboardEvent = ( new KeyboardEvent('keydown'));
1135
1136
  this._tree.focusFirst(fakeKeyboardEvent);
1136
1137
  this._tree.domFocus();
1137
1138
  }
@@ -1169,16 +1170,10 @@ let SCMHistoryViewPane = class SCMHistoryViewPane extends ViewPane {
1169
1170
  const repository = this._treeViewModel.repository.get();
1170
1171
  const historyProvider = repository?.provider.historyProvider.get();
1171
1172
  const historyItemRef = historyProvider?.historyItemRef.get();
1172
- const historyItemFilter = this._treeViewModel.getHistoryItemsFilter();
1173
- if (!repository || !historyItemRef?.revision || !historyItemFilter) {
1173
+ if (!repository || !historyItemRef?.id || !historyItemRef?.revision) {
1174
1174
  return;
1175
1175
  }
1176
- if (Array.isArray(historyItemFilter) &&
1177
- !historyItemFilter.find(ref => ref.id === historyItemRef.id)) {
1178
- this._notificationService.info(( localize(
1179
- 6632,
1180
- "The current history item is not present in the source control graph. Please use the history item references picker to expand the set of history items in the graph."
1181
- )));
1176
+ if (!this._isCurrentHistoryItemInFilter(historyItemRef.id)) {
1182
1177
  return;
1183
1178
  }
1184
1179
  const revealTreeNode = () => {
@@ -1198,19 +1193,19 @@ let SCMHistoryViewPane = class SCMHistoryViewPane extends ViewPane {
1198
1193
  revealTreeNode();
1199
1194
  }
1200
1195
  _createTree(container) {
1201
- this._treeIdentityProvider = ( (new SCMHistoryTreeIdentityProvider()));
1196
+ this._treeIdentityProvider = ( new SCMHistoryTreeIdentityProvider());
1202
1197
  const historyItemHoverDelegate = this.instantiationService.createInstance(HistoryItemHoverDelegate, this.viewDescriptorService.getViewLocationById(this.id));
1203
1198
  this._register(historyItemHoverDelegate);
1204
1199
  this._treeDataSource = this.instantiationService.createInstance(SCMHistoryTreeDataSource);
1205
1200
  this._register(this._treeDataSource);
1206
- this._tree = this.instantiationService.createInstance(WorkbenchAsyncDataTree, 'SCM History Tree', container, ( (new ListDelegate())), [
1201
+ this._tree = this.instantiationService.createInstance(WorkbenchAsyncDataTree, 'SCM History Tree', container, ( new ListDelegate()), [
1207
1202
  this.instantiationService.createInstance(HistoryItemRenderer, historyItemHoverDelegate),
1208
1203
  this.instantiationService.createInstance(HistoryItemLoadMoreRenderer, this._repositoryIsLoadingMore, () => this._loadMore()),
1209
1204
  ], this._treeDataSource, {
1210
- accessibilityProvider: ( (new SCMHistoryTreeAccessibilityProvider())),
1205
+ accessibilityProvider: ( new SCMHistoryTreeAccessibilityProvider()),
1211
1206
  identityProvider: this._treeIdentityProvider,
1212
1207
  collapseByDefault: (e) => false,
1213
- keyboardNavigationLabelProvider: ( (new SCMHistoryTreeKeyboardNavigationLabelProvider())),
1208
+ keyboardNavigationLabelProvider: ( new SCMHistoryTreeKeyboardNavigationLabelProvider()),
1214
1209
  horizontalScrolling: false,
1215
1210
  multipleSelectionSupport: false,
1216
1211
  });
@@ -1218,6 +1213,16 @@ let SCMHistoryViewPane = class SCMHistoryViewPane extends ViewPane {
1218
1213
  this._tree.onDidOpen(this._onDidOpen, this, this._store);
1219
1214
  this._tree.onContextMenu(this._onContextMenu, this, this._store);
1220
1215
  }
1216
+ _isCurrentHistoryItemInFilter(historyItemRefId) {
1217
+ if (!historyItemRefId) {
1218
+ return false;
1219
+ }
1220
+ const historyItemFilter = this._treeViewModel.getHistoryItemsFilter();
1221
+ if (historyItemFilter === 'all' || historyItemFilter === 'auto') {
1222
+ return true;
1223
+ }
1224
+ return Array.isArray(historyItemFilter) && !!historyItemFilter.find(ref => ref.id === historyItemRefId);
1225
+ }
1221
1226
  async _onDidOpen(e) {
1222
1227
  if (!e.element) {
1223
1228
  return;
@@ -1231,10 +1236,10 @@ let SCMHistoryViewPane = class SCMHistoryViewPane extends ViewPane {
1231
1236
  const title = getHistoryItemEditorTitle(historyItem);
1232
1237
  const rootUri = e.element.repository.provider.rootUri;
1233
1238
  const path = rootUri ? rootUri.path : e.element.repository.provider.label;
1234
- const multiDiffSourceUri = ( (URI.from(
1239
+ const multiDiffSourceUri = ( URI.from(
1235
1240
  { scheme: 'scm-history-item', path: `${path}/${historyItemParentId}..${historyItem.id}` },
1236
1241
  true
1237
- )));
1242
+ ));
1238
1243
  await this._commandService.executeCommand('_workbench.openMultiDiffEditor', { title, multiDiffSourceUri, resources: historyItemChanges });
1239
1244
  }
1240
1245
  }
@@ -1251,14 +1256,37 @@ let SCMHistoryViewPane = class SCMHistoryViewPane extends ViewPane {
1251
1256
  if (!element || !isSCMHistoryItemViewModelTreeElement(element)) {
1252
1257
  return;
1253
1258
  }
1259
+ const historyItemMenuActions = this._menuService.getMenuActions(MenuId.SCMChangesContext, this.scopedContextKeyService, {
1260
+ arg: element.repository.provider,
1261
+ shouldForwardArgs: true
1262
+ });
1263
+ const actions = getFlatContextMenuActions(historyItemMenuActions);
1264
+ if (element.historyItemViewModel.historyItem.references?.length) {
1265
+ actions.push(( new Separator()));
1266
+ }
1267
+ const that = this;
1268
+ for (const ref of element.historyItemViewModel.historyItem.references ?? []) {
1269
+ const contextKeyService = this.scopedContextKeyService.createOverlay([
1270
+ ['scmHistoryItemRef', ref.id]
1271
+ ]);
1272
+ const historyItemRefMenuActions = this._menuService.getMenuActions(MenuId.SCMHistoryItemRefContext, contextKeyService);
1273
+ const historyItemRefSubMenuActions = ( getFlatContextMenuActions(historyItemRefMenuActions)
1274
+ .map(action => new (class extends MenuItemAction {
1275
+ constructor() {
1276
+ super({ id: action.id, title: action.label }, undefined, { arg: element.repository.provider, shouldForwardArgs: true }, undefined, undefined, contextKeyService, that._commandService);
1277
+ }
1278
+ run() {
1279
+ return super.run(element.historyItemViewModel.historyItem, ref.id);
1280
+ }
1281
+ })));
1282
+ if (historyItemRefSubMenuActions.length > 0) {
1283
+ actions.push(( new SubmenuAction(`scm.historyItemRef.${ref.id}`, ref.name, historyItemRefSubMenuActions)));
1284
+ }
1285
+ }
1254
1286
  this.contextMenuService.showContextMenu({
1255
1287
  contextKeyService: this.scopedContextKeyService,
1256
- menuId: MenuId.SCMChangesContext,
1257
- menuActionOptions: {
1258
- arg: element.repository.provider,
1259
- shouldForwardArgs: true
1260
- },
1261
1288
  getAnchor: () => e.anchor,
1289
+ getActions: () => actions,
1262
1290
  getActionsContext: () => element.historyItemViewModel.historyItem
1263
1291
  });
1264
1292
  }
@@ -1286,21 +1314,21 @@ let SCMHistoryViewPane = class SCMHistoryViewPane extends ViewPane {
1286
1314
  super.dispose();
1287
1315
  }
1288
1316
  };
1289
- SCMHistoryViewPane = ( (__decorate([
1290
- ( (__param(1, ICommandService))),
1291
- ( (__param(2, IInstantiationService))),
1292
- ( (__param(3, INotificationService))),
1293
- ( (__param(4, IProgressService))),
1294
- ( (__param(5, IConfigurationService))),
1295
- ( (__param(6, IContextMenuService))),
1296
- ( (__param(7, IKeybindingService))),
1297
- ( (__param(8, IInstantiationService))),
1298
- ( (__param(9, IViewDescriptorService))),
1299
- ( (__param(10, IContextKeyService))),
1300
- ( (__param(11, IOpenerService))),
1301
- ( (__param(12, IThemeService))),
1302
- ( (__param(13, ITelemetryService))),
1303
- ( (__param(14, IHoverService)))
1304
- ], SCMHistoryViewPane)));
1317
+ SCMHistoryViewPane = ( __decorate([
1318
+ ( __param(1, ICommandService)),
1319
+ ( __param(2, IInstantiationService)),
1320
+ ( __param(3, IMenuService)),
1321
+ ( __param(4, IProgressService)),
1322
+ ( __param(5, IConfigurationService)),
1323
+ ( __param(6, IContextMenuService)),
1324
+ ( __param(7, IKeybindingService)),
1325
+ ( __param(8, IInstantiationService)),
1326
+ ( __param(9, IViewDescriptorService)),
1327
+ ( __param(10, IContextKeyService)),
1328
+ ( __param(11, IOpenerService)),
1329
+ ( __param(12, IThemeService)),
1330
+ ( __param(13, ITelemetryService)),
1331
+ ( __param(14, IHoverService))
1332
+ ], SCMHistoryViewPane));
1305
1333
 
1306
1334
  export { SCMHistoryViewPane };