@codingame/monaco-vscode-scm-service-override 23.2.2 → 24.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (23) hide show
  1. package/package.json +2 -14
  2. package/vscode/src/vs/workbench/contrib/scm/browser/activity.js +7 -7
  3. package/vscode/src/vs/workbench/contrib/scm/browser/media/scm.css +44 -23
  4. package/vscode/src/vs/workbench/contrib/scm/browser/menus.js +1 -1
  5. package/vscode/src/vs/workbench/contrib/scm/browser/quickDiffDecorator.js +4 -4
  6. package/vscode/src/vs/workbench/contrib/scm/browser/quickDiffModel.d.ts +1 -1
  7. package/vscode/src/vs/workbench/contrib/scm/browser/quickDiffModel.js +2 -2
  8. package/vscode/src/vs/workbench/contrib/scm/browser/quickDiffWidget.d.ts +1 -1
  9. package/vscode/src/vs/workbench/contrib/scm/browser/quickDiffWidget.js +14 -14
  10. package/vscode/src/vs/workbench/contrib/scm/browser/scm.contribution.js +94 -94
  11. package/vscode/src/vs/workbench/contrib/scm/browser/scmAccessibilityHelp.js +23 -23
  12. package/vscode/src/vs/workbench/contrib/scm/browser/scmHistoryViewPane.d.ts +1 -1
  13. package/vscode/src/vs/workbench/contrib/scm/browser/scmHistoryViewPane.js +151 -110
  14. package/vscode/src/vs/workbench/contrib/scm/browser/scmRepositoriesViewPane.d.ts +9 -2
  15. package/vscode/src/vs/workbench/contrib/scm/browser/scmRepositoriesViewPane.js +139 -50
  16. package/vscode/src/vs/workbench/contrib/scm/browser/scmRepositoryRenderer.js +2 -5
  17. package/vscode/src/vs/workbench/contrib/scm/browser/scmViewPane.d.ts +2 -2
  18. package/vscode/src/vs/workbench/contrib/scm/browser/scmViewPane.js +71 -47
  19. package/vscode/src/vs/workbench/contrib/scm/browser/scmViewPaneContainer.d.ts +1 -1
  20. package/vscode/src/vs/workbench/contrib/scm/browser/scmViewPaneContainer.js +1 -1
  21. package/vscode/src/vs/workbench/contrib/scm/browser/scmViewService.d.ts +2 -2
  22. package/vscode/src/vs/workbench/contrib/scm/browser/scmViewService.js +13 -19
  23. package/vscode/src/vs/workbench/contrib/scm/browser/workingSet.js +1 -1
@@ -3,7 +3,7 @@ import { registerCss } from '@codingame/monaco-vscode-api/css';
3
3
  import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
4
4
  import * as scm from './media/scm.css';
5
5
  import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
6
- import { ViewPane } from '@codingame/monaco-vscode-501b06ab-3f58-516b-8a1a-c29d375d3da4-common/vscode/vs/workbench/browser/parts/views/viewPane';
6
+ import { ViewPane } from '@codingame/monaco-vscode-api/vscode/vs/workbench/browser/parts/views/viewPane';
7
7
  import { append, $ } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
8
8
  import { WorkbenchCompressibleAsyncDataTree } from '@codingame/monaco-vscode-api/vscode/vs/platform/list/browser/listService';
