@codingame/monaco-vscode-scm-service-override 25.1.2 → 26.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.
@@ -87,22 +87,24 @@ import { latestChangedValue } from '@codingame/monaco-vscode-api/vscode/vs/base/
87
87
 
88
88
  var HistoryItemRenderer_1, HistoryItemChangeRenderer_1, HistoryItemLoadMoreRenderer_1;
89
89
  registerCss(scm);
90
- const PICK_REPOSITORY_ACTION_ID = 'workbench.scm.action.graph.pickRepository';
91
- const PICK_HISTORY_ITEM_REFS_ACTION_ID = 'workbench.scm.action.graph.pickHistoryItemRefs';
90
+ const PICK_REPOSITORY_ACTION_ID = "workbench.scm.action.graph.pickRepository";
91
+ const PICK_HISTORY_ITEM_REFS_ACTION_ID = "workbench.scm.action.graph.pickHistoryItemRefs";
92
92
  class SCMRepositoryActionViewItem extends ActionViewItem {
93
93
  constructor(_repository, action, options) {
94
- super(null, action, { ...options, icon: false, label: true });
94
+ super(null, action, {
95
+ ...options,
96
+ icon: false,
97
+ label: true
98
+ });
95
99
  this._repository = _repository;
96
100
  }
97
101
  updateLabel() {
98
102
  if (this.options.label && this.label) {
99
- this.label.classList.add('scm-graph-repository-picker');
100
- const icon = $('.icon');
101
- const iconClassNameArray = ThemeIcon.isThemeIcon(this._repository.provider.iconPath)
102
- ? ThemeIcon.asClassNameArray(this._repository.provider.iconPath)
103
- : ThemeIcon.asClassNameArray(Codicon.repo);
103
+ this.label.classList.add("scm-graph-repository-picker");
104
+ const icon = $(".icon");
105
+ const iconClassNameArray = ThemeIcon.isThemeIcon(this._repository.provider.iconPath) ? ThemeIcon.asClassNameArray(this._repository.provider.iconPath) : ThemeIcon.asClassNameArray(Codicon.repo);
104
106
  icon.classList.add(...iconClassNameArray);
105
- const name = $('.name');
107
+ const name = $(".name");
106
108
  name.textContent = this._repository.provider.name;
107
109
  reset(this.label, icon, name);
108
110
  }
@@ -113,48 +115,46 @@ class SCMRepositoryActionViewItem extends ActionViewItem {
113
115
  }
114
116
  class SCMHistoryItemRefsActionViewItem extends ActionViewItem {
115
117
  constructor(_repository, _historyItemsFilter, action, options) {
116
- super(null, action, { ...options, icon: false, label: true });
118
+ super(null, action, {
119
+ ...options,
120
+ icon: false,
121
+ label: true
122
+ });
117
123
  this._repository = _repository;
118
124
  this._historyItemsFilter = _historyItemsFilter;
119
125
  }
120
126
  updateLabel() {
121
127
  if (this.options.label && this.label) {
122
- this.label.classList.add('scm-graph-history-item-picker');
123
- const icon = $('.icon');
128
+ this.label.classList.add("scm-graph-history-item-picker");
129
+ const icon = $(".icon");
124
130
  icon.classList.add(...ThemeIcon.asClassNameArray(Codicon.gitBranch));
125
- const name = $('.name');
126
- if (this._historyItemsFilter === 'all') {
127
- name.textContent = ( localize(10590, "All"));
128
- }
129
- else if (this._historyItemsFilter === 'auto') {
130
- name.textContent = ( localize(10591, "Auto"));
131
- }
132
- else if (this._historyItemsFilter.length === 1) {
131
+ const name = $(".name");
132
+ if (this._historyItemsFilter === "all") {
133
+ name.textContent = ( localize(10908, "All"));
134
+ } else if (this._historyItemsFilter === "auto") {
135
+ name.textContent = ( localize(10909, "Auto"));
136
+ } else if (this._historyItemsFilter.length === 1) {
133
137
  name.textContent = this._historyItemsFilter[0].name;
134
- }
135
- else {
136
- name.textContent = ( localize(10592, "{0} Items", this._historyItemsFilter.length));
138
+ } else {
139
+ name.textContent = ( localize(10910, "{0} Items", this._historyItemsFilter.length));
137
140
  }
138
141
  reset(this.label, icon, name);
139
142
  }
140
143
  }
141
144
  getTooltip() {
142
- if (this._historyItemsFilter === 'all') {
143
- return localize(10593, "All history item references");
144
- }
145
- else if (this._historyItemsFilter === 'auto') {
145
+ if (this._historyItemsFilter === "all") {
146
+ return localize(10911, "All history item references");
147
+ } else if (this._historyItemsFilter === "auto") {
146
148
  const historyProvider = this._repository.provider.historyProvider.get();
147
149
  return [
148
150
  historyProvider?.historyItemRef.get()?.name,
149
151
  historyProvider?.historyItemRemoteRef.get()?.name,
150
152
  historyProvider?.historyItemBaseRef.get()?.name
151
- ].filter(ref => !!ref).join(', ');
152
- }
153
- else if (this._historyItemsFilter.length === 1) {
153
+ ].filter(ref => !!ref).join(", ");
154
+ } else if (this._historyItemsFilter.length === 1) {
154
155
  return this._historyItemsFilter[0].name;
155
- }
156
- else {
157
- return ( this._historyItemsFilter.map(ref => ref.name)).join(', ');
156
+ } else {
157
+ return ( this._historyItemsFilter.map(ref => ref.name)).join(", ");
158
158
  }
159
159
  }
160
160
  }
@@ -162,13 +162,13 @@ registerAction2(class extends ViewAction {
162
162
  constructor() {
163
163
  super({
164
164
  id: PICK_REPOSITORY_ACTION_ID,
165
- title: ( localize(10594, "Repository Picker")),
165
+ title: ( localize(10912, "Repository Picker")),
166
166
  viewId: HISTORY_VIEW_PANE_ID,
167
167
  f1: false,
168
168
  menu: {
169
169
  id: MenuId.SCMHistoryTitle,
170
- when: ( ContextKeyExpr.and(( ContextKeyExpr.has('scm.providerCount')), ContextKeyExpr.greater('scm.providerCount', 1), ( ContextKeyExpr.equals('config.scm.repositories.selectionMode', 'multiple')))),
171
- group: 'navigation',
170
+ when: ( ContextKeyExpr.and(( ContextKeyExpr.has("scm.providerCount")), ContextKeyExpr.greater("scm.providerCount", 1), ( ContextKeyExpr.equals("config.scm.repositories.selectionMode", "multiple")))),
171
+ group: "navigation",
172
172
  order: 0
173
173
  }
174
174
  });
@@ -181,14 +181,14 @@ registerAction2(class extends ViewAction {
181
181
  constructor() {
182
182
  super({
183
183
  id: PICK_HISTORY_ITEM_REFS_ACTION_ID,
184
- title: ( localize(10595, "History Item Reference Picker")),
184
+ title: ( localize(10913, "History Item Reference Picker")),
185
185
  icon: Codicon.gitBranch,
186
186
  viewId: HISTORY_VIEW_PANE_ID,
187
187
  precondition: ( ContextKeys.SCMHistoryItemCount.notEqualsTo(0)),
188
188
  f1: false,
189
189
  menu: {
190
190
  id: MenuId.SCMHistoryTitle,
191
- group: 'navigation',
191
+ group: "navigation",
192
192
  order: 1
193
193
  }
194
194
  });
@@ -200,15 +200,15 @@ registerAction2(class extends ViewAction {
200
200
  registerAction2(class extends ViewAction {
201
201
  constructor() {
202
202
  super({
203
- id: 'workbench.scm.action.graph.revealCurrentHistoryItem',
204
- title: ( localize(10596, "Go to Current History Item")),
203
+ id: "workbench.scm.action.graph.revealCurrentHistoryItem",
204
+ title: ( localize(10914, "Go to Current History Item")),
205
205
  icon: Codicon.target,
206
206
  viewId: HISTORY_VIEW_PANE_ID,
207
207
  precondition: ( ContextKeyExpr.and(( ContextKeys.SCMHistoryItemCount.notEqualsTo(0)), ( ContextKeys.SCMCurrentHistoryItemRefInFilter.isEqualTo(true)))),
208
208
  f1: false,
209
209
  menu: {
210
210
  id: MenuId.SCMHistoryTitle,
211
- group: 'navigation',
211
+ group: "navigation",
212
212
  order: 2
213
213
  }
214
214
  });
@@ -220,14 +220,14 @@ registerAction2(class extends ViewAction {
220
220
  registerAction2(class extends ViewAction {
221
221
  constructor() {
222
222
  super({
223
- id: 'workbench.scm.action.graph.refresh',
224
- title: ( localize(10597, "Refresh")),
223
+ id: "workbench.scm.action.graph.refresh",
224
+ title: ( localize(10915, "Refresh")),
225
225
  viewId: HISTORY_VIEW_PANE_ID,
226
226
  f1: false,
227
227
  icon: Codicon.refresh,
228
228
  menu: {
229
229
  id: MenuId.SCMHistoryTitle,
230
- group: 'navigation',
230
+ group: "navigation",
231
231
  order: 1000
232
232
  }
233
233
  });
@@ -239,11 +239,15 @@ registerAction2(class extends ViewAction {
239
239
  registerAction2(class extends ViewAction {
240
240
  constructor() {
241
241
  super({
242
- id: 'workbench.scm.action.graph.setListViewMode',
243
- title: ( localize(10598, "View as List")),
242
+ id: "workbench.scm.action.graph.setListViewMode",
243
+ title: ( localize(10916, "View as List")),
244
244
  viewId: HISTORY_VIEW_PANE_ID,
245
245
  toggled: ( ContextKeys.SCMHistoryViewMode.isEqualTo(ViewMode.List)),
246
- menu: { id: MenuId.SCMHistoryTitle, group: '9_viewmode', order: 1 },
246
+ menu: {
247
+ id: MenuId.SCMHistoryTitle,
248
+ group: "9_viewmode",
249
+ order: 1
250
+ },
247
251
  f1: false
248
252
  });
249
253
  }
@@ -254,11 +258,15 @@ registerAction2(class extends ViewAction {
254
258
  registerAction2(class extends ViewAction {
255
259
  constructor() {
256
260
  super({
257
- id: 'workbench.scm.action.graph.setTreeViewMode',
258
- title: ( localize(10599, "View as Tree")),
261
+ id: "workbench.scm.action.graph.setTreeViewMode",
262
+ title: ( localize(10917, "View as Tree")),
259
263
  viewId: HISTORY_VIEW_PANE_ID,
260
264
  toggled: ( ContextKeys.SCMHistoryViewMode.isEqualTo(ViewMode.Tree)),
261
- menu: { id: MenuId.SCMHistoryTitle, group: '9_viewmode', order: 2 },
265
+ menu: {
266
+ id: MenuId.SCMHistoryTitle,
267
+ group: "9_viewmode",
268
+ order: 2
269
+ },
262
270
  f1: false
263
271
  });
264
272
  }
@@ -269,22 +277,19 @@ registerAction2(class extends ViewAction {
269
277
  registerAction2(class extends Action2 {
270
278
  constructor() {
271
279
  super({
272
- id: 'workbench.scm.action.graph.viewChanges',
273
- title: ( localize(10600, "Open Changes")),
280
+ id: "workbench.scm.action.graph.viewChanges",
281
+ title: ( localize(10918, "Open Changes")),
274
282
  icon: Codicon.diffMultiple,
275
283
  f1: false,
276
- menu: [
277
- {
278
- id: MenuId.SCMHistoryItemContext,
279
- group: 'inline',
280
- order: 1
281
- },
282
- {
283
- id: MenuId.SCMHistoryItemContext,
284
- group: '0_view',
285
- order: 1
286
- }
287
- ]
284
+ menu: [{
285
+ id: MenuId.SCMHistoryItemContext,
286
+ group: "inline",
287
+ order: 1
288
+ }, {
289
+ id: MenuId.SCMHistoryItemContext,
290
+ group: "0_view",
291
+ order: 1
292
+ }]
288
293
  });
289
294
  }
290
295
  async run(accessor, provider, ...historyItems) {
@@ -298,32 +303,23 @@ registerAction2(class extends Action2 {
298
303
  const historyItem = historyItems[0];
299
304
  let title, historyItemId, historyItemParentId;
300
305
  if (historyItemRemoteRef && (historyItem.id === SCMIncomingHistoryItemId || historyItem.id === SCMOutgoingHistoryItemId)) {
301
- const mergeBase = await historyProvider.resolveHistoryItemRefsCommonAncestor([
302
- historyItemRef.name,
303
- historyItemRemoteRef.name
304
- ]);
306
+ const mergeBase = await historyProvider.resolveHistoryItemRefsCommonAncestor([historyItemRef.name, historyItemRemoteRef.name]);
305
307
  if (mergeBase && historyItem.id === SCMIncomingHistoryItemId) {
306
308
  title = `${historyItem.subject} - ${historyItemRef.name} \u2194 ${historyItemRemoteRef.name}`;
307
309
  historyItemId = historyItemRemoteRef.id;
308
310
  historyItemParentId = mergeBase;
309
- }
310
- else if (mergeBase && historyItem.id === SCMOutgoingHistoryItemId) {
311
+ } else if (mergeBase && historyItem.id === SCMOutgoingHistoryItemId) {
311
312
  title = `${historyItem.subject} - ${historyItemRemoteRef.name} \u2194 ${historyItemRef.name}`;
312
313
  historyItemId = historyItemRef.id;
313
314
  historyItemParentId = mergeBase;
314
315
  }
315
- }
316
- else {
316
+ } else {
317
317
  title = getHistoryItemEditorTitle(historyItem);
318
318
  historyItemId = historyItem.id;
319
319
  if (historyItem.parentIds.length > 0) {
320
320
  if (historyItem.parentIds[0] === SCMIncomingHistoryItemId && historyItemRemoteRef) {
321
- historyItemParentId = await historyProvider.resolveHistoryItemRefsCommonAncestor([
322
- historyItemRef.name,
323
- historyItemRemoteRef.name
324
- ]);
325
- }
326
- else {
321
+ historyItemParentId = await historyProvider.resolveHistoryItemRefsCommonAncestor([historyItemRef.name, historyItemRemoteRef.name]);
322
+ } else {
327
323
  historyItemParentId = historyItem.parentIds[0];
328
324
  }
329
325
  }
@@ -331,29 +327,29 @@ registerAction2(class extends Action2 {
331
327
  if (!title || !historyItemId || !historyItemParentId) {
332
328
  return;
333
329
  }
334
- const multiDiffSourceUri = ScmHistoryItemResolver.getMultiDiffSourceUri(provider, historyItemId, historyItemParentId, '');
335
- commandService.executeCommand('_workbench.openMultiDiffEditor', { title, multiDiffSourceUri });
330
+ const multiDiffSourceUri = ScmHistoryItemResolver.getMultiDiffSourceUri(provider, historyItemId, historyItemParentId, "");
331
+ commandService.executeCommand("_workbench.openMultiDiffEditor", {
332
+ title,
333
+ multiDiffSourceUri
334
+ });
336
335
  }
337
336
  });
338
337
  registerAction2(class extends Action2 {
339
338
  constructor() {
340
339
  super({
341
- id: 'workbench.scm.action.graph.openFile',
342
- title: ( localize(10601, "Open File")),
340
+ id: "workbench.scm.action.graph.openFile",
341
+ title: ( localize(10919, "Open File")),
343
342
  icon: Codicon.goToFile,
344
343
  f1: false,
345
- menu: [
346
- {
347
- id: MenuId.SCMHistoryItemChangeContext,
348
- group: 'inline',
349
- order: 1
350
- },
351
- {
352
- id: MenuId.SCMHistoryItemChangeContext,
353
- group: '0_view',
354
- order: 1
355
- }
356
- ]
344
+ menu: [{
345
+ id: MenuId.SCMHistoryItemChangeContext,
346
+ group: "inline",
347
+ order: 1
348
+ }, {
349
+ id: MenuId.SCMHistoryItemChangeContext,
350
+ group: "0_view",
351
+ order: 1
352
+ }]
357
353
  });
358
354
  }
359
355
  async run(accessor, historyItem, historyItemChange) {
@@ -363,16 +359,17 @@ registerAction2(class extends Action2 {
363
359
  }
364
360
  let version;
365
361
  if (historyItem.id === SCMIncomingHistoryItemId) {
366
- version = ( localize(10602, "Incoming Changes"));
367
- }
368
- else if (historyItem.id === SCMOutgoingHistoryItemId) {
369
- version = ( localize(10603, "Outgoing Changes"));
370
- }
371
- else {
362
+ version = ( localize(10920, "Incoming Changes"));
363
+ } else if (historyItem.id === SCMOutgoingHistoryItemId) {
364
+ version = ( localize(10921, "Outgoing Changes"));
365
+ } else {
372
366
  version = historyItem.displayId ?? historyItem.id;
373
367
  }
374
368
  const name = basename(historyItemChange.modifiedUri.fsPath);
375
- await editorService.openEditor({ resource: historyItemChange.modifiedUri, label: `${name} (${version})` });
369
+ await editorService.openEditor({
370
+ resource: historyItemChange.modifiedUri,
371
+ label: `${name} (${version})`
372
+ });
376
373
  }
377
374
  });
378
375
  class ListDelegate {
@@ -382,23 +379,37 @@ class ListDelegate {
382
379
  getTemplateId(element) {
383
380
  if (isSCMHistoryItemViewModelTreeElement(element)) {
384
381
  return HistoryItemRenderer.TEMPLATE_ID;
385
- }
386
- else if (isSCMHistoryItemChangeViewModelTreeElement(element) || isSCMHistoryItemChangeNode(element)) {
382
+ } else if (isSCMHistoryItemChangeViewModelTreeElement(element) || isSCMHistoryItemChangeNode(element)) {
387
383
  return HistoryItemChangeRenderer.TEMPLATE_ID;
388
- }
389
- else if (isSCMHistoryItemLoadMoreTreeElement(element)) {
384
+ } else if (isSCMHistoryItemLoadMoreTreeElement(element)) {
390
385
  return HistoryItemLoadMoreRenderer.TEMPLATE_ID;
391
- }
392
- else {
393
- throw ( new Error('Unknown element'));
386
+ } else {
387
+ throw ( new Error("Unknown element"));
394
388
  }
395
389
  }
396
390
  }
397
391
  let HistoryItemRenderer = class HistoryItemRenderer {
398
- static { HistoryItemRenderer_1 = this; }
399
- static { this.TEMPLATE_ID = 'history-item'; }
400
- get templateId() { return HistoryItemRenderer_1.TEMPLATE_ID; }
401
- constructor(_viewContainerLocation, _commandService, _configurationService, _contextKeyService, _contextMenuService, _hoverService, _keybindingService, _markdownRendererService, _menuService, _telemetryService) {
392
+ static {
393
+ HistoryItemRenderer_1 = this;
394
+ }
395
+ static {
396
+ this.TEMPLATE_ID = "history-item";
397
+ }
398
+ get templateId() {
399
+ return HistoryItemRenderer_1.TEMPLATE_ID;
400
+ }
401
+ constructor(
402
+ _viewContainerLocation,
403
+ _commandService,
404
+ _configurationService,
405
+ _contextKeyService,
406
+ _contextMenuService,
407
+ _hoverService,
408
+ _keybindingService,
409
+ _markdownRendererService,
410
+ _menuService,
411
+ _telemetryService
412
+ ) {
402
413
  this._viewContainerLocation = _viewContainerLocation;
403
414
  this._commandService = _commandService;
404
415
  this._configurationService = _configurationService;
@@ -409,16 +420,18 @@ let HistoryItemRenderer = class HistoryItemRenderer {
409
420
  this._markdownRendererService = _markdownRendererService;
410
421
  this._menuService = _menuService;
411
422
  this._telemetryService = _telemetryService;
412
- this._badgesConfig = observableConfigValue('scm.graph.badges', 'filter', this._configurationService);
423
+ this._badgesConfig = observableConfigValue("scm.graph.badges", "filter", this._configurationService);
413
424
  }
414
425
  renderTemplate(container) {
415
- const element = append(container, $('.history-item'));
416
- const graphContainer = append(element, $('.graph-container'));
426
+ const element = append(container, $(".history-item"));
427
+ const graphContainer = append(element, $(".graph-container"));
417
428
  const iconLabel = ( new IconLabel(element, {
418
- supportIcons: true, supportHighlights: true, supportDescriptionHighlights: true
429
+ supportIcons: true,
430
+ supportHighlights: true,
431
+ supportDescriptionHighlights: true
419
432
  }));
420
- const labelContainer = append(element, $('.label-container'));
421
- const actionsContainer = append(element, $('.actions'));
433
+ const labelContainer = append(element, $(".label-container"));
434
+ const actionsContainer = append(element, $(".actions"));
422
435
  const actionBar = ( new WorkbenchToolBar(
423
436
  actionsContainer,
424
437
  undefined,
@@ -429,55 +442,78 @@ let HistoryItemRenderer = class HistoryItemRenderer {
429
442
  this._commandService,
430
443
  this._telemetryService
431
444
  ));
432
- return { element, graphContainer, label: iconLabel, labelContainer, actionBar, elementDisposables: ( new DisposableStore()), disposables: combinedDisposable(iconLabel, actionBar) };
445
+ return {
446
+ element,
447
+ graphContainer,
448
+ label: iconLabel,
449
+ labelContainer,
450
+ actionBar,
451
+ elementDisposables: ( new DisposableStore()),
452
+ disposables: combinedDisposable(iconLabel, actionBar)
453
+ };
433
454
  }
434
455
  renderElement(node, index, templateData) {
435
456
  const provider = node.element.repository.provider;
436
457
  const historyItemViewModel = node.element.historyItemViewModel;
437
458
  const historyItem = historyItemViewModel.historyItem;
438
- const { content, disposables } = toHistoryItemHoverContent(this._markdownRendererService, historyItem, true);
439
- const { hoverOptions, hoverLifecycleOptions } = this._getHoverOptions();
440
- const historyItemHover = this._hoverService.setupDelayedHover(templateData.element, { ...hoverOptions, content }, hoverLifecycleOptions);
459
+ const {
460
+ content,
461
+ disposables
462
+ } = toHistoryItemHoverContent(this._markdownRendererService, historyItem, true);
463
+ const {
464
+ hoverOptions,
465
+ hoverLifecycleOptions
466
+ } = this._getHoverOptions();
467
+ const historyItemHover = this._hoverService.setupDelayedHover(templateData.element, {
468
+ ...hoverOptions,
469
+ content
470
+ }, hoverLifecycleOptions);
441
471
  templateData.elementDisposables.add(historyItemHover);
442
472
  templateData.elementDisposables.add(disposables);
443
- templateData.graphContainer.textContent = '';
444
- templateData.graphContainer.classList.toggle('current', historyItemViewModel.kind === 'HEAD');
445
- templateData.graphContainer.classList.toggle('incoming-changes', historyItemViewModel.kind === 'incoming-changes');
446
- templateData.graphContainer.classList.toggle('outgoing-changes', historyItemViewModel.kind === 'outgoing-changes');
473
+ templateData.graphContainer.textContent = "";
474
+ templateData.graphContainer.classList.toggle("current", historyItemViewModel.kind === "HEAD");
475
+ templateData.graphContainer.classList.toggle("incoming-changes", historyItemViewModel.kind === "incoming-changes");
476
+ templateData.graphContainer.classList.toggle("outgoing-changes", historyItemViewModel.kind === "outgoing-changes");
447
477
  templateData.graphContainer.appendChild(renderSCMHistoryItemGraph(historyItemViewModel));
448
478
  const historyItemRef = provider.historyProvider.get()?.historyItemRef?.get();
449
- const extraClasses = historyItemRef?.revision === historyItem.id ? ['history-item-current'] : [];
479
+ const extraClasses = historyItemRef?.revision === historyItem.id ? ["history-item-current"] : [];
450
480
  const [matches, descriptionMatches] = this._processMatches(historyItemViewModel, node.filterData);
451
- templateData.label.setLabel(historyItem.subject, historyItem.author, { matches, descriptionMatches, extraClasses });
481
+ templateData.label.setLabel(historyItem.subject, historyItem.author, {
482
+ matches,
483
+ descriptionMatches,
484
+ extraClasses
485
+ });
452
486
  this._renderBadges(historyItem, templateData);
453
- const actions = this._menuService.getMenuActions(MenuId.SCMHistoryItemContext, this._contextKeyService, { arg: provider, shouldForwardArgs: true });
487
+ const actions = this._menuService.getMenuActions(MenuId.SCMHistoryItemContext, this._contextKeyService, {
488
+ arg: provider,
489
+ shouldForwardArgs: true
490
+ });
454
491
  templateData.actionBar.context = historyItem;
455
- templateData.actionBar.setActions(getActionBarActions(actions, 'inline').primary);
492
+ templateData.actionBar.setActions(getActionBarActions(actions, "inline").primary);
456
493
  }
457
494
  renderCompressedElements(node, index, templateData) {
458
- throw ( new Error('Should never happen since node is incompressible'));
495
+ throw ( new Error("Should never happen since node is incompressible"));
459
496
  }
460
497
  _renderBadges(historyItem, templateData) {
461
498
  templateData.elementDisposables.add(autorun(reader => {
462
499
  const labelConfig = this._badgesConfig.read(reader);
463
500
  templateData.labelContainer.replaceChildren();
464
- const references = historyItem.references ?
465
- historyItem.references.slice(0) : [];
501
+ const references = historyItem.references ? historyItem.references.slice(0) : [];
466
502
  if (references.length > 0 && references[0].color) {
467
503
  this._renderBadge([references[0]], true, templateData);
468
504
  references.splice(0, 1);
469
505
  }
470
- const historyItemRefsByColor = groupBy(references, ref => ref.color ? ref.color : '');
506
+ const historyItemRefsByColor = groupBy(references, ref => ref.color ? ref.color : "");
471
507
  for (const [key, historyItemRefs] of Object.entries(historyItemRefsByColor)) {
472
- if (key === '' && labelConfig !== 'all') {
508
+ if (key === "" && labelConfig !== "all") {
473
509
  continue;
474
510
  }
475
511
  if (!historyItemRefs) {
476
512
  continue;
477
513
  }
478
- const historyItemRefByIconId = groupBy(historyItemRefs, ref => ThemeIcon.isThemeIcon(ref.icon) ? ref.icon.id : '');
514
+ const historyItemRefByIconId = groupBy(historyItemRefs, ref => ThemeIcon.isThemeIcon(ref.icon) ? ref.icon.id : "");
479
515
  for (const [key, historyItemRefs] of Object.entries(historyItemRefByIconId)) {
480
- if (key === '' || !historyItemRefs) {
516
+ if (key === "" || !historyItemRefs) {
481
517
  continue;
482
518
  }
483
519
  this._renderBadge(historyItemRefs, false, templateData);
@@ -489,34 +525,30 @@ let HistoryItemRenderer = class HistoryItemRenderer {
489
525
  if (historyItemRefs.length === 0 || !ThemeIcon.isThemeIcon(historyItemRefs[0].icon)) {
490
526
  return;
491
527
  }
492
- const elements = h('div.label', {
528
+ const elements = h("div.label", {
493
529
  style: {
494
530
  color: historyItemRefs[0].color ? asCssVariable(historyItemHoverLabelForeground) : asCssVariable(foreground),
495
531
  backgroundColor: historyItemRefs[0].color ? asCssVariable(historyItemRefs[0].color) : asCssVariable(historyItemHoverDefaultLabelBackground)
496
532
  }
497
- }, [
498
- h('div.count@count', {
499
- style: {
500
- display: historyItemRefs.length > 1 ? '' : 'none'
501
- }
502
- }),
503
- h('div.icon@icon'),
504
- h('div.description@description', {
505
- style: {
506
- display: showDescription ? '' : 'none'
507
- }
508
- })
509
- ]);
510
- elements.count.textContent = historyItemRefs.length > 1 ? ( historyItemRefs.length.toString()) : '';
533
+ }, [h("div.count@count", {
534
+ style: {
535
+ display: historyItemRefs.length > 1 ? "" : "none"
536
+ }
537
+ }), h("div.icon@icon"), h("div.description@description", {
538
+ style: {
539
+ display: showDescription ? "" : "none"
540
+ }
541
+ })]);
542
+ elements.count.textContent = historyItemRefs.length > 1 ? ( historyItemRefs.length.toString()) : "";
511
543
  elements.icon.classList.add(...ThemeIcon.asClassNameArray(historyItemRefs[0].icon));
512
- elements.description.textContent = showDescription ? historyItemRefs[0].name : '';
544
+ elements.description.textContent = showDescription ? historyItemRefs[0].name : "";
513
545
  append(templateData.labelContainer, elements.root);
514
546
  }
515
547
  _getHoverOptions() {
516
548
  if (this._viewContainerLocation === ViewContainerLocation.Panel) {
517
549
  return {
518
550
  hoverOptions: {
519
- additionalClasses: ['history-item-hover'],
551
+ additionalClasses: ["history-item-hover"],
520
552
  appearance: {
521
553
  compact: true
522
554
  },
@@ -530,7 +562,7 @@ let HistoryItemRenderer = class HistoryItemRenderer {
530
562
  }
531
563
  return {
532
564
  hoverOptions: {
533
- additionalClasses: ['history-item-hover'],
565
+ additionalClasses: ["history-item-hover"],
534
566
  appearance: {
535
567
  compact: true,
536
568
  showPointer: true
@@ -541,7 +573,7 @@ let HistoryItemRenderer = class HistoryItemRenderer {
541
573
  style: HoverStyle.Pointer
542
574
  },
543
575
  hoverLifecycleOptions: {
544
- groupId: 'scm-history-item'
576
+ groupId: "scm-history-item"
545
577
  }
546
578
  };
547
579
  }
@@ -562,22 +594,28 @@ let HistoryItemRenderer = class HistoryItemRenderer {
562
594
  templateData.disposables.dispose();
563
595
  }
564
596
  };
565
- HistoryItemRenderer = HistoryItemRenderer_1 = ( __decorate([
566
- ( __param(1, ICommandService)),
567
- ( __param(2, IConfigurationService)),
568
- ( __param(3, IContextKeyService)),
569
- ( __param(4, IContextMenuService)),
570
- ( __param(5, IHoverService)),
571
- ( __param(6, IKeybindingService)),
572
- ( __param(7, IMarkdownRendererService)),
573
- ( __param(8, IMenuService)),
574
- ( __param(9, ITelemetryService))
575
- ], HistoryItemRenderer));
597
+ HistoryItemRenderer = HistoryItemRenderer_1 = ( __decorate([( __param(1, ICommandService)), ( __param(2, IConfigurationService)), ( __param(3, IContextKeyService)), ( __param(4, IContextMenuService)), ( __param(5, IHoverService)), ( __param(6, IKeybindingService)), ( __param(7, IMarkdownRendererService)), ( __param(8, IMenuService)), ( __param(9, ITelemetryService))], HistoryItemRenderer));
576
598
  let HistoryItemChangeRenderer = class HistoryItemChangeRenderer {
577
- static { HistoryItemChangeRenderer_1 = this; }
578
- static { this.TEMPLATE_ID = 'history-item-change'; }
579
- get templateId() { return HistoryItemChangeRenderer_1.TEMPLATE_ID; }
580
- constructor(viewMode, resourceLabels, _commandService, _contextKeyService, _contextMenuService, _keybindingService, _labelService, _menuService, _telemetryService) {
599
+ static {
600
+ HistoryItemChangeRenderer_1 = this;
601
+ }
602
+ static {
603
+ this.TEMPLATE_ID = "history-item-change";
604
+ }
605
+ get templateId() {
606
+ return HistoryItemChangeRenderer_1.TEMPLATE_ID;
607
+ }
608
+ constructor(
609
+ viewMode,
610
+ resourceLabels,
611
+ _commandService,
612
+ _contextKeyService,
613
+ _contextMenuService,
614
+ _keybindingService,
615
+ _labelService,
616
+ _menuService,
617
+ _telemetryService
618
+ ) {
581
619
  this.viewMode = viewMode;
582
620
  this.resourceLabels = resourceLabels;
583
621
  this._commandService = _commandService;
@@ -590,14 +628,15 @@ let HistoryItemChangeRenderer = class HistoryItemChangeRenderer {
590
628
  }
591
629
  renderTemplate(container) {
592
630
  const rowElement = container.parentElement;
593
- const element = append(container, $('.history-item-change'));
594
- const graphPlaceholder = append(element, $('.graph-placeholder'));
595
- const labelContainer = append(element, $('.label-container'));
631
+ const element = append(container, $(".history-item-change"));
632
+ const graphPlaceholder = append(element, $(".graph-placeholder"));
633
+ const labelContainer = append(element, $(".label-container"));
596
634
  const resourceLabel = this.resourceLabels.create(labelContainer, {
597
- supportDescriptionHighlights: true, supportHighlights: true
635
+ supportDescriptionHighlights: true,
636
+ supportHighlights: true
598
637
  });
599
638
  const disposables = ( new DisposableStore());
600
- const actionsContainer = append(resourceLabel.element, $('.actions'));
639
+ const actionsContainer = append(resourceLabel.element, $(".actions"));
601
640
  const actionBar = ( new WorkbenchToolBar(
602
641
  actionsContainer,
603
642
  undefined,
@@ -609,7 +648,14 @@ let HistoryItemChangeRenderer = class HistoryItemChangeRenderer {
609
648
  this._telemetryService
610
649
  ));
611
650
  disposables.add(actionBar);
612
- return { rowElement, element, graphPlaceholder, resourceLabel, actionBar, disposables };
651
+ return {
652
+ rowElement,
653
+ element,
654
+ graphPlaceholder,
655
+ resourceLabel,
656
+ actionBar,
657
+ disposables
658
+ };
613
659
  }
614
660
  renderElement(elementOrNode, index, templateData, details) {
615
661
  const historyItemViewModel = isSCMHistoryItemChangeViewModelTreeElement(elementOrNode.element) ? elementOrNode.element.historyItemViewModel : elementOrNode.element.context.historyItemViewModel;
@@ -618,13 +664,22 @@ let HistoryItemChangeRenderer = class HistoryItemChangeRenderer {
618
664
  this._renderGraphPlaceholder(templateData, historyItemViewModel, graphColumns);
619
665
  const hidePath = this.viewMode() === ViewMode.Tree;
620
666
  const fileKind = isSCMHistoryItemChangeViewModelTreeElement(elementOrNode.element) ? FileKind.FILE : FileKind.FOLDER;
621
- templateData.resourceLabel.setFile(historyItemChange.uri, { fileDecorations: { colors: false, badges: true }, fileKind, hidePath });
667
+ templateData.resourceLabel.setFile(historyItemChange.uri, {
668
+ fileDecorations: {
669
+ colors: false,
670
+ badges: true
671
+ },
672
+ fileKind,
673
+ hidePath
674
+ });
622
675
  if (fileKind === FileKind.FILE) {
623
- const actions = this._menuService.getMenuActions(MenuId.SCMHistoryItemChangeContext, this._contextKeyService, { arg: historyItemViewModel.historyItem, shouldForwardArgs: true });
676
+ const actions = this._menuService.getMenuActions(MenuId.SCMHistoryItemChangeContext, this._contextKeyService, {
677
+ arg: historyItemViewModel.historyItem,
678
+ shouldForwardArgs: true
679
+ });
624
680
  templateData.actionBar.context = historyItemChange;
625
- templateData.actionBar.setActions(getActionBarActions(actions, 'inline').primary);
626
- }
627
- else {
681
+ templateData.actionBar.setActions(getActionBarActions(actions, "inline").primary);
682
+ } else {
628
683
  templateData.actionBar.context = undefined;
629
684
  templateData.actionBar.setActions([]);
630
685
  }
@@ -636,8 +691,14 @@ let HistoryItemChangeRenderer = class HistoryItemChangeRenderer {
636
691
  this._renderGraphPlaceholder(templateData, historyItemViewModel, graphColumns);
637
692
  const label = ( compressed.elements.map(e => e.name));
638
693
  const folder = compressed.elements[compressed.elements.length - 1];
639
- templateData.resourceLabel.setResource({ resource: folder.uri, name: label }, {
640
- fileDecorations: { colors: false, badges: true },
694
+ templateData.resourceLabel.setResource({
695
+ resource: folder.uri,
696
+ name: label
697
+ }, {
698
+ fileDecorations: {
699
+ colors: false,
700
+ badges: true
701
+ },
641
702
  fileKind: FileKind.FOLDER,
642
703
  separator: this._labelService.getSeparator(folder.uri.scheme)
643
704
  });
@@ -648,60 +709,68 @@ let HistoryItemChangeRenderer = class HistoryItemChangeRenderer {
648
709
  const graphPlaceholderSvgWidth = SWIMLANE_WIDTH * (graphColumns.length + 1);
649
710
  const marginLeft = graphPlaceholderSvgWidth - 16 ;
650
711
  templateData.rowElement.style.marginLeft = `${marginLeft}px`;
651
- templateData.graphPlaceholder.textContent = '';
712
+ templateData.graphPlaceholder.textContent = "";
652
713
  templateData.graphPlaceholder.style.left = `${ -1 * marginLeft}px`;
653
714
  templateData.graphPlaceholder.style.width = `${graphPlaceholderSvgWidth}px`;
654
- templateData.graphPlaceholder.appendChild(renderSCMHistoryGraphPlaceholder(graphColumns, getHistoryItemIndex(historyItemViewModel)));
715
+ templateData.graphPlaceholder.appendChild(
716
+ renderSCMHistoryGraphPlaceholder(graphColumns, getHistoryItemIndex(historyItemViewModel))
717
+ );
655
718
  }
656
719
  disposeTemplate(templateData) {
657
720
  templateData.disposables.dispose();
658
721
  }
659
722
  };
660
- HistoryItemChangeRenderer = HistoryItemChangeRenderer_1 = ( __decorate([
661
- ( __param(2, ICommandService)),
662
- ( __param(3, IContextKeyService)),
663
- ( __param(4, IContextMenuService)),
664
- ( __param(5, IKeybindingService)),
665
- ( __param(6, ILabelService)),
666
- ( __param(7, IMenuService)),
667
- ( __param(8, ITelemetryService))
668
- ], HistoryItemChangeRenderer));
723
+ HistoryItemChangeRenderer = HistoryItemChangeRenderer_1 = ( __decorate([( __param(2, ICommandService)), ( __param(3, IContextKeyService)), ( __param(4, IContextMenuService)), ( __param(5, IKeybindingService)), ( __param(6, ILabelService)), ( __param(7, IMenuService)), ( __param(8, ITelemetryService))], HistoryItemChangeRenderer));
669
724
  let HistoryItemLoadMoreRenderer = class HistoryItemLoadMoreRenderer {
670
- static { HistoryItemLoadMoreRenderer_1 = this; }
671
- static { this.TEMPLATE_ID = 'historyItemLoadMore'; }
672
- get templateId() { return HistoryItemLoadMoreRenderer_1.TEMPLATE_ID; }
725
+ static {
726
+ HistoryItemLoadMoreRenderer_1 = this;
727
+ }
728
+ static {
729
+ this.TEMPLATE_ID = "historyItemLoadMore";
730
+ }
731
+ get templateId() {
732
+ return HistoryItemLoadMoreRenderer_1.TEMPLATE_ID;
733
+ }
673
734
  constructor(_isLoadingMore, _loadMoreCallback, _configurationService) {
674
735
  this._isLoadingMore = _isLoadingMore;
675
736
  this._loadMoreCallback = _loadMoreCallback;
676
737
  this._configurationService = _configurationService;
677
738
  }
678
739
  renderTemplate(container) {
679
- const element = append(container, $('.history-item-load-more'));
680
- const graphPlaceholder = append(element, $('.graph-placeholder'));
681
- const historyItemPlaceholderContainer = append(element, $('.history-item-placeholder'));
682
- const historyItemPlaceholderLabel = ( new IconLabel(historyItemPlaceholderContainer, { supportIcons: true }));
683
- return { element, graphPlaceholder, historyItemPlaceholderContainer, historyItemPlaceholderLabel, elementDisposables: ( new DisposableStore()), disposables: historyItemPlaceholderLabel };
740
+ const element = append(container, $(".history-item-load-more"));
741
+ const graphPlaceholder = append(element, $(".graph-placeholder"));
742
+ const historyItemPlaceholderContainer = append(element, $(".history-item-placeholder"));
743
+ const historyItemPlaceholderLabel = ( new IconLabel(historyItemPlaceholderContainer, {
744
+ supportIcons: true
745
+ }));
746
+ return {
747
+ element,
748
+ graphPlaceholder,
749
+ historyItemPlaceholderContainer,
750
+ historyItemPlaceholderLabel,
751
+ elementDisposables: ( new DisposableStore()),
752
+ disposables: historyItemPlaceholderLabel
753
+ };
684
754
  }
685
755
  renderElement(element, index, templateData) {
686
- templateData.graphPlaceholder.textContent = '';
756
+ templateData.graphPlaceholder.textContent = "";
687
757
  templateData.graphPlaceholder.style.width = `${SWIMLANE_WIDTH * (element.element.graphColumns.length + 1)}px`;
688
758
  templateData.graphPlaceholder.appendChild(renderSCMHistoryGraphPlaceholder(element.element.graphColumns));
689
- const pageOnScroll = this._configurationService.getValue('scm.graph.pageOnScroll') === true;
690
- templateData.historyItemPlaceholderContainer.classList.toggle('shimmer', pageOnScroll);
759
+ const pageOnScroll = this._configurationService.getValue("scm.graph.pageOnScroll") === true;
760
+ templateData.historyItemPlaceholderContainer.classList.toggle("shimmer", pageOnScroll);
691
761
  if (pageOnScroll) {
692
- templateData.historyItemPlaceholderLabel.setLabel('');
762
+ templateData.historyItemPlaceholderLabel.setLabel("");
693
763
  this._loadMoreCallback();
694
- }
695
- else {
764
+ } else {
696
765
  templateData.elementDisposables.add(autorun(reader => {
697
766
  const isLoadingMore = this._isLoadingMore.read(reader);
698
- const icon = `$(${isLoadingMore ? 'loading~spin' : 'fold-down'})`;
699
- templateData.historyItemPlaceholderLabel.setLabel(( localize(10604, "{0} Load More...", icon)));
767
+ const icon = `$(${isLoadingMore ? "loading~spin" : "fold-down"})`;
768
+ templateData.historyItemPlaceholderLabel.setLabel(( localize(10922, "{0} Load More...", icon)));
700
769
  }));
701
770
  }
702
771
  }
703
772
  renderCompressedElements(node, index, templateData) {
704
- throw ( new Error('Should never happen since node is incompressible'));
773
+ throw ( new Error("Should never happen since node is incompressible"));
705
774
  }
706
775
  disposeElement(element, index, templateData) {
707
776
  templateData.elementDisposables.clear();
@@ -711,35 +780,31 @@ let HistoryItemLoadMoreRenderer = class HistoryItemLoadMoreRenderer {
711
780
  templateData.disposables.dispose();
712
781
  }
713
782
  };
714
- HistoryItemLoadMoreRenderer = HistoryItemLoadMoreRenderer_1 = ( __decorate([
715
- ( __param(2, IConfigurationService))
716
- ], HistoryItemLoadMoreRenderer));
783
+ HistoryItemLoadMoreRenderer = HistoryItemLoadMoreRenderer_1 = ( __decorate([( __param(2, IConfigurationService))], HistoryItemLoadMoreRenderer));
717
784
  let SCMHistoryViewPaneActionRunner = class SCMHistoryViewPaneActionRunner extends ActionRunner {
718
785
  constructor(_progressService) {
719
786
  super();
720
787
  this._progressService = _progressService;
721
788
  }
722
789
  runAction(action, context) {
723
- return this._progressService.withProgress({ location: HISTORY_VIEW_PANE_ID }, async () => await super.runAction(action, context));
790
+ return this._progressService.withProgress({
791
+ location: HISTORY_VIEW_PANE_ID
792
+ }, async () => await super.runAction(action, context));
724
793
  }
725
794
  };
726
- SCMHistoryViewPaneActionRunner = ( __decorate([
727
- ( __param(0, IProgressService))
728
- ], SCMHistoryViewPaneActionRunner));
795
+ SCMHistoryViewPaneActionRunner = ( __decorate([( __param(0, IProgressService))], SCMHistoryViewPaneActionRunner));
729
796
  class SCMHistoryTreeAccessibilityProvider {
730
797
  getWidgetAriaLabel() {
731
- return localize(10605, "Source Control History");
798
+ return localize(10923, "Source Control History");
732
799
  }
733
800
  getAriaLabel(element) {
734
801
  if (isSCMRepository(element)) {
735
802
  return `${element.provider.name} ${element.provider.label}`;
736
- }
737
- else if (isSCMHistoryItemViewModelTreeElement(element)) {
803
+ } else if (isSCMHistoryItemViewModelTreeElement(element)) {
738
804
  const historyItem = element.historyItemViewModel.historyItem;
739
- return `${stripIcons(historyItem.message).trim()}${historyItem.author ? `, ${historyItem.author}` : ''}`;
740
- }
741
- else {
742
- return '';
805
+ return `${stripIcons(historyItem.message).trim()}${historyItem.author ? `, ${historyItem.author}` : ""}`;
806
+ } else {
807
+ return "";
743
808
  }
744
809
  }
745
810
  }
@@ -748,28 +813,23 @@ class SCMHistoryTreeIdentityProvider {
748
813
  if (isSCMRepository(element)) {
749
814
  const provider = element.provider;
750
815
  return `repo:${provider.id}`;
751
- }
752
- else if (isSCMHistoryItemViewModelTreeElement(element)) {
816
+ } else if (isSCMHistoryItemViewModelTreeElement(element)) {
753
817
  const provider = element.repository.provider;
754
818
  const historyItem = element.historyItemViewModel.historyItem;
755
- return `historyItem:${provider.id}/${historyItem.id}/${historyItem.parentIds.join(',')}`;
756
- }
757
- else if (isSCMHistoryItemChangeViewModelTreeElement(element)) {
819
+ return `historyItem:${provider.id}/${historyItem.id}/${historyItem.parentIds.join(",")}`;
820
+ } else if (isSCMHistoryItemChangeViewModelTreeElement(element)) {
758
821
  const provider = element.repository.provider;
759
822
  const historyItem = element.historyItemViewModel.historyItem;
760
- return `historyItemChange:${provider.id}/${historyItem.id}/${historyItem.parentIds.join(',')}/${element.historyItemChange.uri.fsPath}`;
761
- }
762
- else if (isSCMHistoryItemChangeNode(element)) {
823
+ return `historyItemChange:${provider.id}/${historyItem.id}/${historyItem.parentIds.join(",")}/${element.historyItemChange.uri.fsPath}`;
824
+ } else if (isSCMHistoryItemChangeNode(element)) {
763
825
  const provider = element.context.repository.provider;
764
826
  const historyItem = element.context.historyItemViewModel.historyItem;
765
- return `historyItemChangeFolder:${provider.id}/${historyItem.id}/${historyItem.parentIds.join(',')}/${element.uri.fsPath}`;
766
- }
767
- else if (isSCMHistoryItemLoadMoreTreeElement(element)) {
827
+ return `historyItemChangeFolder:${provider.id}/${historyItem.id}/${historyItem.parentIds.join(",")}/${element.uri.fsPath}`;
828
+ } else if (isSCMHistoryItemLoadMoreTreeElement(element)) {
768
829
  const provider = element.repository.provider;
769
830
  return `historyItemLoadMore:${provider.id}`;
770
- }
771
- else {
772
- throw ( new Error('Invalid tree element'));
831
+ } else {
832
+ throw ( new Error("Invalid tree element"));
773
833
  }
774
834
  }
775
835
  }
@@ -777,20 +837,20 @@ class SCMHistoryTreeKeyboardNavigationLabelProvider {
777
837
  getKeyboardNavigationLabel(element) {
778
838
  if (isSCMRepository(element)) {
779
839
  return undefined;
780
- }
781
- else if (isSCMHistoryItemViewModelTreeElement(element)) {
782
- return [element.historyItemViewModel.historyItem.message, element.historyItemViewModel.historyItem.author];
783
- }
784
- else if (isSCMHistoryItemLoadMoreTreeElement(element)) {
785
- return '';
786
- }
787
- else {
788
- throw ( new Error('Invalid tree element'));
840
+ } else if (isSCMHistoryItemViewModelTreeElement(element)) {
841
+ return [
842
+ element.historyItemViewModel.historyItem.message,
843
+ element.historyItemViewModel.historyItem.author
844
+ ];
845
+ } else if (isSCMHistoryItemLoadMoreTreeElement(element)) {
846
+ return "";
847
+ } else {
848
+ throw ( new Error("Invalid tree element"));
789
849
  }
790
850
  }
791
851
  getCompressedNodeKeyboardNavigationLabel(elements) {
792
852
  const folders = elements;
793
- return ( folders.map(e => e.name)).join('/');
853
+ return ( folders.map(e => e.name)).join("/");
794
854
  }
795
855
  }
796
856
  class SCMHistoryTreeCompressionDelegate {
@@ -817,31 +877,23 @@ class SCMHistoryTreeDataSource extends Disposable {
817
877
  children.push({
818
878
  repository,
819
879
  graphColumns: lastHistoryItem.historyItemViewModel.outputSwimlanes,
820
- type: 'historyItemLoadMore'
880
+ type: "historyItemLoadMore"
821
881
  });
822
882
  }
823
- }
824
- else if (isSCMHistoryItemViewModelTreeElement(inputOrElement)) {
883
+ } else if (isSCMHistoryItemViewModelTreeElement(inputOrElement)) {
825
884
  const historyProvider = inputOrElement.repository.provider.historyProvider.get();
826
885
  const historyItemViewModel = inputOrElement.historyItemViewModel;
827
886
  const historyItem = historyItemViewModel.historyItem;
828
887
  let historyItemId, historyItemParentId;
829
- if (historyItemViewModel.kind === 'incoming-changes' ||
830
- historyItemViewModel.kind === 'outgoing-changes') {
888
+ if (historyItemViewModel.kind === "incoming-changes" || historyItemViewModel.kind === "outgoing-changes") {
831
889
  const historyItemRef = historyProvider?.historyItemRef.get();
832
890
  const historyItemRemoteRef = historyProvider?.historyItemRemoteRef.get();
833
891
  if (!historyProvider || !historyItemRef || !historyItemRemoteRef) {
834
892
  return [];
835
893
  }
836
- historyItemId = historyItemViewModel.kind === 'incoming-changes'
837
- ? historyItemRemoteRef.id
838
- : historyItemRef.id;
839
- historyItemParentId = await historyProvider.resolveHistoryItemRefsCommonAncestor([
840
- historyItemRef.name,
841
- historyItemRemoteRef.name
842
- ]);
843
- }
844
- else {
894
+ historyItemId = historyItemViewModel.kind === "incoming-changes" ? historyItemRemoteRef.id : historyItemRef.id;
895
+ historyItemParentId = await historyProvider.resolveHistoryItemRefsCommonAncestor([historyItemRef.name, historyItemRemoteRef.name]);
896
+ } else {
845
897
  historyItemId = historyItem.id;
846
898
  if (historyItem.parentIds.length > 0) {
847
899
  if (historyItem.parentIds[0] === SCMIncomingHistoryItemId) {
@@ -850,12 +902,8 @@ class SCMHistoryTreeDataSource extends Disposable {
850
902
  if (!historyProvider || !historyItemRef || !historyItemRemoteRef) {
851
903
  return [];
852
904
  }
853
- historyItemParentId = await historyProvider.resolveHistoryItemRefsCommonAncestor([
854
- historyItemRef.name,
855
- historyItemRemoteRef.name
856
- ]);
857
- }
858
- else {
905
+ historyItemParentId = await historyProvider.resolveHistoryItemRefsCommonAncestor([historyItemRef.name, historyItemRemoteRef.name]);
906
+ } else {
859
907
  historyItemParentId = historyItem.parentIds[0];
860
908
  }
861
909
  }
@@ -867,11 +915,10 @@ class SCMHistoryTreeDataSource extends Disposable {
867
915
  historyItemViewModel: inputOrElement.historyItemViewModel,
868
916
  historyItemChange: change,
869
917
  graphColumns: inputOrElement.historyItemViewModel.outputSwimlanes,
870
- type: 'historyItemChangeViewModel'
918
+ type: "historyItemChangeViewModel"
871
919
  }))));
872
- }
873
- else if (this.viewMode() === ViewMode.Tree) {
874
- const rootUri = inputOrElement.repository.provider.rootUri ?? URI.file('/');
920
+ } else if (this.viewMode() === ViewMode.Tree) {
921
+ const rootUri = inputOrElement.repository.provider.rootUri ?? URI.file("/");
875
922
  const historyItemChangesTree = ( new ResourceTree(inputOrElement, rootUri));
876
923
  for (const change of historyItemChanges) {
877
924
  historyItemChangesTree.add(change.uri, {
@@ -879,15 +926,14 @@ class SCMHistoryTreeDataSource extends Disposable {
879
926
  historyItemViewModel: inputOrElement.historyItemViewModel,
880
927
  historyItemChange: change,
881
928
  graphColumns: inputOrElement.historyItemViewModel.outputSwimlanes,
882
- type: 'historyItemChangeViewModel'
929
+ type: "historyItemChangeViewModel"
883
930
  });
884
931
  }
885
932
  for (const node of historyItemChangesTree.root.children) {
886
933
  children.push(node.element ?? node);
887
934
  }
888
935
  }
889
- }
890
- else if (ResourceTree.isResourceNode(inputOrElement) && isSCMHistoryItemChangeNode(inputOrElement)) {
936
+ } else if (ResourceTree.isResourceNode(inputOrElement) && isSCMHistoryItemChangeNode(inputOrElement)) {
891
937
  for (const node of inputOrElement.children) {
892
938
  children.push(node.element && node.childrenCount === 0 ? node.element : node);
893
939
  }
@@ -895,9 +941,7 @@ class SCMHistoryTreeDataSource extends Disposable {
895
941
  return children;
896
942
  }
897
943
  hasChildren(inputOrElement) {
898
- return inputOrElement instanceof SCMHistoryViewModel ||
899
- isSCMHistoryItemViewModelTreeElement(inputOrElement) ||
900
- (isSCMHistoryItemChangeNode(inputOrElement) && inputOrElement.childrenCount > 0);
944
+ return inputOrElement instanceof SCMHistoryViewModel || isSCMHistoryItemViewModelTreeElement(inputOrElement) || (isSCMHistoryItemChangeNode(inputOrElement) && inputOrElement.childrenCount > 0);
901
945
  }
902
946
  }
903
947
  class SCMHistoryTreeDragAndDrop {
@@ -925,7 +969,7 @@ class SCMHistoryTreeDragAndDrop {
925
969
  onDragOver(data, targetElement, targetIndex, targetSector, originalEvent) {
926
970
  return false;
927
971
  }
928
- drop(data, targetElement, targetIndex, targetSector, originalEvent) { }
972
+ drop(data, targetElement, targetIndex, targetSector, originalEvent) {}
929
973
  _getDragAndDropData(data) {
930
974
  const historyItems = [];
931
975
  for (const element of [...(data.context ?? []), ...data.elements]) {
@@ -960,10 +1004,17 @@ class SCMHistoryTreeDragAndDrop {
960
1004
  }
961
1005
  return undefined;
962
1006
  }
963
- dispose() { }
1007
+ dispose() {}
964
1008
  }
965
1009
  let SCMHistoryViewModel = class SCMHistoryViewModel extends Disposable {
966
- constructor(_configurationService, _contextKeyService, _extensionService, _scmService, _scmViewService, _storageService) {
1010
+ constructor(
1011
+ _configurationService,
1012
+ _contextKeyService,
1013
+ _extensionService,
1014
+ _scmService,
1015
+ _scmViewService,
1016
+ _storageService
1017
+ ) {
967
1018
  super();
968
1019
  this._configurationService = _configurationService;
969
1020
  this._contextKeyService = _contextKeyService;
@@ -971,7 +1022,7 @@ let SCMHistoryViewModel = class SCMHistoryViewModel extends Disposable {
971
1022
  this._scmService = _scmService;
972
1023
  this._scmViewService = _scmViewService;
973
1024
  this._storageService = _storageService;
974
- this._selectedRepository = observableValue(this, 'auto');
1025
+ this._selectedRepository = observableValue(this, "auto");
975
1026
  this.onDidChangeHistoryItemsFilter = observableSignal(this);
976
1027
  this.isViewModelEmpty = observableValue(this, false);
977
1028
  this._repositoryState = ( new Map());
@@ -983,12 +1034,14 @@ let SCMHistoryViewModel = class SCMHistoryViewModel extends Disposable {
983
1034
  this._scmHistoryItemCountCtx = ContextKeys.SCMHistoryItemCount.bindTo(this._contextKeyService);
984
1035
  this._scmHistoryViewModeCtx = ContextKeys.SCMHistoryViewMode.bindTo(this._contextKeyService);
985
1036
  this._scmHistoryViewModeCtx.set(this.viewMode.get());
986
- const firstRepository = this._scmService.repositoryCount > 0
987
- ? constObservable(Iterable.first(this._scmService.repositories))
988
- : observableFromEvent(this, Event.once(this._scmService.onDidAddRepository), repository => repository);
1037
+ const firstRepository = this._scmService.repositoryCount > 0 ? constObservable(Iterable.first(this._scmService.repositories)) : observableFromEvent(
1038
+ this,
1039
+ Event.once(this._scmService.onDidAddRepository),
1040
+ repository => repository
1041
+ );
989
1042
  const graphRepository = derived(reader => {
990
1043
  const selectedRepository = this._selectedRepository.read(reader);
991
- if (selectedRepository !== 'auto') {
1044
+ if (selectedRepository !== "auto") {
992
1045
  return selectedRepository;
993
1046
  }
994
1047
  return this._scmViewService.activeRepository.read(reader)?.repository;
@@ -1001,7 +1054,7 @@ let SCMHistoryViewModel = class SCMHistoryViewModel extends Disposable {
1001
1054
  return;
1002
1055
  }
1003
1056
  if (this.repository.read(undefined) === repository) {
1004
- this._selectedRepository.set(Iterable.first(this._scmService.repositories) ?? 'auto', undefined);
1057
+ this._selectedRepository.set(Iterable.first(this._scmService.repositories) ?? "auto", undefined);
1005
1058
  }
1006
1059
  this._repositoryState.delete(repository);
1007
1060
  }));
@@ -1018,8 +1071,8 @@ let SCMHistoryViewModel = class SCMHistoryViewModel extends Disposable {
1018
1071
  if (!repository) {
1019
1072
  return;
1020
1073
  }
1021
- const filterState = this._repositoryFilterState.get(getProviderKey(repository.provider)) ?? 'auto';
1022
- if (filterState === 'all' || filterState === 'auto') {
1074
+ const filterState = this._repositoryFilterState.get(getProviderKey(repository.provider)) ?? "auto";
1075
+ if (filterState === "all" || filterState === "auto") {
1023
1076
  return filterState;
1024
1077
  }
1025
1078
  const repositoryState = this._repositoryState.get(repository);
@@ -1036,8 +1089,9 @@ let SCMHistoryViewModel = class SCMHistoryViewModel extends Disposable {
1036
1089
  }
1037
1090
  const historyProvider = repository?.provider.historyProvider.get();
1038
1091
  const historyItemRef = historyProvider?.historyItemRef.get();
1039
- return state.viewModels
1040
- .find(viewModel => viewModel.historyItemViewModel.historyItem.id === historyItemRef?.revision);
1092
+ return state.viewModels.find(
1093
+ viewModel => viewModel.historyItemViewModel.historyItem.id === historyItemRef?.revision
1094
+ );
1041
1095
  }
1042
1096
  loadMore(cursor) {
1043
1097
  const repository = this.repository.get();
@@ -1048,7 +1102,10 @@ let SCMHistoryViewModel = class SCMHistoryViewModel extends Disposable {
1048
1102
  if (!state) {
1049
1103
  return;
1050
1104
  }
1051
- this._repositoryState.set(repository, { ...state, loadMore: cursor ?? true });
1105
+ this._repositoryState.set(repository, {
1106
+ ...state,
1107
+ loadMore: cursor ?? true
1108
+ });
1052
1109
  }
1053
1110
  async getHistoryItems() {
1054
1111
  const repository = this.repository.get();
@@ -1062,37 +1119,43 @@ let SCMHistoryViewModel = class SCMHistoryViewModel extends Disposable {
1062
1119
  }
1063
1120
  let state = this._repositoryState.get(repository);
1064
1121
  if (!state || state.loadMore !== false) {
1065
- const historyItems = state?.viewModels
1066
- .filter(vm => vm.historyItemViewModel.kind !== 'incoming-changes' &&
1067
- vm.historyItemViewModel.kind !== 'outgoing-changes')
1068
- .map(vm => vm.historyItemViewModel.historyItem) ?? [];
1069
- const historyItemRefs = state?.historyItemsFilter ??
1070
- (await this._resolveHistoryItemFilter(repository, historyProvider));
1071
- const limit = clamp(this._configurationService.getValue('scm.graph.pageSize'), 1, 1000);
1122
+ const historyItems = state?.viewModels.filter(
1123
+ vm => vm.historyItemViewModel.kind !== "incoming-changes" && vm.historyItemViewModel.kind !== "outgoing-changes"
1124
+ ).map(vm => vm.historyItemViewModel.historyItem) ?? [];
1125
+ const historyItemRefs = state?.historyItemsFilter ?? (await this._resolveHistoryItemFilter(repository, historyProvider));
1126
+ const limit = clamp(this._configurationService.getValue("scm.graph.pageSize"), 1, 1000);
1072
1127
  const historyItemRefIds = ( historyItemRefs.map(ref => ref.revision ?? ref.id));
1073
1128
  do {
1074
1129
  historyItems.push(...((await historyProvider.provideHistoryItems({
1075
- historyItemRefs: historyItemRefIds, limit, skip: historyItems.length
1130
+ historyItemRefs: historyItemRefIds,
1131
+ limit,
1132
+ skip: historyItems.length
1076
1133
  })) ?? []));
1077
- } while (typeof state?.loadMore === 'string' && !historyItems.find(item => item.id === state?.loadMore));
1078
- const mergeBase = historyItemRef && historyItemRemoteRef && state?.mergeBase === undefined
1079
- ? await historyProvider.resolveHistoryItemRefsCommonAncestor([
1080
- historyItemRef.name,
1081
- historyItemRemoteRef.name
1082
- ])
1083
- : state?.mergeBase;
1134
+ } while (typeof state?.loadMore === "string" && !historyItems.find(item => item.id === state?.loadMore));
1135
+ const mergeBase = historyItemRef && historyItemRemoteRef && state?.mergeBase === undefined ? await historyProvider.resolveHistoryItemRefsCommonAncestor([historyItemRef.name, historyItemRemoteRef.name]) : state?.mergeBase;
1084
1136
  const colorMap = this._getGraphColorMap(historyItemRefs);
1085
- const addIncomingChangesNode = this._scmViewService.graphShowIncomingChangesConfig.get()
1086
- && ( historyItemRefs.some(ref => ref.id === historyItemRemoteRef?.id));
1087
- const addOutgoingChangesNode = this._scmViewService.graphShowOutgoingChangesConfig.get()
1088
- && ( historyItemRefs.some(ref => ref.id === historyItemRef?.id));
1089
- const viewModels = ( toISCMHistoryItemViewModelArray(historyItems, colorMap, historyProvider.historyItemRef.get(), historyProvider.historyItemRemoteRef.get(), historyProvider.historyItemBaseRef.get(), addIncomingChangesNode, addOutgoingChangesNode, mergeBase)
1090
- .map(historyItemViewModel => ({
1137
+ const addIncomingChangesNode = this._scmViewService.graphShowIncomingChangesConfig.get() && ( historyItemRefs.some(ref => ref.id === historyItemRemoteRef?.id));
1138
+ const addOutgoingChangesNode = this._scmViewService.graphShowOutgoingChangesConfig.get() && ( historyItemRefs.some(ref => ref.id === historyItemRef?.id));
1139
+ const viewModels = ( toISCMHistoryItemViewModelArray(
1140
+ historyItems,
1141
+ colorMap,
1142
+ historyProvider.historyItemRef.get(),
1143
+ historyProvider.historyItemRemoteRef.get(),
1144
+ historyProvider.historyItemBaseRef.get(),
1145
+ addIncomingChangesNode,
1146
+ addOutgoingChangesNode,
1147
+ mergeBase
1148
+ ).map(historyItemViewModel => ({
1091
1149
  repository,
1092
1150
  historyItemViewModel,
1093
- type: 'historyItemViewModel'
1151
+ type: "historyItemViewModel"
1094
1152
  })));
1095
- state = { historyItemsFilter: historyItemRefs, viewModels, mergeBase, loadMore: false };
1153
+ state = {
1154
+ historyItemsFilter: historyItemRefs,
1155
+ viewModels,
1156
+ mergeBase,
1157
+ loadMore: false
1158
+ };
1096
1159
  this._repositoryState.set(repository, state);
1097
1160
  this._scmHistoryItemCountCtx.set(viewModels.length);
1098
1161
  this.isViewModelEmpty.set(viewModels.length === 0, undefined);
@@ -1107,10 +1170,9 @@ let SCMHistoryViewModel = class SCMHistoryViewModel extends Disposable {
1107
1170
  if (!repository) {
1108
1171
  return;
1109
1172
  }
1110
- if (filter !== 'auto') {
1173
+ if (filter !== "auto") {
1111
1174
  this._repositoryFilterState.set(getProviderKey(repository.provider), filter);
1112
- }
1113
- else {
1175
+ } else {
1114
1176
  this._repositoryFilterState.delete(getProviderKey(repository.provider));
1115
1177
  }
1116
1178
  this._saveHistoryItemsFilterState();
@@ -1122,12 +1184,17 @@ let SCMHistoryViewModel = class SCMHistoryViewModel extends Disposable {
1122
1184
  }
1123
1185
  this.viewMode.set(viewMode, undefined);
1124
1186
  this._scmHistoryViewModeCtx.set(viewMode);
1125
- this._storageService.store('scm.graphView.viewMode', viewMode, StorageScope.WORKSPACE, StorageTarget.USER);
1187
+ this._storageService.store(
1188
+ "scm.graphView.viewMode",
1189
+ viewMode,
1190
+ StorageScope.WORKSPACE,
1191
+ StorageTarget.USER
1192
+ );
1126
1193
  }
1127
1194
  _getViewMode() {
1128
- let mode = this._configurationService.getValue('scm.defaultViewMode') === 'list' ? ViewMode.List : ViewMode.Tree;
1129
- const storageMode = this._storageService.get('scm.graphView.viewMode', StorageScope.WORKSPACE);
1130
- if (typeof storageMode === 'string') {
1195
+ let mode = this._configurationService.getValue("scm.defaultViewMode") === "list" ? ViewMode.List : ViewMode.Tree;
1196
+ const storageMode = this._storageService.get("scm.graphView.viewMode", StorageScope.WORKSPACE);
1197
+ if (typeof storageMode === "string") {
1131
1198
  mode = storageMode;
1132
1199
  }
1133
1200
  return mode;
@@ -1157,30 +1224,29 @@ let SCMHistoryViewModel = class SCMHistoryViewModel extends Disposable {
1157
1224
  }
1158
1225
  async _resolveHistoryItemFilter(repository, historyProvider) {
1159
1226
  const historyItemRefs = [];
1160
- const historyItemsFilter = this._repositoryFilterState.get(getProviderKey(repository.provider)) ?? 'auto';
1227
+ const historyItemsFilter = this._repositoryFilterState.get(getProviderKey(repository.provider)) ?? "auto";
1161
1228
  switch (historyItemsFilter) {
1162
- case 'all':
1163
- historyItemRefs.push(...((await historyProvider.provideHistoryItemRefs()) ?? []));
1164
- break;
1165
- case 'auto':
1166
- historyItemRefs.push(...[
1167
- historyProvider.historyItemRef.get(),
1168
- historyProvider.historyItemRemoteRef.get(),
1169
- historyProvider.historyItemBaseRef.get(),
1170
- ].filter(ref => !!ref));
1171
- break;
1172
- default: {
1173
- const refs = ((await historyProvider.provideHistoryItemRefs(historyItemsFilter)) ?? [])
1174
- .filter(ref => ( historyItemsFilter.some(filter => filter === ref.id)));
1229
+ case "all":
1230
+ historyItemRefs.push(...((await historyProvider.provideHistoryItemRefs()) ?? []));
1231
+ break;
1232
+ case "auto":
1233
+ historyItemRefs.push(...[
1234
+ historyProvider.historyItemRef.get(),
1235
+ historyProvider.historyItemRemoteRef.get(),
1236
+ historyProvider.historyItemBaseRef.get()
1237
+ ].filter(ref => !!ref));
1238
+ break;
1239
+ default:
1240
+ {
1241
+ const refs = ((await historyProvider.provideHistoryItemRefs(historyItemsFilter)) ?? []).filter(ref => ( historyItemsFilter.some(filter => filter === ref.id)));
1175
1242
  if (refs.length === 0) {
1176
1243
  historyItemRefs.push(...[
1177
1244
  historyProvider.historyItemRef.get(),
1178
1245
  historyProvider.historyItemRemoteRef.get(),
1179
- historyProvider.historyItemBaseRef.get(),
1246
+ historyProvider.historyItemBaseRef.get()
1180
1247
  ].filter(ref => !!ref));
1181
1248
  this._repositoryFilterState.delete(getProviderKey(repository.provider));
1182
- }
1183
- else {
1249
+ } else {
1184
1250
  historyItemRefs.push(...refs);
1185
1251
  this._repositoryFilterState.set(getProviderKey(repository.provider), ( refs.map(ref => ref.id)));
1186
1252
  }
@@ -1192,63 +1258,54 @@ let SCMHistoryViewModel = class SCMHistoryViewModel extends Disposable {
1192
1258
  }
1193
1259
  _loadHistoryItemsFilterState() {
1194
1260
  try {
1195
- const filterData = this._storageService.get('scm.graphView.referencesFilter', StorageScope.WORKSPACE);
1261
+ const filterData = this._storageService.get("scm.graphView.referencesFilter", StorageScope.WORKSPACE);
1196
1262
  if (filterData) {
1197
1263
  return ( new Map(JSON.parse(filterData)));
1198
1264
  }
1199
- }
1200
- catch { }
1265
+ } catch {}
1201
1266
  return ( new Map());
1202
1267
  }
1203
1268
  _saveHistoryItemsFilterState() {
1204
1269
  const filter = Array.from(this._repositoryFilterState.entries());
1205
- this._storageService.store('scm.graphView.referencesFilter', JSON.stringify(filter), StorageScope.WORKSPACE, StorageTarget.USER);
1270
+ this._storageService.store(
1271
+ "scm.graphView.referencesFilter",
1272
+ JSON.stringify(filter),
1273
+ StorageScope.WORKSPACE,
1274
+ StorageTarget.USER
1275
+ );
1206
1276
  }
1207
1277
  dispose() {
1208
1278
  this._repositoryState.clear();
1209
1279
  super.dispose();
1210
1280
  }
1211
1281
  };
1212
- SCMHistoryViewModel = ( __decorate([
1213
- ( __param(0, IConfigurationService)),
1214
- ( __param(1, IContextKeyService)),
1215
- ( __param(2, IExtensionService)),
1216
- ( __param(3, ISCMService)),
1217
- ( __param(4, ISCMViewService)),
1218
- ( __param(5, IStorageService))
1219
- ], SCMHistoryViewModel));
1282
+ SCMHistoryViewModel = ( __decorate([( __param(0, IConfigurationService)), ( __param(1, IContextKeyService)), ( __param(2, IExtensionService)), ( __param(3, ISCMService)), ( __param(4, ISCMViewService)), ( __param(5, IStorageService))], SCMHistoryViewModel));
1220
1283
  let RepositoryPicker = class RepositoryPicker {
1221
1284
  constructor(_quickInputService, _scmViewService) {
1222
1285
  this._quickInputService = _quickInputService;
1223
1286
  this._scmViewService = _scmViewService;
1224
1287
  this._autoQuickPickItem = {
1225
- label: ( localize(10591, "Auto")),
1226
- description: ( localize(10606, "Show the source control graph for the active repository")),
1227
- repository: 'auto'
1288
+ label: ( localize(10909, "Auto")),
1289
+ description: ( localize(10924, "Show the source control graph for the active repository")),
1290
+ repository: "auto"
1228
1291
  };
1229
1292
  }
1230
1293
  async pickRepository() {
1231
- const picks = [
1232
- this._autoQuickPickItem,
1233
- { type: 'separator' }
1234
- ];
1294
+ const picks = [this._autoQuickPickItem, {
1295
+ type: "separator"
1296
+ }];
1235
1297
  picks.push(...( this._scmViewService.repositories.map(r => ({
1236
1298
  label: r.provider.name,
1237
1299
  description: r.provider.rootUri?.fsPath,
1238
- iconClass: ThemeIcon.isThemeIcon(r.provider.iconPath)
1239
- ? ThemeIcon.asClassName(r.provider.iconPath)
1240
- : ThemeIcon.asClassName(Codicon.repo),
1300
+ iconClass: ThemeIcon.isThemeIcon(r.provider.iconPath) ? ThemeIcon.asClassName(r.provider.iconPath) : ThemeIcon.asClassName(Codicon.repo),
1241
1301
  repository: r
1242
1302
  }))));
1243
1303
  return this._quickInputService.pick(picks, {
1244
- placeHolder: ( localize(10607, "Select the repository to view, type to filter all repositories"))
1304
+ placeHolder: ( localize(10925, "Select the repository to view, type to filter all repositories"))
1245
1305
  });
1246
1306
  }
1247
1307
  };
1248
- RepositoryPicker = ( __decorate([
1249
- ( __param(0, IQuickInputService)),
1250
- ( __param(1, ISCMViewService))
1251
- ], RepositoryPicker));
1308
+ RepositoryPicker = ( __decorate([( __param(0, IQuickInputService)), ( __param(1, ISCMViewService))], RepositoryPicker));
1252
1309
  let HistoryItemRefPicker = class HistoryItemRefPicker extends Disposable {
1253
1310
  constructor(_historyProvider, _historyItemsFilter, _quickInputService) {
1254
1311
  super();
@@ -1256,64 +1313,67 @@ let HistoryItemRefPicker = class HistoryItemRefPicker extends Disposable {
1256
1313
  this._historyItemsFilter = _historyItemsFilter;
1257
1314
  this._quickInputService = _quickInputService;
1258
1315
  this._allQuickPickItem = {
1259
- id: 'all',
1260
- label: ( localize(10590, "All")),
1261
- description: ( localize(10593, "All history item references")),
1262
- historyItemRef: 'all'
1316
+ id: "all",
1317
+ label: ( localize(10908, "All")),
1318
+ description: ( localize(10911, "All history item references")),
1319
+ historyItemRef: "all"
1263
1320
  };
1264
1321
  this._autoQuickPickItem = {
1265
- id: 'auto',
1266
- label: ( localize(10591, "Auto")),
1267
- description: ( localize(10608, "Current history item reference(s)")),
1268
- historyItemRef: 'auto'
1322
+ id: "auto",
1323
+ label: ( localize(10909, "Auto")),
1324
+ description: ( localize(10926, "Current history item reference(s)")),
1325
+ historyItemRef: "auto"
1269
1326
  };
1270
1327
  }
1271
1328
  async pickHistoryItemRef() {
1272
- const quickPick = this._quickInputService.createQuickPick({ useSeparators: true });
1329
+ const quickPick = this._quickInputService.createQuickPick({
1330
+ useSeparators: true
1331
+ });
1273
1332
  this._store.add(quickPick);
1274
- quickPick.placeholder = ( localize(10609, "Select one/more history item references to view, type to filter"));
1333
+ quickPick.placeholder = ( localize(10927, "Select one/more history item references to view, type to filter"));
1275
1334
  quickPick.canSelectMany = true;
1276
1335
  quickPick.hideCheckAll = true;
1277
1336
  quickPick.busy = true;
1278
1337
  quickPick.show();
1279
1338
  const items = await this._createQuickPickItems();
1280
1339
  let selectedItems = [];
1281
- if (this._historyItemsFilter === 'all') {
1340
+ if (this._historyItemsFilter === "all") {
1282
1341
  selectedItems.push(this._allQuickPickItem);
1283
- }
1284
- else if (this._historyItemsFilter === 'auto') {
1342
+ } else if (this._historyItemsFilter === "auto") {
1285
1343
  selectedItems.push(this._autoQuickPickItem);
1286
- }
1287
- else {
1344
+ } else {
1288
1345
  let index = 0;
1289
1346
  while (index < items.length) {
1290
- if (items[index].type === 'separator') {
1347
+ if (items[index].type === "separator") {
1291
1348
  index++;
1292
1349
  continue;
1293
1350
  }
1294
1351
  if (( this._historyItemsFilter.some(ref => ref.id === items[index].id))) {
1295
1352
  const item = items.splice(index, 1);
1296
1353
  selectedItems.push(...item);
1297
- }
1298
- else {
1354
+ } else {
1299
1355
  index++;
1300
1356
  }
1301
1357
  }
1302
- items.splice(2, 0, { type: 'separator' }, ...selectedItems);
1358
+ items.splice(2, 0, {
1359
+ type: "separator"
1360
+ }, ...selectedItems);
1303
1361
  }
1304
1362
  quickPick.items = items;
1305
1363
  quickPick.selectedItems = selectedItems;
1306
1364
  quickPick.busy = false;
1307
1365
  return ( new Promise(resolve => {
1308
1366
  this._store.add(quickPick.onDidChangeSelection(items => {
1309
- const { added } = delta(selectedItems, items, (a, b) => compare(a.id ?? '', b.id ?? ''));
1367
+ const {
1368
+ added
1369
+ } = delta(selectedItems, items, (a, b) => compare(a.id ?? "", b.id ?? ""));
1310
1370
  if (added.length > 0) {
1311
- if (added[0].historyItemRef === 'all' || added[0].historyItemRef === 'auto') {
1371
+ if (added[0].historyItemRef === "all" || added[0].historyItemRef === "auto") {
1312
1372
  quickPick.selectedItems = [added[0]];
1313
- }
1314
- else {
1315
- quickPick.selectedItems = [...quickPick.selectedItems
1316
- .filter(i => i.historyItemRef !== 'all' && i.historyItemRef !== 'auto')];
1373
+ } else {
1374
+ quickPick.selectedItems = [
1375
+ ...quickPick.selectedItems.filter(i => i.historyItemRef !== "all" && i.historyItemRef !== "auto")
1376
+ ];
1317
1377
  }
1318
1378
  }
1319
1379
  selectedItems = [...quickPick.selectedItems];
@@ -1321,14 +1381,11 @@ let HistoryItemRefPicker = class HistoryItemRefPicker extends Disposable {
1321
1381
  this._store.add(quickPick.onDidAccept(() => {
1322
1382
  if (selectedItems.length === 0) {
1323
1383
  resolve(undefined);
1324
- }
1325
- else if (selectedItems.length === 1 && selectedItems[0].historyItemRef === 'all') {
1326
- resolve('all');
1327
- }
1328
- else if (selectedItems.length === 1 && selectedItems[0].historyItemRef === 'auto') {
1329
- resolve('auto');
1330
- }
1331
- else {
1384
+ } else if (selectedItems.length === 1 && selectedItems[0].historyItemRef === "all") {
1385
+ resolve("all");
1386
+ } else if (selectedItems.length === 1 && selectedItems[0].historyItemRef === "auto") {
1387
+ resolve("auto");
1388
+ } else {
1332
1389
  resolve(( selectedItems.map(item => item.historyItemRef.id)));
1333
1390
  }
1334
1391
  quickPick.hide();
@@ -1340,23 +1397,23 @@ let HistoryItemRefPicker = class HistoryItemRefPicker extends Disposable {
1340
1397
  }));
1341
1398
  }
1342
1399
  async _createQuickPickItems() {
1343
- const picks = [
1344
- this._allQuickPickItem, this._autoQuickPickItem
1345
- ];
1400
+ const picks = [this._allQuickPickItem, this._autoQuickPickItem];
1346
1401
  const historyItemRefs = (await this._historyProvider.provideHistoryItemRefs()) ?? [];
1347
- const historyItemRefsByCategory = groupBy$1(historyItemRefs, (a, b) => compare(a.category ?? '', b.category ?? ''));
1402
+ const historyItemRefsByCategory = groupBy$1(historyItemRefs, (a, b) => compare(a.category ?? "", b.category ?? ""));
1348
1403
  for (const refs of historyItemRefsByCategory) {
1349
1404
  if (refs.length === 0) {
1350
1405
  continue;
1351
1406
  }
1352
- picks.push({ type: 'separator', label: refs[0].category });
1407
+ picks.push({
1408
+ type: "separator",
1409
+ label: refs[0].category
1410
+ });
1353
1411
  picks.push(...( refs.map(ref => {
1354
1412
  return {
1355
1413
  id: ref.id,
1356
1414
  label: ref.name,
1357
1415
  description: ref.description,
1358
- iconClass: ThemeIcon.isThemeIcon(ref.icon) ?
1359
- ThemeIcon.asClassName(ref.icon) : undefined,
1416
+ iconClass: ThemeIcon.isThemeIcon(ref.icon) ? ThemeIcon.asClassName(ref.icon) : undefined,
1360
1417
  historyItemRef: ref
1361
1418
  };
1362
1419
  })));
@@ -1364,11 +1421,25 @@ let HistoryItemRefPicker = class HistoryItemRefPicker extends Disposable {
1364
1421
  return picks;
1365
1422
  }
1366
1423
  };
1367
- HistoryItemRefPicker = ( __decorate([
1368
- ( __param(2, IQuickInputService))
1369
- ], HistoryItemRefPicker));
1424
+ HistoryItemRefPicker = ( __decorate([( __param(2, IQuickInputService))], HistoryItemRefPicker));
1370
1425
  let SCMHistoryViewPane = class SCMHistoryViewPane extends ViewPane {
1371
- constructor(options, _editorService, _instantiationService, _menuService, _progressService, _scmViewService, configurationService, contextMenuService, keybindingService, instantiationService, viewDescriptorService, contextKeyService, openerService, themeService, hoverService) {
1426
+ constructor(
1427
+ options,
1428
+ _editorService,
1429
+ _instantiationService,
1430
+ _menuService,
1431
+ _progressService,
1432
+ _scmViewService,
1433
+ configurationService,
1434
+ contextMenuService,
1435
+ keybindingService,
1436
+ instantiationService,
1437
+ viewDescriptorService,
1438
+ contextKeyService,
1439
+ openerService,
1440
+ themeService,
1441
+ hoverService
1442
+ ) {
1372
1443
  super({
1373
1444
  ...options,
1374
1445
  titleMenuId: MenuId.SCMHistoryTitle,
@@ -1398,21 +1469,24 @@ let SCMHistoryViewPane = class SCMHistoryViewPane extends ViewPane {
1398
1469
  }
1399
1470
  renderHeaderTitle(container) {
1400
1471
  super.renderHeaderTitle(container, this.title);
1401
- const element = h('div.scm-graph-view-badge-container', [
1402
- h('div.scm-graph-view-badge.monaco-count-badge.long@badge')
1403
- ]);
1404
- element.badge.textContent = 'Outdated';
1472
+ const element = h(
1473
+ "div.scm-graph-view-badge-container",
1474
+ [h("div.scm-graph-view-badge.monaco-count-badge.long@badge")]
1475
+ );
1476
+ element.badge.textContent = "Outdated";
1405
1477
  container.appendChild(element.root);
1406
1478
  this._register(autorun(reader => {
1407
1479
  const outdated = this._repositoryOutdated.read(reader);
1408
- element.root.style.display = outdated ? '' : 'none';
1480
+ element.root.style.display = outdated ? "" : "none";
1409
1481
  if (outdated) {
1410
1482
  reader.store.add(this.hoverService.setupDelayedHover(element.root, {
1411
1483
  appearance: {
1412
1484
  compact: true,
1413
1485
  showPointer: true
1414
1486
  },
1415
- content: ( new MarkdownString(( localize(10610, "Please refresh the graph using the refresh action ($(refresh)).")), { supportThemeIcons: true })),
1487
+ content: ( new MarkdownString(( localize(10928, "Please refresh the graph using the refresh action ($(refresh)).")), {
1488
+ supportThemeIcons: true
1489
+ })),
1416
1490
  position: {
1417
1491
  hoverPosition: HoverPosition.BELOW
1418
1492
  }
@@ -1422,10 +1496,10 @@ let SCMHistoryViewPane = class SCMHistoryViewPane extends ViewPane {
1422
1496
  }
1423
1497
  renderBody(container) {
1424
1498
  super.renderBody(container);
1425
- this._treeContainer = append(container, $('.scm-view.scm-history-view.show-file-icons'));
1426
- this._treeContainer.classList.add('file-icon-themable-tree');
1499
+ this._treeContainer = append(container, $(".scm-view.scm-history-view.show-file-icons"));
1500
+ this._treeContainer.classList.add("file-icon-themable-tree");
1427
1501
  this._createTree(this._treeContainer);
1428
- this.onDidChangeBodyVisibility(async (visible) => {
1502
+ this.onDidChangeBodyVisibility(async visible => {
1429
1503
  if (!visible) {
1430
1504
  this._visibilityDisposables.clear();
1431
1505
  return;
@@ -1439,7 +1513,9 @@ let SCMHistoryViewPane = class SCMHistoryViewPane extends ViewPane {
1439
1513
  return historyItemRef !== undefined ? true : undefined;
1440
1514
  });
1441
1515
  await waitForState(firstRepositoryInitialized);
1442
- await this._progressService.withProgress({ location: this.id }, async () => {
1516
+ await this._progressService.withProgress({
1517
+ location: this.id
1518
+ }, async () => {
1443
1519
  await this._treeOperationSequencer.queue(async () => {
1444
1520
  await this._tree.setInput(this._treeViewModel);
1445
1521
  this._tree.scrollTop = 0;
@@ -1449,12 +1525,16 @@ let SCMHistoryViewPane = class SCMHistoryViewPane extends ViewPane {
1449
1525
  this._treeViewModel.isViewModelEmpty.read(reader);
1450
1526
  this._onDidChangeViewWelcomeState.fire();
1451
1527
  }));
1452
- this._visibilityDisposables.add(runOnChange(this._scmViewService.graphShowIncomingChangesConfig, async () => {
1453
- await this.refresh();
1454
- }));
1455
- this._visibilityDisposables.add(runOnChange(this._scmViewService.graphShowOutgoingChangesConfig, async () => {
1456
- await this.refresh();
1457
- }));
1528
+ this._visibilityDisposables.add(
1529
+ runOnChange(this._scmViewService.graphShowIncomingChangesConfig, async () => {
1530
+ await this.refresh();
1531
+ })
1532
+ );
1533
+ this._visibilityDisposables.add(
1534
+ runOnChange(this._scmViewService.graphShowOutgoingChangesConfig, async () => {
1535
+ await this.refresh();
1536
+ })
1537
+ );
1458
1538
  let isFirstRun = true;
1459
1539
  this._visibilityDisposables.add(autorun(reader => {
1460
1540
  const repository = this._treeViewModel.repository.read(reader);
@@ -1465,7 +1545,7 @@ let SCMHistoryViewPane = class SCMHistoryViewPane extends ViewPane {
1465
1545
  const historyItemRefId = derived(reader => {
1466
1546
  return historyProvider.historyItemRef.read(reader)?.id;
1467
1547
  });
1468
- reader.store.add(runOnChange(historyItemRefId, async (historyItemRefIdValue) => {
1548
+ reader.store.add(runOnChange(historyItemRefId, async historyItemRefIdValue => {
1469
1549
  await this.refresh();
1470
1550
  this._scmCurrentHistoryItemRefInFilter.set(this._isCurrentHistoryItemInFilter(historyItemRefIdValue));
1471
1551
  }));
@@ -1480,10 +1560,12 @@ let SCMHistoryViewPane = class SCMHistoryViewPane extends ViewPane {
1480
1560
  }
1481
1561
  this.refresh();
1482
1562
  }));
1483
- reader.store.add(runOnChange(this._treeViewModel.onDidChangeHistoryItemsFilter, async () => {
1484
- await this.refresh();
1485
- this._scmCurrentHistoryItemRefInFilter.set(this._isCurrentHistoryItemInFilter(historyItemRefId.read(undefined)));
1486
- }));
1563
+ reader.store.add(
1564
+ runOnChange(this._treeViewModel.onDidChangeHistoryItemsFilter, async () => {
1565
+ await this.refresh();
1566
+ this._scmCurrentHistoryItemRefInFilter.set(this._isCurrentHistoryItemInFilter(historyItemRefId.read(undefined)));
1567
+ })
1568
+ );
1487
1569
  reader.store.add(autorun(reader => {
1488
1570
  this._scmCurrentHistoryItemRefHasRemote.set(!!historyProvider.historyItemRemoteRef.read(reader));
1489
1571
  }));
@@ -1500,7 +1582,10 @@ let SCMHistoryViewPane = class SCMHistoryViewPane extends ViewPane {
1500
1582
  }
1501
1583
  isFirstRun = false;
1502
1584
  }));
1503
- const fileIconThemeObs = observableFromEvent(this.themeService.onDidFileIconThemeChange, () => this.themeService.getFileIconTheme());
1585
+ const fileIconThemeObs = observableFromEvent(
1586
+ this.themeService.onDidFileIconThemeChange,
1587
+ () => this.themeService.getFileIconTheme()
1588
+ );
1504
1589
  this._visibilityDisposables.add(autorun(reader => {
1505
1590
  const fileIconTheme = fileIconThemeObs.read(reader);
1506
1591
  const viewMode = this._treeViewModel.viewMode.read(reader);
@@ -1524,8 +1609,7 @@ let SCMHistoryViewPane = class SCMHistoryViewPane extends ViewPane {
1524
1609
  if (repository) {
1525
1610
  return ( new SCMRepositoryActionViewItem(repository, action, options));
1526
1611
  }
1527
- }
1528
- else if (action.id === PICK_HISTORY_ITEM_REFS_ACTION_ID) {
1612
+ } else if (action.id === PICK_HISTORY_ITEM_REFS_ACTION_ID) {
1529
1613
  const repository = this._treeViewModel?.repository.get();
1530
1614
  const historyItemsFilter = this._treeViewModel?.getHistoryItemsFilter();
1531
1615
  if (repository && historyItemsFilter) {
@@ -1536,7 +1620,7 @@ let SCMHistoryViewPane = class SCMHistoryViewPane extends ViewPane {
1536
1620
  }
1537
1621
  focus() {
1538
1622
  super.focus();
1539
- const fakeKeyboardEvent = ( new KeyboardEvent('keydown'));
1623
+ const fakeKeyboardEvent = ( new KeyboardEvent("keydown"));
1540
1624
  this._tree.focusFirst(fakeKeyboardEvent);
1541
1625
  this._tree.domFocus();
1542
1626
  }
@@ -1610,30 +1694,46 @@ let SCMHistoryViewPane = class SCMHistoryViewPane extends ViewPane {
1610
1694
  }
1611
1695
  _createTree(container) {
1612
1696
  this._treeIdentityProvider = ( new SCMHistoryTreeIdentityProvider());
1613
- const resourceLabels = this.instantiationService.createInstance(ResourceLabels, { onDidChangeVisibility: this.onDidChangeBodyVisibility });
1697
+ const resourceLabels = this.instantiationService.createInstance(ResourceLabels, {
1698
+ onDidChangeVisibility: this.onDidChangeBodyVisibility
1699
+ });
1614
1700
  this._register(resourceLabels);
1615
1701
  this._treeDataSource = this.instantiationService.createInstance(SCMHistoryTreeDataSource, () => this._treeViewModel.viewMode.get());
1616
1702
  this._register(this._treeDataSource);
1617
- const compressionEnabled = observableConfigValue('scm.compactFolders', true, this.configurationService);
1618
- this._tree = this.instantiationService.createInstance(WorkbenchCompressibleAsyncDataTree, 'SCM History Tree', container, ( new ListDelegate()), ( new SCMHistoryTreeCompressionDelegate()), [
1619
- this.instantiationService.createInstance(HistoryItemRenderer, this.viewDescriptorService.getViewLocationById(this.id)),
1620
- this.instantiationService.createInstance(HistoryItemChangeRenderer, () => this._treeViewModel.viewMode.get(), resourceLabels),
1621
- this.instantiationService.createInstance(HistoryItemLoadMoreRenderer, this._repositoryIsLoadingMore, () => this._loadMore()),
1622
- ], this._treeDataSource, {
1623
- accessibilityProvider: ( new SCMHistoryTreeAccessibilityProvider()),
1624
- identityProvider: this._treeIdentityProvider,
1625
- collapseByDefault: (e) => !isSCMHistoryItemChangeNode(e),
1626
- compressionEnabled: compressionEnabled.get(),
1627
- dnd: ( new SCMHistoryTreeDragAndDrop()),
1628
- keyboardNavigationLabelProvider: ( new SCMHistoryTreeKeyboardNavigationLabelProvider()),
1629
- horizontalScrolling: false,
1630
- multipleSelectionSupport: false,
1631
- twistieAdditionalCssClass: (e) => {
1632
- return isSCMHistoryItemViewModelTreeElement(e) || isSCMHistoryItemLoadMoreTreeElement(e)
1633
- ? 'force-no-twistie'
1634
- : undefined;
1703
+ const compressionEnabled = observableConfigValue("scm.compactFolders", true, this.configurationService);
1704
+ this._tree = this.instantiationService.createInstance(
1705
+ WorkbenchCompressibleAsyncDataTree,
1706
+ "SCM History Tree",
1707
+ container,
1708
+ ( new ListDelegate()),
1709
+ ( new SCMHistoryTreeCompressionDelegate()),
1710
+ [this.instantiationService.createInstance(
1711
+ HistoryItemRenderer,
1712
+ this.viewDescriptorService.getViewLocationById(this.id)
1713
+ ), this.instantiationService.createInstance(
1714
+ HistoryItemChangeRenderer,
1715
+ () => this._treeViewModel.viewMode.get(),
1716
+ resourceLabels
1717
+ ), this.instantiationService.createInstance(
1718
+ HistoryItemLoadMoreRenderer,
1719
+ this._repositoryIsLoadingMore,
1720
+ () => this._loadMore()
1721
+ )],
1722
+ this._treeDataSource,
1723
+ {
1724
+ accessibilityProvider: ( new SCMHistoryTreeAccessibilityProvider()),
1725
+ identityProvider: this._treeIdentityProvider,
1726
+ collapseByDefault: e => !isSCMHistoryItemChangeNode(e),
1727
+ compressionEnabled: compressionEnabled.get(),
1728
+ dnd: ( new SCMHistoryTreeDragAndDrop()),
1729
+ keyboardNavigationLabelProvider: ( new SCMHistoryTreeKeyboardNavigationLabelProvider()),
1730
+ horizontalScrolling: false,
1731
+ multipleSelectionSupport: false,
1732
+ twistieAdditionalCssClass: e => {
1733
+ return isSCMHistoryItemViewModelTreeElement(e) || isSCMHistoryItemLoadMoreTreeElement(e) ? "force-no-twistie" : undefined;
1734
+ }
1635
1735
  }
1636
- });
1736
+ );
1637
1737
  this._register(this._tree);
1638
1738
  this._tree.onDidOpen(this._onDidOpen, this, this._store);
1639
1739
  this._tree.onContextMenu(this._onContextMenu, this, this._store);
@@ -1643,7 +1743,7 @@ let SCMHistoryViewPane = class SCMHistoryViewPane extends ViewPane {
1643
1743
  return false;
1644
1744
  }
1645
1745
  const historyItemFilter = this._treeViewModel.getHistoryItemsFilter();
1646
- if (historyItemFilter === 'all' || historyItemFilter === 'auto') {
1746
+ if (historyItemFilter === "all" || historyItemFilter === "auto") {
1647
1747
  return true;
1648
1748
  }
1649
1749
  return Array.isArray(historyItemFilter) && !!historyItemFilter.find(ref => ref.id === historyItemRefId);
@@ -1651,47 +1751,41 @@ let SCMHistoryViewPane = class SCMHistoryViewPane extends ViewPane {
1651
1751
  async _onDidOpen(e) {
1652
1752
  if (!e.element) {
1653
1753
  return;
1654
- }
1655
- else if (isSCMHistoryItemChangeViewModelTreeElement(e.element)) {
1754
+ } else if (isSCMHistoryItemChangeViewModelTreeElement(e.element)) {
1656
1755
  const historyItemChange = e.element.historyItemChange;
1657
1756
  const historyItem = e.element.historyItemViewModel.historyItem;
1658
- const historyItemDisplayId = historyItem.id === SCMIncomingHistoryItemId
1659
- ? ( localize(10602, "Incoming Changes"))
1660
- : historyItem.id === SCMOutgoingHistoryItemId
1661
- ? ( localize(10603, "Outgoing Changes"))
1662
- : historyItem.displayId ?? historyItem.id;
1757
+ const historyItemDisplayId = historyItem.id === SCMIncomingHistoryItemId ? ( localize(10920, "Incoming Changes")) : historyItem.id === SCMOutgoingHistoryItemId ? ( localize(10921, "Outgoing Changes")) : historyItem.displayId ?? historyItem.id;
1663
1758
  const historyItemParentId = historyItem.parentIds.length > 0 ? historyItem.parentIds[0] : undefined;
1664
- const historyItemParentDisplayId = historyItemParentId && historyItem.displayId
1665
- ? historyItemParentId.substring(0, historyItem.displayId.length)
1666
- : historyItemParentId;
1759
+ const historyItemParentDisplayId = historyItemParentId && historyItem.displayId ? historyItemParentId.substring(0, historyItem.displayId.length) : historyItemParentId;
1667
1760
  if (historyItemChange.originalUri && historyItemChange.modifiedUri) {
1668
1761
  const originalUriTitle = `${basename(historyItemChange.originalUri.fsPath)} (${historyItemParentDisplayId})`;
1669
1762
  const modifiedUriTitle = `${basename(historyItemChange.modifiedUri.fsPath)} (${historyItemDisplayId})`;
1670
1763
  const title = `${originalUriTitle} \u2194 ${modifiedUriTitle}`;
1671
1764
  await this._editorService.openEditor({
1672
1765
  label: title,
1673
- original: { resource: historyItemChange.originalUri },
1674
- modified: { resource: historyItemChange.modifiedUri },
1766
+ original: {
1767
+ resource: historyItemChange.originalUri
1768
+ },
1769
+ modified: {
1770
+ resource: historyItemChange.modifiedUri
1771
+ },
1675
1772
  options: e.editorOptions
1676
1773
  });
1677
- }
1678
- else if (historyItemChange.modifiedUri) {
1774
+ } else if (historyItemChange.modifiedUri) {
1679
1775
  await this._editorService.openEditor({
1680
1776
  label: `${basename(historyItemChange.modifiedUri.fsPath)} (${historyItemDisplayId})`,
1681
1777
  resource: historyItemChange.modifiedUri,
1682
1778
  options: e.editorOptions
1683
1779
  });
1684
- }
1685
- else if (historyItemChange.originalUri) {
1780
+ } else if (historyItemChange.originalUri) {
1686
1781
  await this._editorService.openEditor({
1687
1782
  label: `${basename(historyItemChange.originalUri.fsPath)} (${historyItemParentDisplayId})`,
1688
1783
  resource: historyItemChange.originalUri,
1689
1784
  options: e.editorOptions
1690
1785
  });
1691
1786
  }
1692
- }
1693
- else if (isSCMHistoryItemLoadMoreTreeElement(e.element)) {
1694
- const pageOnScroll = this.configurationService.getValue('scm.graph.pageOnScroll') === true;
1787
+ } else if (isSCMHistoryItemLoadMoreTreeElement(e.element)) {
1788
+ const pageOnScroll = this.configurationService.getValue("scm.graph.pageOnScroll") === true;
1695
1789
  if (!pageOnScroll) {
1696
1790
  this._loadMore();
1697
1791
  this._tree.setSelection([]);
@@ -1701,7 +1795,7 @@ let SCMHistoryViewPane = class SCMHistoryViewPane extends ViewPane {
1701
1795
  _onContextMenu(e) {
1702
1796
  const element = e.element;
1703
1797
  if (isSCMHistoryItemViewModelTreeElement(element)) {
1704
- if (element.historyItemViewModel.kind === 'incoming-changes' || element.historyItemViewModel.kind === 'outgoing-changes') {
1798
+ if (element.historyItemViewModel.kind === "incoming-changes" || element.historyItemViewModel.kind === "outgoing-changes") {
1705
1799
  return;
1706
1800
  }
1707
1801
  this._contextMenuDisposables.value = ( new DisposableStore());
@@ -1712,9 +1806,7 @@ let SCMHistoryViewPane = class SCMHistoryViewPane extends ViewPane {
1712
1806
  if (historyItemRefMenuItems.length > 0 && element.historyItemViewModel.historyItem.references?.length) {
1713
1807
  const historyItemRefActions = ( new Map());
1714
1808
  for (const ref of element.historyItemViewModel.historyItem.references) {
1715
- const contextKeyService = this.scopedContextKeyService.createOverlay([
1716
- ['scmHistoryItemRef', ref.id]
1717
- ]);
1809
+ const contextKeyService = this.scopedContextKeyService.createOverlay([["scmHistoryItemRef", ref.id]]);
1718
1810
  const menuActions = this._menuService.getMenuActions(MenuId.SCMHistoryItemRefContext, contextKeyService);
1719
1811
  for (const action of menuActions.flatMap(a => a[1])) {
1720
1812
  if (!( historyItemRefActions.has(action.id))) {
@@ -1754,25 +1846,25 @@ let SCMHistoryViewPane = class SCMHistoryViewPane extends ViewPane {
1754
1846
  }
1755
1847
  }
1756
1848
  }
1757
- const contextKeyService = this.scopedContextKeyService.createOverlay([
1758
- ['scmHistoryItemHasCurrentHistoryItemRef', historyItem.references?.find(ref => ref.id === historyItemRef?.id) !== undefined]
1759
- ]);
1849
+ const contextKeyService = this.scopedContextKeyService.createOverlay([[
1850
+ "scmHistoryItemHasCurrentHistoryItemRef",
1851
+ historyItem.references?.find(ref => ref.id === historyItemRef?.id) !== undefined
1852
+ ]]);
1760
1853
  const menuActions = this._menuService.getMenuActions(MenuId.SCMHistoryItemContext, contextKeyService, {
1761
1854
  arg: element.repository.provider,
1762
1855
  shouldForwardArgs: true
1763
- }).filter(group => group[0] !== 'inline');
1856
+ }).filter(group => group[0] !== "inline");
1764
1857
  this.contextMenuService.showContextMenu({
1765
1858
  contextKeyService: this.scopedContextKeyService,
1766
1859
  getAnchor: () => e.anchor,
1767
1860
  getActions: () => getFlatContextMenuActions(menuActions),
1768
1861
  getActionsContext: () => element.historyItemViewModel.historyItem
1769
1862
  });
1770
- }
1771
- else if (isSCMHistoryItemChangeViewModelTreeElement(element)) {
1863
+ } else if (isSCMHistoryItemChangeViewModelTreeElement(element)) {
1772
1864
  const menuActions = this._menuService.getMenuActions(MenuId.SCMHistoryItemChangeContext, this.scopedContextKeyService, {
1773
1865
  arg: element.historyItemViewModel.historyItem,
1774
1866
  shouldForwardArgs: true
1775
- }).filter(group => group[0] !== 'inline');
1867
+ }).filter(group => group[0] !== "inline");
1776
1868
  this.contextMenuService.showContextMenu({
1777
1869
  contextKeyService: this.scopedContextKeyService,
1778
1870
  getAnchor: () => e.anchor,
@@ -1794,17 +1886,25 @@ let SCMHistoryViewPane = class SCMHistoryViewPane extends ViewPane {
1794
1886
  }
1795
1887
  _updateChildren() {
1796
1888
  return this._updateChildrenThrottler.queue(() => this._treeOperationSequencer.queue(async () => {
1797
- await this._progressService.withProgress({ location: this.id, delay: 100 }, async () => {
1798
- await this._tree.updateChildren(undefined, undefined, undefined, {
1799
- });
1889
+ await this._progressService.withProgress({
1890
+ location: this.id,
1891
+ delay: 100
1892
+ }, async () => {
1893
+ await this._tree.updateChildren(undefined, undefined, undefined, {});
1800
1894
  });
1801
1895
  }));
1802
1896
  }
1803
1897
  _updateIndentStyles(theme, viewMode) {
1804
- this._treeContainer.classList.toggle('list-view-mode', viewMode === ViewMode.List);
1805
- this._treeContainer.classList.toggle('tree-view-mode', viewMode === ViewMode.Tree);
1806
- this._treeContainer.classList.toggle('align-icons-and-twisties', (viewMode === ViewMode.List && theme.hasFileIcons) || (theme.hasFileIcons && !theme.hasFolderIcons));
1807
- this._treeContainer.classList.toggle('hide-arrows', viewMode === ViewMode.Tree && theme.hidesExplorerArrows === true);
1898
+ this._treeContainer.classList.toggle("list-view-mode", viewMode === ViewMode.List);
1899
+ this._treeContainer.classList.toggle("tree-view-mode", viewMode === ViewMode.Tree);
1900
+ this._treeContainer.classList.toggle(
1901
+ "align-icons-and-twisties",
1902
+ (viewMode === ViewMode.List && theme.hasFileIcons) || (theme.hasFileIcons && !theme.hasFolderIcons)
1903
+ );
1904
+ this._treeContainer.classList.toggle(
1905
+ "hide-arrows",
1906
+ viewMode === ViewMode.Tree && theme.hidesExplorerArrows === true
1907
+ );
1808
1908
  }
1809
1909
  dispose() {
1810
1910
  this._contextMenuDisposables.dispose();
@@ -1812,21 +1912,6 @@ let SCMHistoryViewPane = class SCMHistoryViewPane extends ViewPane {
1812
1912
  super.dispose();
1813
1913
  }
1814
1914
  };
1815
- SCMHistoryViewPane = ( __decorate([
1816
- ( __param(1, IEditorService)),
1817
- ( __param(2, IInstantiationService)),
1818
- ( __param(3, IMenuService)),
1819
- ( __param(4, IProgressService)),
1820
- ( __param(5, ISCMViewService)),
1821
- ( __param(6, IConfigurationService)),
1822
- ( __param(7, IContextMenuService)),
1823
- ( __param(8, IKeybindingService)),
1824
- ( __param(9, IInstantiationService)),
1825
- ( __param(10, IViewDescriptorService)),
1826
- ( __param(11, IContextKeyService)),
1827
- ( __param(12, IOpenerService)),
1828
- ( __param(13, IThemeService)),
1829
- ( __param(14, IHoverService))
1830
- ], SCMHistoryViewPane));
1915
+ SCMHistoryViewPane = ( __decorate([( __param(1, IEditorService)), ( __param(2, IInstantiationService)), ( __param(3, IMenuService)), ( __param(4, IProgressService)), ( __param(5, ISCMViewService)), ( __param(6, IConfigurationService)), ( __param(7, IContextMenuService)), ( __param(8, IKeybindingService)), ( __param(9, IInstantiationService)), ( __param(10, IViewDescriptorService)), ( __param(11, IContextKeyService)), ( __param(12, IOpenerService)), ( __param(13, IThemeService)), ( __param(14, IHoverService))], SCMHistoryViewPane));
1831
1916
 
1832
1917
  export { SCMHistoryViewPane };