9
9
  import { ISCMViewService, ISCMService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/scm/common/scm.service';
@@ -17,7 +17,7 @@ import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/pl
17
17
  import { IViewDescriptorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/views.service';
18
18
  import { IOpenerService } from '@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service';
19
19
  import { RepositoryRenderer, RepositoryActionRunner } from './scmRepositoryRenderer.js';
20
- import { isSCMRepository, isSCMArtifactGroupTreeElement, isSCMArtifactTreeElement, isSCMArtifactNode, connectPrimaryMenu, getActionViewItemProvider, collectContextMenuActions } from '@codingame/monaco-vscode-bc6f260d-ec63-5c95-9446-1ca7d0872719-common/vscode/vs/workbench/contrib/scm/browser/util';
20
+ import { isSCMRepository, isSCMArtifactGroupTreeElement, isSCMArtifactTreeElement, isSCMArtifactNode, connectPrimaryMenu, getActionViewItemProvider, collectContextMenuActions } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/scm/browser/util';
21
21
  import { Orientation } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/sash/sash';
22
22
  import { Iterable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/iterator';
23
23
  import { MenuId } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
@@ -32,10 +32,13 @@ import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/th
32
32
  import { WorkbenchToolBar } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/browser/toolbar';
33
33
  import { ITelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service';
34
34
  import { ICommandService } from '@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service';
35
- import { ResourceTree } from '@codingame/monaco-vscode-bc6f260d-ec63-5c95-9446-1ca7d0872719-common/vscode/vs/base/common/resourceTree';
35
+ import { ResourceTree } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resourceTree';
36
36
  import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
37
37
  import { basename } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
38
38
  import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
39
+ import { StorageScope, StorageTarget } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage';
40
+ import { IStorageService } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service';
41
+ import { fromNow } from '@codingame/monaco-vscode-api/vscode/vs/base/common/date';
39
42
  import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
40
43
  import { runOnChange } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/utils/runOnChange';
41
44
  import { observableSignalFromEvent } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableSignalFromEvent';
@@ -65,7 +68,8 @@ let ArtifactGroupRenderer = class ArtifactGroupRenderer {
65
68
  static { ArtifactGroupRenderer_1 = this; }
66
69
  static { this.TEMPLATE_ID = 'artifactGroup'; }
67
70
  get templateId() { return ArtifactGroupRenderer_1.TEMPLATE_ID; }
68
- constructor(_contextMenuService, _contextKeyService, _keybindingService, _menuService, _commandService, _scmViewService, _telemetryService) {
71
+ constructor(actionViewItemProvider, _contextMenuService, _contextKeyService, _keybindingService, _menuService, _commandService, _scmViewService, _telemetryService) {
72
+ this.actionViewItemProvider = actionViewItemProvider;
69
73
  this._contextMenuService = _contextMenuService;
70
74
  this._contextKeyService = _contextKeyService;
71
75
  this._keybindingService = _keybindingService;
@@ -81,7 +85,7 @@ let ArtifactGroupRenderer = class ArtifactGroupRenderer {
81
85
  const actionsContainer = append(element, $('.actions'));
82
86
  const actionBar = ( new WorkbenchToolBar(
83
87
  actionsContainer,
84
- undefined,
88
+ { actionViewItemProvider: this.actionViewItemProvider },
85
89
  this._menuService,
86
90
  this._contextKeyService,
87
91
  this._contextMenuService,
@@ -116,19 +120,20 @@ let ArtifactGroupRenderer = class ArtifactGroupRenderer {
116
120
  }
117
121
  };
118
122
  ArtifactGroupRenderer = ArtifactGroupRenderer_1 = ( __decorate([
119
- ( __param(0, IContextMenuService)),
120
- ( __param(1, IContextKeyService)),
121
- ( __param(2, IKeybindingService)),
122
- ( __param(3, IMenuService)),
123
- ( __param(4, ICommandService)),
124
- ( __param(5, ISCMViewService)),
125
- ( __param(6, ITelemetryService))
123
+ ( __param(1, IContextMenuService)),
124
+ ( __param(2, IContextKeyService)),
125
+ ( __param(3, IKeybindingService)),
126
+ ( __param(4, IMenuService)),
127
+ ( __param(5, ICommandService)),
128
+ ( __param(6, ISCMViewService)),
129
+ ( __param(7, ITelemetryService))
126
130
  ], ArtifactGroupRenderer));
127
131
  let ArtifactRenderer = class ArtifactRenderer {
128
132
  static { ArtifactRenderer_1 = this; }
129
133
  static { this.TEMPLATE_ID = 'artifact'; }
130
134
  get templateId() { return ArtifactRenderer_1.TEMPLATE_ID; }
131
- constructor(_contextMenuService, _contextKeyService, _keybindingService, _menuService, _commandService, _scmViewService, _telemetryService) {
135
+ constructor(actionViewItemProvider, _contextMenuService, _contextKeyService, _keybindingService, _menuService, _commandService, _scmViewService, _telemetryService) {
136
+ this.actionViewItemProvider = actionViewItemProvider;
132
137
  this._contextMenuService = _contextMenuService;
133
138
  this._contextKeyService = _contextKeyService;
134
139
  this._keybindingService = _keybindingService;
@@ -141,10 +146,12 @@ let ArtifactRenderer = class ArtifactRenderer {
141
146
  const element = append(container, $('.scm-artifact'));
142
147
  const icon = append(element, $('.icon'));
143
148
  const label = ( new IconLabel(element, { supportIcons: false }));
149
+ const timestampContainer = append(element, $('.timestamp-container'));
150
+ const timestamp = append(timestampContainer, $('.timestamp'));
144
151
  const actionsContainer = append(element, $('.actions'));
145
152
  const actionBar = ( new WorkbenchToolBar(
146
153
  actionsContainer,
147
- undefined,
154
+ { actionViewItemProvider: this.actionViewItemProvider },
148
155
  this._menuService,
149
156
  this._contextKeyService,
150
157
  this._contextMenuService,
@@ -152,22 +159,31 @@ let ArtifactRenderer = class ArtifactRenderer {
152
159
  this._commandService,
153
160
  this._telemetryService
154
161
  ));
155
- return { icon, label, actionBar, elementDisposables: ( new DisposableStore()), templateDisposable: combinedDisposable(label, actionBar) };
162
+ return { icon, label, timestampContainer, timestamp, actionBar, elementDisposables: ( new DisposableStore()), templateDisposable: combinedDisposable(label, actionBar) };
156
163
  }
157
164
  renderElement(nodeOrElement, index, templateData) {
158
165
  const artifactOrFolder = nodeOrElement.element;
159
166
  if (isSCMArtifactTreeElement(artifactOrFolder)) {
167
+ const artifactGroup = artifactOrFolder.group;
160
168
  const artifact = artifactOrFolder.artifact;
161
169
  const artifactIcon = artifact.icon ?? artifactOrFolder.group.icon;
162
170
  templateData.icon.className = ThemeIcon.isThemeIcon(artifactIcon)
163
171
  ? `icon ${ThemeIcon.asClassName(artifactIcon)}`
164
172
  : '';
165
- const artifactLabel = artifact.name.split('/').pop() ?? artifact.name;
173
+ const artifactLabel = artifactGroup.supportsFolders
174
+ ? artifact.name.split('/').pop() ?? artifact.name
175
+ : artifact.name;
166
176
  templateData.label.setLabel(artifactLabel, artifact.description);
177
+ templateData.timestamp.textContent = artifact.timestamp ? fromNow(artifact.timestamp) : '';
178
+ templateData.timestampContainer.classList.toggle('duplicate', artifactOrFolder.hideTimestamp);
179
+ templateData.timestampContainer.style.display = '';
167
180
  }
168
181
  else if (isSCMArtifactNode(artifactOrFolder)) {
169
182
  templateData.icon.className = `icon ${ThemeIcon.asClassName(Codicon.folder)}`;
170
183
  templateData.label.setLabel(basename(artifactOrFolder.uri));
184
+ templateData.timestamp.textContent = '';
185
+ templateData.timestampContainer.classList.remove('duplicate');
186
+ templateData.timestampContainer.style.display = 'none';
171
187
  }
172
188
  this._renderActionBar(artifactOrFolder, templateData);
173
189
  }
@@ -181,10 +197,16 @@ let ArtifactRenderer = class ArtifactRenderer {
181
197
  ? `icon ${ThemeIcon.asClassName(artifactIcon)}`
182
198
  : '';
183
199
  templateData.label.setLabel(artifact.name, artifact.description);
200
+ templateData.timestamp.textContent = artifact.timestamp ? fromNow(artifact.timestamp) : '';
201
+ templateData.timestampContainer.classList.toggle('duplicate', artifactOrFolder.hideTimestamp);
202
+ templateData.timestampContainer.style.display = '';
184
203
  }
185
204
  else if (isSCMArtifactNode(artifactOrFolder)) {
186
205
  templateData.icon.className = `icon ${ThemeIcon.asClassName(Codicon.folder)}`;
187
206
  templateData.label.setLabel(artifactOrFolder.uri.fsPath.substring(1));
207
+ templateData.timestamp.textContent = '';
208
+ templateData.timestampContainer.classList.remove('duplicate');
209
+ templateData.timestampContainer.style.display = 'none';
188
210
  }
189
211
  this._renderActionBar(artifactOrFolder, templateData);
190
212
  }
@@ -212,13 +234,13 @@ let ArtifactRenderer = class ArtifactRenderer {
212
234
  }
213
235
  };
214
236
  ArtifactRenderer = ArtifactRenderer_1 = ( __decorate([
215
- ( __param(0, IContextMenuService)),
216
- ( __param(1, IContextKeyService)),
217
- ( __param(2, IKeybindingService)),
218
- ( __param(3, IMenuService)),
219
- ( __param(4, ICommandService)),
220
- ( __param(5, ISCMViewService)),
221
- ( __param(6, ITelemetryService))
237
+ ( __param(1, IContextMenuService)),
238
+ ( __param(2, IContextKeyService)),
239
+ ( __param(3, IKeybindingService)),
240
+ ( __param(4, IMenuService)),
241
+ ( __param(5, ICommandService)),
242
+ ( __param(6, ISCMViewService)),
243
+ ( __param(7, ITelemetryService))
222
244
  ], ArtifactRenderer));
223
245
  let RepositoryTreeDataSource = class RepositoryTreeDataSource extends Disposable {
224
246
  constructor(scmViewService) {
@@ -261,18 +283,43 @@ let RepositoryTreeDataSource = class RepositoryTreeDataSource extends Disposable
261
283
  else if (isSCMArtifactGroupTreeElement(inputOrElement)) {
262
284
  const repository = inputOrElement.repository;
263
285
  const artifacts = (await repository.provider.artifactProvider.get()?.provideArtifacts(inputOrElement.artifactGroup.id)) ?? [];
264
- const artifactsTree = ( new ResourceTree(inputOrElement));
265
- for (const artifact of artifacts) {
266
- artifactsTree.add(( URI.from({
267
- scheme: 'scm-artifact', path: artifact.name
268
- })), {
269
- repository,
270
- group: inputOrElement.artifactGroup,
271
- artifact,
272
- type: 'artifact'
273
- });
286
+ if (inputOrElement.artifactGroup.supportsFolders) {
287
+ const artifactsTree = ( new ResourceTree(inputOrElement));
288
+ for (let index = 0; index < artifacts.length; index++) {
289
+ const artifact = artifacts[index];
290
+ const artifactUri = ( URI.from({ scheme: 'scm-artifact', path: artifact.name }));
291
+ const artifactDirectory = artifact.id.lastIndexOf('/') > 0
292
+ ? artifact.id.substring(0, artifact.id.lastIndexOf('/'))
293
+ : artifact.id;
294
+ const prevArtifact = index > 0 ? artifacts[index - 1] : undefined;
295
+ const prevArtifactDirectory = prevArtifact && prevArtifact.id.lastIndexOf('/') > 0
296
+ ? prevArtifact.id.substring(0, prevArtifact.id.lastIndexOf('/'))
297
+ : prevArtifact?.id;
298
+ const hideTimestamp = index > 0 &&
299
+ artifact.timestamp !== undefined &&
300
+ prevArtifact?.timestamp !== undefined &&
301
+ artifactDirectory === prevArtifactDirectory &&
302
+ fromNow(prevArtifact.timestamp) === fromNow(artifact.timestamp);
303
+ artifactsTree.add(artifactUri, {
304
+ repository,
305
+ group: inputOrElement.artifactGroup,
306
+ artifact,
307
+ hideTimestamp,
308
+ type: 'artifact'
309
+ });
310
+ }
311
+ return ( Iterable.map(artifactsTree.root.children, node => node.element ?? node));
274
312
  }
275
- return ( Iterable.map(artifactsTree.root.children, node => node.element ?? node));
313
+ return ( artifacts.map((artifact, index, artifacts) => ({
314
+ repository,
315
+ group: inputOrElement.artifactGroup,
316
+ artifact,
317
+ hideTimestamp: index > 0 &&
318
+ artifact.timestamp !== undefined &&
319
+ artifacts[index - 1].timestamp !== undefined &&
320
+ fromNow(artifacts[index - 1].timestamp) === fromNow(artifact.timestamp),
321
+ type: 'artifact'
322
+ })));
276
323
  }
277
324
  else if (isSCMArtifactNode(inputOrElement)) {
278
325
  return ( Iterable.map(
@@ -280,7 +327,6 @@ let RepositoryTreeDataSource = class RepositoryTreeDataSource extends Disposable
280
327
  node => node.element && node.childrenCount === 0 ? node.element : node
281
328
  ));
282
329
  }
283
- else ;
284
330
  return [];
285
331
  }
286
332
  hasChildren(inputOrElement) {
@@ -345,16 +391,21 @@ class RepositoriesTreeCompressionDelegate {
345
391
  }
346
392
  }
347
393
  let SCMRepositoriesViewPane = class SCMRepositoriesViewPane extends ViewPane {
348
- constructor(options, scmService, scmViewService, keybindingService, contextMenuService, instantiationService, viewDescriptorService, contextKeyService, configurationService, openerService, themeService, hoverService) {
394
+ constructor(options, scmService, scmViewService, keybindingService, contextMenuService, commandService, instantiationService, viewDescriptorService, contextKeyService, configurationService, openerService, themeService, hoverService, storageService) {
349
395
  super({ ...options, titleMenuId: MenuId.SCMSourceControlTitle }, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, hoverService);
350
396
  this.scmService = scmService;
351
397
  this.scmViewService = scmViewService;
398
+ this.commandService = commandService;
399
+ this.storageService = storageService;
352
400
  this.treeOperationSequencer = ( new Sequencer());
353
401
  this.updateChildrenThrottler = ( new Throttler());
354
402
  this.visibilityDisposables = ( new DisposableStore());
355
403
  this.repositoryDisposables = ( new DisposableMap());
356
404
  this.visibleCountObs = observableConfigValue('scm.repositories.visible', 10, this.configurationService);
357
405
  this.providerCountBadgeObs = observableConfigValue('scm.providerCountBadge', 'hidden', this.configurationService);
406
+ this.storageService.onWillSaveState(() => {
407
+ this.storeTreeViewState();
408
+ }, this, this._store);
358
409
  this._register(this.updateChildrenThrottler);
359
410
  }
360
411
  renderBody(container) {
@@ -365,14 +416,15 @@ let SCMRepositoriesViewPane = class SCMRepositoriesViewPane extends ViewPane {
365
416
  treeContainer.classList.toggle('hide-provider-counts', providerCountBadge === 'hidden');
366
417
  treeContainer.classList.toggle('auto-provider-counts', providerCountBadge === 'auto');
367
418
  }));
368
- this.createTree(treeContainer);
419
+ const viewState = this.loadTreeViewState();
420
+ this.createTree(treeContainer, viewState);
369
421
  this.onDidChangeBodyVisibility(async (visible) => {
370
422
  if (!visible) {
371
423
  this.visibilityDisposables.clear();
372
424
  return;
373
425
  }
374
426
  this.treeOperationSequencer.queue(async () => {
375
- await this.tree.setInput(this.scmViewService);
427
+ await this.tree.setInput(this.scmViewService, viewState);
376
428
  this.visibilityDisposables.add(autorun(reader => {
377
429
  const visibleCount = this.visibleCountObs.read(reader);
378
430
  this.updateBodySize(this.tree.contentHeight, visibleCount);
@@ -394,6 +446,13 @@ let SCMRepositoriesViewPane = class SCMRepositoriesViewPane extends ViewPane {
394
446
  for (const repository of this.scmService.repositories) {
395
447
  this.onDidAddRepository(repository);
396
448
  }
449
+ this.visibilityDisposables.add(autorun(async (reader) => {
450
+ const explorerEnabledConfig = this.scmViewService.explorerEnabledConfig.read(reader);
451
+ const didFinishLoadingRepositories = this.scmViewService.didFinishLoadingRepositories.read(reader);
452
+ if (viewState === undefined && explorerEnabledConfig && didFinishLoadingRepositories && this.scmViewService.repositories.length === 1) {
453
+ await this.treeOperationSequencer.queue(() => this.tree.expand(this.scmViewService.repositories[0]));
454
+ }
455
+ }));
397
456
  });
398
457
  }, this, this._store);
399
458
  }
@@ -405,14 +464,14 @@ let SCMRepositoriesViewPane = class SCMRepositoriesViewPane extends ViewPane {
405
464
  super.focus();
406
465
  this.tree.domFocus();
407
466
  }
408
- createTree(container) {
467
+ createTree(container, viewState) {
409
468
  this.treeIdentityProvider = ( new RepositoryTreeIdentityProvider());
410
469
  this.treeDataSource = this.instantiationService.createInstance(RepositoryTreeDataSource);
411
470
  this._register(this.treeDataSource);
412
471
  this.tree = this.instantiationService.createInstance(WorkbenchCompressibleAsyncDataTree, 'SCM Repositories', container, ( new ListDelegate()), ( new RepositoriesTreeCompressionDelegate()), [
413
472
  this.instantiationService.createInstance(RepositoryRenderer, MenuId.SCMSourceControlInline, getActionViewItemProvider(this.instantiationService)),
414
- this.instantiationService.createInstance(ArtifactGroupRenderer),
415
- this.instantiationService.createInstance(ArtifactRenderer)
473
+ this.instantiationService.createInstance(ArtifactGroupRenderer, getActionViewItemProvider(this.instantiationService)),
474
+ this.instantiationService.createInstance(ArtifactRenderer, getActionViewItemProvider(this.instantiationService))
416
475
  ], this.treeDataSource, {
417
476
  identityProvider: this.treeIdentityProvider,
418
477
  horizontalScrolling: false,
@@ -423,7 +482,10 @@ let SCMRepositoriesViewPane = class SCMRepositoriesViewPane extends ViewPane {
423
482
  }
424
483
  return true;
425
484
  }
426
- if (isSCMArtifactNode(e)) {
485
+ if (viewState?.expanded && (isSCMRepository(e) || isSCMArtifactGroupTreeElement(e) || isSCMArtifactTreeElement(e))) {
486
+ return viewState.expanded.indexOf(this.treeIdentityProvider.getId(e)) === -1;
487
+ }
488
+ else if (isSCMArtifactNode(e)) {
427
489
  return !(e.childrenCount === 1 && Iterable.first(e.children)?.element === undefined);
428
490
  }
429
491
  else {
@@ -451,7 +513,7 @@ let SCMRepositoriesViewPane = class SCMRepositoriesViewPane extends ViewPane {
451
513
  }
452
514
  },
453
515
  getWidgetAriaLabel() {
454
- return localize(10446, "Source Control Repositories");
516
+ return localize(10581, "Source Control Repositories");
455
517
  }
456
518
  }
457
519
  });
@@ -460,6 +522,7 @@ let SCMRepositoriesViewPane = class SCMRepositoriesViewPane extends ViewPane {
460
522
  const selectionMode = this.scmViewService.selectionModeConfig.read(reader);
461
523
  this.tree.updateOptions({ multipleSelectionSupport: selectionMode === 'multiple' });
462
524
  }));
525
+ this._register(this.tree.onDidOpen(this.onTreeDidOpen, this));
463
526
  this._register(this.tree.onDidChangeSelection(this.onTreeSelectionChange, this));
464
527
  this._register(this.tree.onDidChangeFocus(this.onTreeDidChangeFocus, this));
465
528
  this._register(this.tree.onDidFocus(this.onDidTreeFocus, this));
@@ -494,6 +557,12 @@ let SCMRepositoriesViewPane = class SCMRepositoriesViewPane extends ViewPane {
494
557
  await this.updateRepository(repository);
495
558
  this.repositoryDisposables.deleteAndDispose(repository);
496
559
  }
560
+ onTreeDidOpen(e) {
561
+ if (!e.element || !isSCMArtifactTreeElement(e.element) || !e.element.artifact.command) {
562
+ return;
563
+ }
564
+ this.commandService.executeCommand(e.element.artifact.command.id, e.element.repository.provider, e.element.artifact);
565
+ }
497
566
  onTreeContextMenu(e) {
498
567
  if (!e.element) {
499
568
  return;
@@ -652,6 +721,24 @@ let SCMRepositoriesViewPane = class SCMRepositoriesViewPane extends ViewPane {
652
721
  }
653
722
  }));
654
723
  }
724
+ loadTreeViewState() {
725
+ const storageViewState = this.storageService.get('scm.repositoriesViewState', StorageScope.WORKSPACE);
726
+ if (!storageViewState) {
727
+ return undefined;
728
+ }
729
+ try {
730
+ const treeViewState = JSON.parse(storageViewState);
731
+ return treeViewState;
732
+ }
733
+ catch {
734
+ return undefined;
735
+ }
736
+ }
737
+ storeTreeViewState() {
738
+ if (this.tree) {
739
+ this.storageService.store('scm.repositoriesViewState', JSON.stringify(this.tree.getViewState()), StorageScope.WORKSPACE, StorageTarget.MACHINE);
740
+ }
741
+ }
655
742
  dispose() {
656
743
  this.visibilityDisposables.dispose();
657
744
  super.dispose();
@@ -662,13 +749,15 @@ SCMRepositoriesViewPane = ( __decorate([
662
749
  ( __param(2, ISCMViewService)),
663
750
  ( __param(3, IKeybindingService)),
664
751
  ( __param(4, IContextMenuService)),
665
- ( __param(5, IInstantiationService)),
666
- ( __param(6, IViewDescriptorService)),
667
- ( __param(7, IContextKeyService)),
668
- ( __param(8, IConfigurationService)),
669
- ( __param(9, IOpenerService)),
670
- ( __param(10, IThemeService)),
671
- ( __param(11, IHoverService))
752
+ ( __param(5, ICommandService)),
753
+ ( __param(6, IInstantiationService)),
754
+ ( __param(7, IViewDescriptorService)),
755
+ ( __param(8, IContextKeyService)),
756
+ ( __param(9, IConfigurationService)),
757
+ ( __param(10, IOpenerService)),
758
+ ( __param(11, IThemeService)),
759
+ ( __param(12, IHoverService)),
760
+ ( __param(13, IStorageService))
672
761
  ], SCMRepositoriesViewPane));
673
762
 
674
763
  export { SCMRepositoriesViewPane };
@@ -10,7 +10,7 @@ import { CountBadge } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/
10
10
  import { IContextMenuService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextview/browser/contextView.service';
11
11
  import { ICommandService } from '@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service';
12
12
  import { ActionRunner } from '@codingame/monaco-vscode-api/vscode/vs/base/common/actions';
13
- import { isSCMRepository, StatusBarAction, getRepositoryResourceCount, connectPrimaryMenu } from '@codingame/monaco-vscode-bc6f260d-ec63-5c95-9446-1ca7d0872719-common/vscode/vs/workbench/contrib/scm/browser/util';
13
+ import { isSCMRepository, StatusBarAction, getRepositoryResourceCount, connectPrimaryMenu } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/scm/browser/util';
14
14
  import { defaultCountBadgeStyles } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/browser/defaultStyles';
15
15
  import { WorkbenchToolBar } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/browser/toolbar';
16
16
  import { MenuItemAction, MenuId } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
@@ -66,16 +66,13 @@ let RepositoryRenderer = class RepositoryRenderer {
66
66
  this.onDidChangeVisibleRepositoriesSignal = observableSignalFromEvent(this, this.scmViewService.onDidChangeVisibleRepositories);
67
67
  }
68
68
  renderTemplate(container) {
69
- if (container.classList.contains('monaco-tl-contents')) {
70
- container.parentElement.parentElement.querySelector('.monaco-tl-twistie').classList.add('force-twistie');
71
- }
72
69
  const provider = append(container, $('.scm-provider'));
73
70
  const icon = append(provider, $('.icon'));
74
71
  const label = ( new IconLabel(provider, { supportIcons: false }));
75
72
  const actions = append(provider, $('.actions'));
76
73
  const toolBar = ( new WorkbenchToolBar(
77
74
  actions,
78
- { actionViewItemProvider: this.actionViewItemProvider, resetMenu: this.toolbarMenuId, responsive: true },
75
+ { actionViewItemProvider: this.actionViewItemProvider, resetMenu: this.toolbarMenuId, responsiveBehavior: { enabled: true, minItems: 2 } },
79
76
  this.menuService,
80
77
  this.contextKeyService,
81
78
  this.contextMenuService,
@@ -1,6 +1,6 @@
1
1
  import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
2
2
  import { IDisposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
3
- import { ViewPane, IViewPaneOptions } from "@codingame/monaco-vscode-501b06ab-3f58-516b-8a1a-c29d375d3da4-common/vscode/vs/workbench/browser/parts/views/viewPane";
3
+ import { ViewPane, IViewPaneOptions } from "@codingame/monaco-vscode-api/vscode/vs/workbench/browser/parts/views/viewPane";
4
4
  import { ISCMResourceGroup, ISCMResource, ISCMRepository, ISCMInput, ISCMActionButton, ISCMActionButtonDescriptor, ViewMode } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/scm/common/scm";
5
5
  import { ISCMViewService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/scm/common/scm.service";
6
6
  import { ISCMService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/scm/common/scm.service";
@@ -15,7 +15,7 @@ import { IMenuService } from "@codingame/monaco-vscode-api/vscode/vs/platform/ac
15
15
  import { IThemeService } from "@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/themeService.service";
16
16
  import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
17
17
  import { ITreeNode, ITreeSorter } from "@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/tree/tree";
18
- import { IResourceNode } from "@codingame/monaco-vscode-bc6f260d-ec63-5c95-9446-1ca7d0872719-common/vscode/vs/base/common/resourceTree";
18
+ import { IResourceNode } from "@codingame/monaco-vscode-api/vscode/vs/base/common/resourceTree";
19
19
  import { ICompressibleTreeRenderer, ICompressibleKeyboardNavigationLabelProvider } from "@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/tree/objectTree";
20
20
  import { FuzzyScore } from "@codingame/monaco-vscode-api/vscode/vs/base/common/filters";
21
21
  import { IViewDescriptorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/views.service";