@codingame/monaco-vscode-scm-service-override 6.0.2 → 7.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.
- package/package.json +2 -2
- package/vscode/src/vs/workbench/contrib/scm/browser/activity.js +119 -174
- package/vscode/src/vs/workbench/contrib/scm/browser/media/scm.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/scm/browser/menus.js +1 -1
- package/vscode/src/vs/workbench/contrib/scm/browser/scm.contribution.js +34 -10
- package/vscode/src/vs/workbench/contrib/scm/browser/scmHistory.js +180 -0
- package/vscode/src/vs/workbench/contrib/scm/browser/scmRepositoryRenderer.js +25 -22
- package/vscode/src/vs/workbench/contrib/scm/browser/scmViewPane.js +240 -65
- package/vscode/src/vs/workbench/contrib/scm/browser/util.js +7 -1
- package/vscode/src/vs/workbench/contrib/scm/common/scmService.js +34 -9
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-scm-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.0",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "CodinGame",
|
|
@@ -26,6 +26,6 @@
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"vscode": "npm:@codingame/monaco-vscode-api@
|
|
29
|
+
"vscode": "npm:@codingame/monaco-vscode-api@7.0.0"
|
|
30
30
|
}
|
|
31
31
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
2
2
|
import { localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
3
3
|
import { basename } from 'vscode/vscode/vs/base/common/resources';
|
|
4
|
-
import { Disposable,
|
|
4
|
+
import { Disposable, DisposableStore, combinedDisposable, dispose } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
5
5
|
import { Event, Emitter } from 'vscode/vscode/vs/base/common/event';
|
|
6
6
|
import { VIEW_PANE_ID } from 'vscode/vscode/vs/workbench/contrib/scm/common/scm';
|
|
7
7
|
import { ISCMService, ISCMViewService } from 'vscode/vscode/vs/workbench/contrib/scm/common/scm.service';
|
|
@@ -19,108 +19,126 @@ import { Schemas } from 'vscode/vscode/vs/base/common/network';
|
|
|
19
19
|
import { Iterable } from 'vscode/vscode/vs/base/common/iterator';
|
|
20
20
|
import { ITitleService } from 'vscode/vscode/vs/workbench/services/title/browser/titleService.service';
|
|
21
21
|
import { IEditorGroupsService } from 'vscode/vscode/vs/workbench/services/editor/common/editorGroupsService.service';
|
|
22
|
+
import { getRepositoryResourceCount } from './util.js';
|
|
23
|
+
import 'vscode/vscode/vs/base/common/arrays';
|
|
24
|
+
import { derived } from 'vscode/vscode/vs/base/common/observableInternal/derived';
|
|
25
|
+
import { autorun, autorunWithStore } from 'vscode/vscode/vs/base/common/observableInternal/autorun';
|
|
26
|
+
import { observableFromEvent, observableFromEventOpts, derivedObservableWithCache, latestChangedValue } from 'vscode/vscode/vs/base/common/observableInternal/utils';
|
|
27
|
+
import 'vscode/vscode/vs/base/common/cancellation';
|
|
28
|
+
import { observableConfigValue } from 'vscode/vscode/vs/platform/observable/common/platformObservableUtils';
|
|
29
|
+
import { ILogService } from 'vscode/vscode/vs/platform/log/common/log.service';
|
|
22
30
|
|
|
23
31
|
const _moduleId = "vs/workbench/contrib/scm/browser/activity";
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
let SCMStatusController = class SCMStatusController {
|
|
33
|
-
constructor(scmService, scmViewService, statusbarService, activityService, editorService, configurationService, uriIdentityService) {
|
|
32
|
+
let SCMActiveRepositoryController = class SCMActiveRepositoryController extends Disposable {
|
|
33
|
+
constructor(activityService, configurationService, contextKeyService, editorService, logService, scmService, scmViewService, statusbarService, titleService) {
|
|
34
|
+
super();
|
|
35
|
+
this.activityService = activityService;
|
|
36
|
+
this.configurationService = configurationService;
|
|
37
|
+
this.contextKeyService = contextKeyService;
|
|
38
|
+
this.editorService = editorService;
|
|
39
|
+
this.logService = logService;
|
|
34
40
|
this.scmService = scmService;
|
|
35
41
|
this.scmViewService = scmViewService;
|
|
36
42
|
this.statusbarService = statusbarService;
|
|
37
|
-
this.
|
|
38
|
-
this.
|
|
39
|
-
this.
|
|
40
|
-
this.
|
|
41
|
-
this.
|
|
42
|
-
this.
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
this.scmService.onDidAddRepository(this.onDidAddRepository, this, this.disposables);
|
|
48
|
-
this.scmService.onDidRemoveRepository(this.onDidRemoveRepository, this, this.disposables);
|
|
49
|
-
const onDidChangeSCMCountBadge = Event.filter(configurationService.onDidChangeConfiguration, e => e.affectsConfiguration('scm.countBadge'));
|
|
50
|
-
onDidChangeSCMCountBadge(this.renderActivityCount, this, this.disposables);
|
|
51
|
-
for (const repository of this.scmService.repositories) {
|
|
52
|
-
this.onDidAddRepository(repository);
|
|
53
|
-
}
|
|
54
|
-
this.scmViewService.onDidFocusRepository(this.focusRepository, this, this.disposables);
|
|
55
|
-
this.focusRepository(this.scmViewService.focusedRepository);
|
|
56
|
-
editorService.onDidActiveEditorChange(() => this.tryFocusRepositoryBasedOnActiveEditor(), this, this.disposables);
|
|
57
|
-
this.renderActivityCount();
|
|
58
|
-
}
|
|
59
|
-
tryFocusRepositoryBasedOnActiveEditor(repositories = this.scmService.repositories) {
|
|
60
|
-
const resource = EditorResourceAccessor.getOriginalUri(this.editorService.activeEditor);
|
|
61
|
-
if (!resource) {
|
|
62
|
-
return false;
|
|
63
|
-
}
|
|
64
|
-
let bestRepository = null;
|
|
65
|
-
let bestMatchLength = Number.POSITIVE_INFINITY;
|
|
66
|
-
for (const repository of repositories) {
|
|
67
|
-
const root = repository.provider.rootUri;
|
|
68
|
-
if (!root) {
|
|
69
|
-
continue;
|
|
43
|
+
this.titleService = titleService;
|
|
44
|
+
this._countBadgeConfig = observableConfigValue('scm.countBadge', 'all', this.configurationService);
|
|
45
|
+
this._repositories = observableFromEvent(this, Event.any(this.scmService.onDidAddRepository, this.scmService.onDidRemoveRepository), () => this.scmService.repositories);
|
|
46
|
+
this._focusedRepository = observableFromEventOpts({ owner: this, equalsFn: () => false }, this.scmViewService.onDidFocusRepository, () => this.scmViewService.focusedRepository);
|
|
47
|
+
this._activeEditor = observableFromEventOpts({ owner: this, equalsFn: () => false }, this.editorService.onDidActiveEditorChange, () => this.editorService.activeEditor);
|
|
48
|
+
this._activeEditorRepository = derivedObservableWithCache(this, (reader, lastValue) => {
|
|
49
|
+
const activeResource = EditorResourceAccessor.getOriginalUri(this._activeEditor.read(reader));
|
|
50
|
+
if (!activeResource) {
|
|
51
|
+
this.logService.trace('SCMActiveRepositoryController (activeEditorRepository derived): no activeResource');
|
|
52
|
+
return lastValue;
|
|
70
53
|
}
|
|
71
|
-
const
|
|
72
|
-
if (
|
|
73
|
-
|
|
74
|
-
|
|
54
|
+
const repository = this.scmService.getRepository(activeResource);
|
|
55
|
+
if (!repository) {
|
|
56
|
+
this.logService.trace(`SCMActiveRepositoryController (activeEditorRepository derived): no repository for '${( (activeResource.toString()))}'`);
|
|
57
|
+
return lastValue;
|
|
75
58
|
}
|
|
76
|
-
|
|
77
|
-
if (!bestRepository) {
|
|
78
|
-
return false;
|
|
79
|
-
}
|
|
80
|
-
this.focusRepository(bestRepository);
|
|
81
|
-
return true;
|
|
82
|
-
}
|
|
83
|
-
onDidAddRepository(repository) {
|
|
84
|
-
const onDidChange = Event.any(repository.provider.onDidChange, repository.provider.onDidChangeResources);
|
|
85
|
-
const changeDisposable = onDidChange(() => this.renderActivityCount());
|
|
86
|
-
const onDidRemove = Event.filter(this.scmService.onDidRemoveRepository, e => e === repository);
|
|
87
|
-
const removeDisposable = onDidRemove(() => {
|
|
88
|
-
disposable.dispose();
|
|
89
|
-
this.repositoryDisposables.delete(disposable);
|
|
90
|
-
this.renderActivityCount();
|
|
59
|
+
return Object.create(repository);
|
|
91
60
|
});
|
|
92
|
-
|
|
93
|
-
this.
|
|
94
|
-
|
|
61
|
+
this._activeRepository = latestChangedValue(this, [this._activeEditorRepository, this._focusedRepository]);
|
|
62
|
+
this._countBadgeRepositories = derived(this, reader => {
|
|
63
|
+
switch (this._countBadgeConfig.read(reader)) {
|
|
64
|
+
case 'all': {
|
|
65
|
+
const repositories = this._repositories.read(reader);
|
|
66
|
+
return [...( (Iterable.map(
|
|
67
|
+
repositories,
|
|
68
|
+
r => ({ ...r.provider, resourceCount: this._getRepositoryResourceCount(r) })
|
|
69
|
+
)))];
|
|
70
|
+
}
|
|
71
|
+
case 'focused': {
|
|
72
|
+
const repository = this._activeRepository.read(reader);
|
|
73
|
+
return repository ? [{ ...repository.provider, resourceCount: this._getRepositoryResourceCount(repository) }] : [];
|
|
74
|
+
}
|
|
75
|
+
case 'off':
|
|
76
|
+
return [];
|
|
77
|
+
default:
|
|
78
|
+
throw ( (new Error('Invalid countBadge setting')));
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
this._countBadge = derived(this, reader => {
|
|
82
|
+
let total = 0;
|
|
83
|
+
for (const repository of this._countBadgeRepositories.read(reader)) {
|
|
84
|
+
const count = repository.count?.read(reader);
|
|
85
|
+
const resourceCount = repository.resourceCount.read(reader);
|
|
86
|
+
total = total + (count ?? resourceCount);
|
|
87
|
+
}
|
|
88
|
+
return total;
|
|
89
|
+
});
|
|
90
|
+
this._activeRepositoryNameContextKey = ActiveRepositoryContextKeys.ActiveRepositoryName.bindTo(this.contextKeyService);
|
|
91
|
+
this._activeRepositoryBranchNameContextKey = ActiveRepositoryContextKeys.ActiveRepositoryBranchName.bindTo(this.contextKeyService);
|
|
92
|
+
this.titleService.registerVariables([
|
|
93
|
+
{ name: 'activeRepositoryName', contextKey: ActiveRepositoryContextKeys.ActiveRepositoryName.key },
|
|
94
|
+
{ name: 'activeRepositoryBranchName', contextKey: ActiveRepositoryContextKeys.ActiveRepositoryBranchName.key, }
|
|
95
|
+
]);
|
|
96
|
+
this._register(autorun(reader => {
|
|
97
|
+
const repository = this._focusedRepository.read(reader);
|
|
98
|
+
const commands = repository?.provider.statusBarCommands.read(reader);
|
|
99
|
+
this.logService.trace('SCMActiveRepositoryController (focusedRepository):', repository?.id ?? 'no id');
|
|
100
|
+
this.logService.trace('SCMActiveRepositoryController (focusedRepository):', commands ? ( (commands.map(c => c.title))).join(', ') : 'no commands');
|
|
101
|
+
}));
|
|
102
|
+
this._register(autorun(reader => {
|
|
103
|
+
const repository = this._activeEditorRepository.read(reader);
|
|
104
|
+
const commands = repository?.provider.statusBarCommands.read(reader);
|
|
105
|
+
this.logService.trace('SCMActiveRepositoryController (activeEditorRepository):', repository?.id ?? 'no id');
|
|
106
|
+
this.logService.trace('SCMActiveRepositoryController (activeEditorRepository):', commands ? ( (commands.map(c => c.title))).join(', ') : 'no commands');
|
|
107
|
+
}));
|
|
108
|
+
this._register(autorunWithStore((reader, store) => {
|
|
109
|
+
this._updateActivityCountBadge(this._countBadge.read(reader), store);
|
|
110
|
+
}));
|
|
111
|
+
this._register(autorunWithStore((reader, store) => {
|
|
112
|
+
const repository = this._activeRepository.read(reader);
|
|
113
|
+
const commands = repository?.provider.statusBarCommands.read(reader);
|
|
114
|
+
this.logService.trace('SCMActiveRepositoryController (status bar):', repository?.id ?? 'no id');
|
|
115
|
+
this.logService.trace('SCMActiveRepositoryController (status bar):', commands ? ( (commands.map(c => c.title))).join(', ') : 'no commands');
|
|
116
|
+
this._updateStatusBar(repository, commands ?? [], store);
|
|
117
|
+
}));
|
|
118
|
+
this._register(autorun(reader => {
|
|
119
|
+
const repository = this._activeRepository.read(reader);
|
|
120
|
+
const currentHistoryItemGroup = repository?.provider.historyProviderObs.read(reader)?.currentHistoryItemGroupObs.read(reader);
|
|
121
|
+
this._updateActiveRepositoryContextKeys(repository, currentHistoryItemGroup);
|
|
122
|
+
}));
|
|
95
123
|
}
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
return;
|
|
99
|
-
}
|
|
100
|
-
this.focusRepository(Iterable.first(this.scmService.repositories));
|
|
124
|
+
_getRepositoryResourceCount(repository) {
|
|
125
|
+
return observableFromEvent(this, repository.provider.onDidChangeResources, () => getRepositoryResourceCount(repository.provider));
|
|
101
126
|
}
|
|
102
|
-
|
|
103
|
-
if (
|
|
127
|
+
_updateActivityCountBadge(count, store) {
|
|
128
|
+
if (count === 0) {
|
|
104
129
|
return;
|
|
105
130
|
}
|
|
106
|
-
|
|
107
|
-
this.
|
|
108
|
-
if (repository && repository.provider.onDidChangeStatusBarCommands) {
|
|
109
|
-
this.focusDisposable = repository.provider.onDidChangeStatusBarCommands(() => this.renderStatusBar(repository));
|
|
110
|
-
}
|
|
111
|
-
this.renderStatusBar(repository);
|
|
112
|
-
this.renderActivityCount();
|
|
131
|
+
const badge = ( (new NumberBadge(count, num => ( localizeWithPath(_moduleId, 0, '{0} pending changes', num)))));
|
|
132
|
+
store.add(this.activityService.showViewActivity(VIEW_PANE_ID, { badge }));
|
|
113
133
|
}
|
|
114
|
-
|
|
115
|
-
this.statusBarDisposable.dispose();
|
|
134
|
+
_updateStatusBar(repository, commands, store) {
|
|
116
135
|
if (!repository) {
|
|
136
|
+
this.logService.trace('SCMActiveRepositoryController (status bar): repository is undefined');
|
|
117
137
|
return;
|
|
118
138
|
}
|
|
119
|
-
const commands = repository.provider.statusBarCommands || [];
|
|
120
139
|
const label = repository.provider.rootUri
|
|
121
140
|
? `${basename(repository.provider.rootUri)} (${repository.provider.label})`
|
|
122
141
|
: repository.provider.label;
|
|
123
|
-
const disposables = ( (new DisposableStore()));
|
|
124
142
|
for (let index = 0; index < commands.length; index++) {
|
|
125
143
|
const command = commands[index];
|
|
126
144
|
const tooltip = `${label}${command.tooltip ? ` - ${command.tooltip}` : ''}`;
|
|
@@ -137,110 +155,37 @@ let SCMStatusController = class SCMStatusController {
|
|
|
137
155
|
repoAgnosticActionName = '';
|
|
138
156
|
}
|
|
139
157
|
const statusbarEntry = {
|
|
140
|
-
name: ( localizeWithPath(_moduleId,
|
|
158
|
+
name: ( localizeWithPath(_moduleId, 1, "Source Control")) + (repoAgnosticActionName ? ` ${repoAgnosticActionName}` : ''),
|
|
141
159
|
text: command.title,
|
|
142
160
|
ariaLabel: tooltip,
|
|
143
161
|
tooltip,
|
|
144
162
|
command: command.id ? command : undefined
|
|
145
163
|
};
|
|
146
|
-
|
|
164
|
+
store.add(index === 0 ?
|
|
147
165
|
this.statusbarService.addEntry(statusbarEntry, `status.scm.${index}`, StatusbarAlignment.LEFT, 10000) :
|
|
148
166
|
this.statusbarService.addEntry(statusbarEntry, `status.scm.${index}`, StatusbarAlignment.LEFT, { id: `status.scm.${index - 1}`, alignment: StatusbarAlignment.RIGHT, compact: true }));
|
|
149
167
|
}
|
|
150
|
-
this.statusBarDisposable = disposables;
|
|
151
168
|
}
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
if (countBadgeType === 'all') {
|
|
156
|
-
count = Iterable.reduce(this.scmService.repositories, (r, repository) => r + getCount(repository), 0);
|
|
157
|
-
}
|
|
158
|
-
else if (countBadgeType === 'focused' && this.focusedRepository) {
|
|
159
|
-
count = getCount(this.focusedRepository);
|
|
160
|
-
}
|
|
161
|
-
if (count > 0) {
|
|
162
|
-
const badge = ( (new NumberBadge(count, num => ( localizeWithPath(_moduleId, 1, '{0} pending changes', num)))));
|
|
163
|
-
this.badgeDisposable.value = this.activityService.showViewActivity(VIEW_PANE_ID, { badge });
|
|
164
|
-
}
|
|
165
|
-
else {
|
|
166
|
-
this.badgeDisposable.value = undefined;
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
dispose() {
|
|
170
|
-
this.focusDisposable.dispose();
|
|
171
|
-
this.statusBarDisposable.dispose();
|
|
172
|
-
this.badgeDisposable.dispose();
|
|
173
|
-
this.disposables.dispose();
|
|
174
|
-
dispose(( (this.repositoryDisposables.values())));
|
|
175
|
-
this.repositoryDisposables.clear();
|
|
169
|
+
_updateActiveRepositoryContextKeys(repository, currentHistoryItemGroup) {
|
|
170
|
+
this._activeRepositoryNameContextKey.set(repository?.provider.name ?? '');
|
|
171
|
+
this._activeRepositoryBranchNameContextKey.set(currentHistoryItemGroup?.name ?? '');
|
|
176
172
|
}
|
|
177
173
|
};
|
|
178
|
-
|
|
179
|
-
( (__param(0,
|
|
180
|
-
( (__param(1,
|
|
181
|
-
( (__param(2,
|
|
182
|
-
( (__param(3,
|
|
183
|
-
( (__param(4,
|
|
184
|
-
( (__param(5,
|
|
185
|
-
( (__param(6,
|
|
186
|
-
|
|
174
|
+
SCMActiveRepositoryController = ( (__decorate([
|
|
175
|
+
( (__param(0, IActivityService))),
|
|
176
|
+
( (__param(1, IConfigurationService))),
|
|
177
|
+
( (__param(2, IContextKeyService))),
|
|
178
|
+
( (__param(3, IEditorService))),
|
|
179
|
+
( (__param(4, ILogService))),
|
|
180
|
+
( (__param(5, ISCMService))),
|
|
181
|
+
( (__param(6, ISCMViewService))),
|
|
182
|
+
( (__param(7, IStatusbarService))),
|
|
183
|
+
( (__param(8, ITitleService)))
|
|
184
|
+
], SCMActiveRepositoryController)));
|
|
187
185
|
const ActiveRepositoryContextKeys = {
|
|
188
186
|
ActiveRepositoryName: ( (new RawContextKey('scmActiveRepositoryName', ''))),
|
|
189
187
|
ActiveRepositoryBranchName: ( (new RawContextKey('scmActiveRepositoryBranchName', ''))),
|
|
190
188
|
};
|
|
191
|
-
let SCMActiveRepositoryContextKeyController = class SCMActiveRepositoryContextKeyController {
|
|
192
|
-
constructor(contextKeyService, editorService, scmViewService, titleService, uriIdentityService) {
|
|
193
|
-
this.editorService = editorService;
|
|
194
|
-
this.scmViewService = scmViewService;
|
|
195
|
-
this.uriIdentityService = uriIdentityService;
|
|
196
|
-
this.focusedRepository = undefined;
|
|
197
|
-
this.focusDisposable = Disposable.None;
|
|
198
|
-
this.disposables = ( (new DisposableStore()));
|
|
199
|
-
this.activeRepositoryNameContextKey = ActiveRepositoryContextKeys.ActiveRepositoryName.bindTo(contextKeyService);
|
|
200
|
-
this.activeRepositoryBranchNameContextKey = ActiveRepositoryContextKeys.ActiveRepositoryBranchName.bindTo(contextKeyService);
|
|
201
|
-
titleService.registerVariables([
|
|
202
|
-
{ name: 'activeRepositoryName', contextKey: ActiveRepositoryContextKeys.ActiveRepositoryName.key },
|
|
203
|
-
{ name: 'activeRepositoryBranchName', contextKey: ActiveRepositoryContextKeys.ActiveRepositoryBranchName.key, }
|
|
204
|
-
]);
|
|
205
|
-
editorService.onDidActiveEditorChange(this.onDidActiveEditorChange, this, this.disposables);
|
|
206
|
-
scmViewService.onDidFocusRepository(this.onDidFocusRepository, this, this.disposables);
|
|
207
|
-
this.onDidFocusRepository(scmViewService.focusedRepository);
|
|
208
|
-
}
|
|
209
|
-
onDidActiveEditorChange() {
|
|
210
|
-
const activeResource = EditorResourceAccessor.getOriginalUri(this.editorService.activeEditor);
|
|
211
|
-
if (activeResource?.scheme !== Schemas.file && activeResource?.scheme !== Schemas.vscodeRemote) {
|
|
212
|
-
return;
|
|
213
|
-
}
|
|
214
|
-
const repository = Iterable.find(this.scmViewService.repositories, r => Boolean(r.provider.rootUri && this.uriIdentityService.extUri.isEqualOrParent(activeResource, r.provider.rootUri)));
|
|
215
|
-
this.onDidFocusRepository(repository);
|
|
216
|
-
}
|
|
217
|
-
onDidFocusRepository(repository) {
|
|
218
|
-
if (!repository || this.focusedRepository === repository) {
|
|
219
|
-
return;
|
|
220
|
-
}
|
|
221
|
-
this.focusDisposable.dispose();
|
|
222
|
-
this.focusedRepository = repository;
|
|
223
|
-
if (repository && repository.provider.onDidChangeStatusBarCommands) {
|
|
224
|
-
this.focusDisposable = repository.provider.onDidChangeStatusBarCommands(() => this.updateContextKeys(repository));
|
|
225
|
-
}
|
|
226
|
-
this.updateContextKeys(repository);
|
|
227
|
-
}
|
|
228
|
-
updateContextKeys(repository) {
|
|
229
|
-
this.activeRepositoryNameContextKey.set(repository?.provider.name ?? '');
|
|
230
|
-
this.activeRepositoryBranchNameContextKey.set(repository?.provider.historyProvider?.currentHistoryItemGroup?.name ?? '');
|
|
231
|
-
}
|
|
232
|
-
dispose() {
|
|
233
|
-
this.focusDisposable.dispose();
|
|
234
|
-
this.disposables.dispose();
|
|
235
|
-
}
|
|
236
|
-
};
|
|
237
|
-
SCMActiveRepositoryContextKeyController = ( (__decorate([
|
|
238
|
-
( (__param(0, IContextKeyService))),
|
|
239
|
-
( (__param(1, IEditorService))),
|
|
240
|
-
( (__param(2, ISCMViewService))),
|
|
241
|
-
( (__param(3, ITitleService))),
|
|
242
|
-
( (__param(4, IUriIdentityService)))
|
|
243
|
-
], SCMActiveRepositoryContextKeyController)));
|
|
244
189
|
let SCMActiveResourceContextKeyController = class SCMActiveResourceContextKeyController {
|
|
245
190
|
constructor(editorGroupsService, scmService, uriIdentityService) {
|
|
246
191
|
this.scmService = scmService;
|
|
@@ -317,4 +262,4 @@ SCMActiveResourceContextKeyController = ( (__decorate([
|
|
|
317
262
|
( (__param(2, IUriIdentityService)))
|
|
318
263
|
], SCMActiveResourceContextKeyController)));
|
|
319
264
|
|
|
320
|
-
export {
|
|
265
|
+
export { SCMActiveRepositoryController, SCMActiveResourceContextKeyController };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import n from 'vscode/external/rollup-plugin-styles/dist/runtime/inject-css.js';
|
|
2
2
|
|
|
3
|
-
var css = ".scm-view{height:100%;position:relative}.scm-overflow-widgets-container{height:0;left:0;overflow:visible;position:absolute;top:0;width:0;z-index:5000}.scm-view .monaco-tl-contents>div{overflow:hidden;padding-right:12px}.scm-view .count{display:flex;margin-left:6px}.scm-view .count.hidden{display:none}.scm-view .scm-provider{align-items:center;display:flex;flex-direction:column;flex-flow:nowrap;height:100%}.scm-view.auto-provider-counts .scm-provider>.count[data-count=\"0\"],.scm-view.hide-provider-counts .scm-provider>.count{display:none}.scm-view .scm-provider>.label{flex:1;min-width:50px;overflow:hidden;text-overflow:ellipsis}.scm-view .scm-provider>.label>.name{font-weight:700}.scm-view .scm-provider>.label>.description{font-size:.9em;margin-left:.5em;opacity:.7}.scm-view .scm-provider>.actions{justify-content:flex-end;overflow:hidden}.scm-view .monaco-editor .selected-text{border-radius:0}.scm-view .scm-provider>.actions>.monaco-toolbar>.monaco-action-bar>.actions-container>.action-item{align-items:center;display:flex;padding-left:4px}.scm-view .scm-provider>.actions>.monaco-toolbar>.monaco-action-bar>.actions-container>.action-item:first-child{min-width:20px}.scm-view .scm-provider>.actions>.monaco-toolbar>.monaco-action-bar>.actions-container>.action-item>.action-label,.scm-view .scm-provider>.actions>.monaco-toolbar>.monaco-action-bar>.actions-container>.action-item>.monaco-dropdown>.dropdown-label>.action-label{align-items:center;display:flex;line-height:16px;overflow:hidden}.scm-view .scm-provider>.actions>.monaco-toolbar>.monaco-action-bar>.actions-container>.action-item>.action-label>.codicon{font-size:12px;justify-content:center}.scm-view .scm-provider>.actions>.monaco-toolbar>.monaco-action-bar>.actions-container>.action-item:last-of-type{padding-right:0}.scm-view .scm-provider>.body{flex-grow:1}.scm-view .scm-provider>.status>.monaco-action-bar>.actions-container{border-color:var(--vscode-sideBar-border)}.scm-view .monaco-list-row{line-height:22px}.scm-view .monaco-list-row .history,.scm-view .monaco-list-row .history-item-group,.scm-view .monaco-list-row .resource-group{align-items:center;display:flex;height:100%}.scm-view .monaco-list-row .history-item .monaco-icon-label,.scm-view .monaco-list-row .history-item-group .monaco-icon-label{align-items:center;flex-grow:1}.scm-view .monaco-list-row .history-item{align-items:center;display:flex}.scm-view .monaco-list-row .history-item .stats-container{border:1px solid var(--vscode-scm-historyItemStatisticsBorder);border-radius:2px;display:flex;font-size:11px;gap:4px;line-height:11px;margin-left:6px;min-height:18px;padding:0 4px}.scm-view .monaco-list-row.focused .history-item .stats-container,.scm-view .monaco-list-row.selected .history-item .stats-container{border:1px solid var(--vscode-scm-historyItemSelectedStatisticsBorder)}.scm-view .monaco-list-row .history-item .stats-container>.deletions-label,.scm-view .monaco-list-row .history-item .stats-container>.files-label,.scm-view .monaco-list-row .history-item .stats-container>.insertions-label{align-items:center;display:flex;opacity:.75}.scm-view .monaco-list-row .history-item .stats-container>.insertions-label{color:var(--vscode-scm-historyItemAdditionsForeground)}.scm-view .monaco-list-row .history-item .stats-container>.deletions-label{color:var(--vscode-scm-historyItemDeletionsForeground)}.scm-view .monaco-list-row .history-item .stats-container.hidden,.scm-view .monaco-list-row .history-item .stats-container>.deletions-label.hidden,.scm-view .monaco-list-row .history-item .stats-container>.insertions-label.hidden{display:none}.scm-view .monaco-list-row .history-item .monaco-icon-label .icon-container,.scm-view .monaco-list-row .history-item-group .monaco-icon-label .icon-container{display:flex;padding-right:4px}.scm-view .monaco-list-row .history-item .monaco-icon-label .avatar{border-radius:14px;height:14px;width:14px}.scm-view .monaco-list-row .separator-container{align-items:center;display:flex;padding-left:11px}.scm-view .monaco-list-row .separator-container .label-name{font-size:10px}.scm-view .monaco-list-row.focused .separator-container .label-name,.scm-view .monaco-list-row.selected .separator-container .label-name{color:var(--vscode-foreground)}.scm-view .monaco-list-row .separator-container .separator{border-top:1px solid var(--vscode-sideBar-border);display:flex;flex-grow:1;height:0;margin-left:6px}.scm-view .monaco-list-row .separator-container .actions{padding-left:6px}.scm-view .monaco-list-row .history-item-group>.name,.scm-view .monaco-list-row .history>.name,.scm-view .monaco-list-row .resource-group>.name{flex:1;overflow:hidden;text-overflow:ellipsis}.scm-view .monaco-list-row .resource{display:flex;height:100%}.scm-view .monaco-list-row .resource.faded{opacity:.7}.scm-view .monaco-list-row .resource>.name{flex:1;overflow:hidden}.scm-view .monaco-list-row .resource>.name>.monaco-icon-label:after{margin-right:3px}.scm-view .monaco-list-row .resource>.decoration-icon{background-position:50% 50%;background-repeat:no-repeat;height:100%;margin-left:5px;width:16px}.scm-view .monaco-list-row .resource>.decoration-icon.codicon{margin-right:0;margin-top:3px}.scm-view .monaco-list .monaco-list-row .resource>.name>.monaco-icon-label>.actions{flex-grow:100}.scm-view .monaco-list .monaco-list-row .history-item-group>.actions,.scm-view .monaco-list .monaco-list-row .history-item>.actions,.scm-view .monaco-list .monaco-list-row .resource-group>.actions,.scm-view .monaco-list .monaco-list-row .resource>.name>.monaco-icon-label>.actions,.scm-view .monaco-list .monaco-list-row .separator-container>.actions{display:none;max-width:fit-content}.scm-view .monaco-list .monaco-list-row.focused .history-item-group>.actions,.scm-view .monaco-list .monaco-list-row.focused .history-item>.actions,.scm-view .monaco-list .monaco-list-row.focused .resource-group>.actions,.scm-view .monaco-list .monaco-list-row.focused .resource>.name>.monaco-icon-label>.actions,.scm-view .monaco-list .monaco-list-row.focused .separator-container>.actions,.scm-view .monaco-list .monaco-list-row:hover .history-item-group>.actions,.scm-view .monaco-list .monaco-list-row:hover .history-item>.actions,.scm-view .monaco-list .monaco-list-row:hover .resource-group>.actions,.scm-view .monaco-list .monaco-list-row:hover .resource>.name>.monaco-icon-label>.actions,.scm-view .monaco-list .monaco-list-row:hover .separator-container>.actions,.scm-view .monaco-list:not(.selection-multiple) .monaco-list-row .resource:hover>.actions{display:block}.scm-view .monaco-list .monaco-list-row.focused.force-no-hover,.scm-view .monaco-list .monaco-list-row.force-no-hover,.scm-view .monaco-list .monaco-list-row.selected.force-no-hover,.scm-view .monaco-list .monaco-list-row:hover.force-no-hover{background:transparent!important}.scm-view .monaco-list .monaco-list-row.cursor-default{cursor:default}.scm-view.show-actions .scm-provider>.actions,.scm-view.show-actions>.monaco-list .monaco-list-row .history-item-group>.actions,.scm-view.show-actions>.monaco-list .monaco-list-row .history-item>.actions,.scm-view.show-actions>.monaco-list .monaco-list-row .resource-group>.actions,.scm-view.show-actions>.monaco-list .monaco-list-row .resource>.name>.monaco-icon-label>.actions,.scm-view.show-actions>.monaco-list .monaco-list-row .scm-input>.scm-editor>.actions,.scm-view.show-actions>.monaco-list .monaco-list-row .separator-container>.actions{display:block}.scm-view .monaco-list-row .actions .action-label{padding:2px}.scm-view .scm-input{align-items:center;display:flex;height:100%;padding-left:11px}.scm-view .scm-input .scm-editor .scm-editor-toolbar{padding:1px 3px 1px 1px}.scm-view .scm-input .scm-editor .scm-editor-toolbar.hidden{display:none}.scm-view .scm-input .scm-editor .scm-editor-toolbar.scroll-decoration{box-shadow:var(--vscode-scrollbar-shadow) 0 6px 6px -6px inset}.scm-view .scm-input .scm-editor .scm-editor-toolbar .action-label.codicon.codicon-debug-stop{color:var(--vscode-icon-foreground)!important}.scm-view .scm-editor-container .monaco-editor{border-radius:2px}.scm-view .scm-editor-container .monaco-editor .focused .selected-text{background-color:var(--vscode-editor-selectionBackground)}.scm-view .scm-editor{align-items:flex-start;background-color:var(--vscode-input-background);border:1px solid var(--vscode-input-border,transparent);border-radius:2px;box-sizing:border-box;display:flex;width:100%}.scm-view .button-container{align-items:center;display:flex;height:100%;padding-left:11px}.scm-view .button-container .codicon.codicon-cloud-upload,.scm-view .button-container .codicon.codicon-sync{margin:0 4px 0 0}.scm-view .button-container .codicon.codicon-arrow-down,.scm-view .button-container .codicon.codicon-arrow-up{font-size:small!important;margin:0 4px 0 0}.scm-view .button-container>.monaco-button-dropdown{flex-grow:1;overflow:hidden}.scm-view .button-container>.monaco-button-dropdown>.monaco-dropdown-button{align-items:center;display:flex;padding:0 4px}.scm-view .button-container>.monaco-button-dropdown>.monaco-button.monaco-text-button{min-width:0}.scm-view .button-container>.monaco-button-dropdown>.monaco-button.monaco-text-button>span:not(.codicon){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.scm-view .scm-editor.hidden{display:none}.monaco-workbench .part.panel .scm-view .scm-editor-container{outline:1px solid var(--vscode-panelInput-border)}.monaco-workbench .part.panel .scm-view .scm-editor.synthetic-focus,.scm-view .scm-editor.synthetic-focus{outline:1px solid var(--vscode-focusBorder);outline-offset:-1px}.scm-view .scm-editor.validation-info{outline:1px solid var(--vscode-inputValidation-infoBorder)!important;outline-offset:-1px}.scm-view .scm-editor.validation-warning{outline:1px solid var(--vscode-inputValidation-warningBorder)!important;outline-offset:-1px}.scm-view .scm-editor.validation-error{outline:1px solid var(--vscode-inputValidation-errorBorder)!important;outline-offset:-1px}.scm-editor-validation-container{border-bottom-left-radius:2px;border-bottom-right-radius:2px;border-style:solid;border-width:1px;border-top:none;box-sizing:border-box;display:flex;padding:2px}.scm-editor-validation-container.validation-info{background-color:var(--vscode-inputValidation-infoBackground);border-color:var(--vscode-inputValidation-infoBorder);color:var(--vscode-inputValidation-infoForeground)}.scm-editor-validation-container.validation-warning{background-color:var(--vscode-inputValidation-warningBackground);border-color:var(--vscode-inputValidation-warningBorder);color:var(--vscode-inputValidation-warningForeground)}.scm-editor-validation-container.validation-error{background-color:var(--vscode-inputValidation-errorBackground);border-color:var(--vscode-inputValidation-errorBorder);color:var(--vscode-inputValidation-errorForeground)}.scm-editor-validation{border-style:none;box-sizing:border-box;display:block;flex:auto;font-size:.9em;padding:1px 3px}.scm-editor-validation p{margin:0;padding:0}.scm-editor-validation a{color:var(--vscode-textLink-foreground);-webkit-user-select:none;user-select:none}.scm-editor-validation a:active,.scm-editor-validation a:hover{color:var(--vscode-textLink-activeForeground)}.scm-editor-validation-actions{align-self:start;margin-top:1px}.scm-view .scm-editor-placeholder{box-sizing:border-box;color:var(--vscode-input-placeholderForeground);overflow:hidden;padding:2px 6px;pointer-events:none;position:absolute;text-overflow:ellipsis;white-space:nowrap;z-index:1}.scm-view .scm-editor-placeholder.hidden{display:none}.monaco-workbench .part.basepanel>.content .scm-view .scm-editor-container .monaco-editor,.monaco-workbench .part.basepanel>.content .scm-view .scm-editor-container .monaco-editor .margin,.monaco-workbench .part.basepanel>.content .scm-view .scm-editor-container .monaco-editor .monaco-editor-background,.scm-view .scm-editor-container .monaco-editor,.scm-view .scm-editor-container .monaco-editor .margin,.scm-view .scm-editor-container .monaco-editor-background{background-color:var(--vscode-input-background);color:inherit}.scm-view .scm-editor-container .mtk1{color:var(--vscode-input-foreground)}.scm-repositories-view .scm-provider{margin:0 12px 0 20px;overflow:hidden}.scm-repositories-view .scm-provider>.label>.name{font-weight:400}";
|
|
3
|
+
var css = ".scm-view{height:100%;position:relative}.scm-overflow-widgets-container{height:0;left:0;overflow:visible;position:absolute;top:0;width:0;z-index:5000}.scm-view .monaco-tl-contents>div{overflow:hidden;padding-right:12px}.scm-view .count{display:flex;margin-left:6px}.scm-view .count.hidden{display:none}.scm-view .scm-provider{align-items:center;display:flex;flex-direction:column;flex-flow:nowrap;height:100%}.scm-view.auto-provider-counts .scm-provider>.count[data-count=\"0\"],.scm-view.hide-provider-counts .scm-provider>.count{display:none}.scm-view .scm-provider>.label{flex:1;min-width:50px;overflow:hidden;text-overflow:ellipsis}.scm-view .scm-provider>.label>.name{font-weight:700}.scm-view .scm-provider>.label>.description{font-size:.9em;margin-left:.5em;opacity:.7}.scm-view .scm-provider>.actions{justify-content:flex-end;overflow:hidden}.scm-view .scm-provider>.actions>.monaco-toolbar>.monaco-action-bar>.actions-container>.action-item{align-items:center;display:flex;padding-left:4px}.scm-view .scm-provider>.actions>.monaco-toolbar>.monaco-action-bar>.actions-container>.action-item:first-child{min-width:20px}.scm-view .scm-provider>.actions>.monaco-toolbar>.monaco-action-bar>.actions-container>.action-item>.action-label,.scm-view .scm-provider>.actions>.monaco-toolbar>.monaco-action-bar>.actions-container>.action-item>.monaco-dropdown>.dropdown-label>.action-label{align-items:center;display:flex;line-height:16px;overflow:hidden}.scm-view .scm-provider>.actions>.monaco-toolbar>.monaco-action-bar>.actions-container>.action-item>.action-label>.codicon{font-size:12px;justify-content:center}.scm-view .scm-provider>.actions>.monaco-toolbar>.monaco-action-bar>.actions-container>.action-item:last-of-type{padding-right:0}.scm-view .scm-provider>.body{flex-grow:1}.scm-view .scm-provider>.status>.monaco-action-bar>.actions-container{border-color:var(--vscode-sideBar-border)}.scm-view .monaco-list-row{line-height:22px}.scm-view .monaco-list-row .history,.scm-view .monaco-list-row .history-item-group,.scm-view .monaco-list-row .resource-group{align-items:center;display:flex;height:100%}.scm-view .monaco-list-row .history-item .monaco-icon-label,.scm-view .monaco-list-row .history-item-group .monaco-icon-label{align-items:center;flex-grow:1}.scm-view .monaco-list-row .history-item{align-items:center;display:flex}.scm-view .monaco-list-row .history-item>.graph-container{display:flex;flex-shrink:0;height:22px}.scm-view .monaco-list-row .history-item>.graph-container>.graph>circle{stroke:var(--vscode-sideBar-background)}.scm-view .monaco-list-row .history-item>.label-container{display:flex;flex-shrink:0;gap:4px;opacity:.75}.scm-view .monaco-list-row .history-item>.label-container>.codicon{border:1px solid var(--vscode-scm-historyItemStatisticsBorder);border-radius:2px;font-size:14px;margin:1px 0;padding:2px}.scm-view .monaco-list-row .history-item .stats-container{border:1px solid var(--vscode-scm-historyItemStatisticsBorder);border-radius:2px;display:flex;font-size:11px;gap:4px;line-height:11px;margin-left:6px;min-height:18px;padding:0 4px}.scm-view .monaco-list-row.focused .history-item .stats-container,.scm-view .monaco-list-row.selected .history-item .stats-container{border:1px solid var(--vscode-scm-historyItemSelectedStatisticsBorder)}.scm-view .monaco-list-row .history-item .stats-container>.deletions-label,.scm-view .monaco-list-row .history-item .stats-container>.files-label,.scm-view .monaco-list-row .history-item .stats-container>.insertions-label{align-items:center;display:flex;opacity:.75}.scm-view .monaco-list-row .history-item .stats-container>.insertions-label{color:var(--vscode-scm-historyItemAdditionsForeground)}.scm-view .monaco-list-row .history-item .stats-container>.deletions-label{color:var(--vscode-scm-historyItemDeletionsForeground)}.scm-view .monaco-list-row .history-item .stats-container.hidden,.scm-view .monaco-list-row .history-item .stats-container>.deletions-label.hidden,.scm-view .monaco-list-row .history-item .stats-container>.insertions-label.hidden{display:none}.scm-view .monaco-list-row .history-item .monaco-icon-label .icon-container,.scm-view .monaco-list-row .history-item-group .monaco-icon-label .icon-container{display:flex;padding-right:4px}.scm-view .monaco-list-row .history-item .monaco-icon-label .avatar{border-radius:14px;height:14px;width:14px}.scm-view .monaco-list-row .separator-container{align-items:center;display:flex;padding-left:11px}.scm-view .monaco-list-row .separator-container .label-name{font-size:10px}.scm-view .monaco-list-row.focused .separator-container .label-name,.scm-view .monaco-list-row.selected .separator-container .label-name{color:var(--vscode-foreground)}.scm-view .monaco-list-row .separator-container .separator{border-top:1px solid var(--vscode-sideBar-border);display:flex;flex-grow:1;height:0;margin-left:6px}.scm-view .monaco-list-row .separator-container .actions{padding-left:6px}.scm-view .monaco-list-row .history-item-group>.name,.scm-view .monaco-list-row .history>.name,.scm-view .monaco-list-row .resource-group>.name{flex:1;overflow:hidden;text-overflow:ellipsis}.scm-view .monaco-list-row .resource{display:flex;height:100%}.scm-view .monaco-list-row .resource.faded{opacity:.7}.scm-view .monaco-list-row .resource>.name{flex:1;overflow:hidden}.scm-view .monaco-list-row .resource>.name>.monaco-icon-label:after{margin-right:3px}.scm-view .monaco-list-row .resource>.decoration-icon{background-position:50% 50%;background-repeat:no-repeat;height:100%;margin-left:5px;width:16px}.scm-view .monaco-list-row .resource>.decoration-icon.codicon{margin-right:0;margin-top:3px}.scm-view .monaco-list .monaco-list-row .resource>.name>.monaco-icon-label>.actions{flex-grow:100}.scm-view .monaco-list .monaco-list-row .history-item-group>.actions,.scm-view .monaco-list .monaco-list-row .history-item>.actions,.scm-view .monaco-list .monaco-list-row .resource-group>.actions,.scm-view .monaco-list .monaco-list-row .resource>.name>.monaco-icon-label>.actions,.scm-view .monaco-list .monaco-list-row .separator-container>.actions{display:none;max-width:fit-content}.scm-view .monaco-list .monaco-list-row.focused .history-item-group>.actions,.scm-view .monaco-list .monaco-list-row.focused .history-item>.actions,.scm-view .monaco-list .monaco-list-row.focused .resource-group>.actions,.scm-view .monaco-list .monaco-list-row.focused .resource>.name>.monaco-icon-label>.actions,.scm-view .monaco-list .monaco-list-row.focused .separator-container>.actions,.scm-view .monaco-list .monaco-list-row:hover .history-item-group>.actions,.scm-view .monaco-list .monaco-list-row:hover .history-item>.actions,.scm-view .monaco-list .monaco-list-row:hover .resource-group>.actions,.scm-view .monaco-list .monaco-list-row:hover .resource>.name>.monaco-icon-label>.actions,.scm-view .monaco-list .monaco-list-row:hover .separator-container>.actions,.scm-view .monaco-list:not(.selection-multiple) .monaco-list-row .resource:hover>.actions{display:block}.scm-view .monaco-list .monaco-list-row.focused.force-no-hover,.scm-view .monaco-list .monaco-list-row.force-no-hover,.scm-view .monaco-list .monaco-list-row.selected.force-no-hover,.scm-view .monaco-list .monaco-list-row:hover.force-no-hover{background:transparent!important}.scm-view .monaco-list .monaco-list-row.cursor-default{cursor:default}.scm-view.show-actions .scm-provider>.actions,.scm-view.show-actions>.monaco-list .monaco-list-row .history-item-group>.actions,.scm-view.show-actions>.monaco-list .monaco-list-row .history-item>.actions,.scm-view.show-actions>.monaco-list .monaco-list-row .resource-group>.actions,.scm-view.show-actions>.monaco-list .monaco-list-row .resource>.name>.monaco-icon-label>.actions,.scm-view.show-actions>.monaco-list .monaco-list-row .scm-input>.scm-editor>.actions,.scm-view.show-actions>.monaco-list .monaco-list-row .separator-container>.actions{display:block}.scm-view .monaco-list-row .actions .action-label{padding:2px}.scm-view .scm-input{align-items:center;display:flex;height:100%;padding-left:11px}.scm-view .scm-input .scm-editor .scm-editor-toolbar{padding:1px 3px 1px 1px}.scm-view .scm-input .scm-editor .scm-editor-toolbar.hidden{display:none}.scm-view .scm-input .scm-editor .scm-editor-toolbar.scroll-decoration{box-shadow:var(--vscode-scrollbar-shadow) 0 6px 6px -6px inset}.scm-view .scm-input .scm-editor .scm-editor-toolbar .action-label.codicon.codicon-debug-stop{color:var(--vscode-icon-foreground)!important}.scm-view .scm-editor-container .monaco-editor{border-radius:2px}.scm-view .scm-editor{align-items:flex-start;background-color:var(--vscode-input-background);border:1px solid var(--vscode-input-border,transparent);border-radius:2px;box-sizing:border-box;display:flex;width:100%}.scm-view .button-container{align-items:center;display:flex;height:100%;padding-left:11px}.scm-view .button-container .codicon.codicon-cloud-upload,.scm-view .button-container .codicon.codicon-sync{margin:0 4px 0 0}.scm-view .button-container .codicon.codicon-arrow-down,.scm-view .button-container .codicon.codicon-arrow-up{font-size:small!important;margin:0 4px 0 0}.scm-view .button-container>.monaco-button-dropdown{flex-grow:1;overflow:hidden}.scm-view .button-container>.monaco-button-dropdown>.monaco-dropdown-button{align-items:center;display:flex;padding:0 4px}.scm-view .button-container>.monaco-button-dropdown>.monaco-button.monaco-text-button{min-width:0}.scm-view .button-container>.monaco-button-dropdown>.monaco-button.monaco-text-button>span:not(.codicon){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.scm-view .scm-editor.hidden{display:none}.monaco-workbench .part.panel .scm-view .scm-editor-container{outline:1px solid var(--vscode-panelInput-border)}.monaco-workbench .part.panel .scm-view .scm-editor.synthetic-focus,.scm-view .scm-editor.synthetic-focus{outline:1px solid var(--vscode-focusBorder);outline-offset:-1px}.scm-view .scm-editor.validation-info{outline:1px solid var(--vscode-inputValidation-infoBorder)!important;outline-offset:-1px}.scm-view .scm-editor.validation-warning{outline:1px solid var(--vscode-inputValidation-warningBorder)!important;outline-offset:-1px}.scm-view .scm-editor.validation-error{outline:1px solid var(--vscode-inputValidation-errorBorder)!important;outline-offset:-1px}.scm-editor-validation-container{border-bottom-left-radius:2px;border-bottom-right-radius:2px;border-style:solid;border-width:1px;border-top:none;box-sizing:border-box;display:flex;padding:2px}.scm-editor-validation-container.validation-info{background-color:var(--vscode-inputValidation-infoBackground);border-color:var(--vscode-inputValidation-infoBorder);color:var(--vscode-inputValidation-infoForeground)}.scm-editor-validation-container.validation-warning{background-color:var(--vscode-inputValidation-warningBackground);border-color:var(--vscode-inputValidation-warningBorder);color:var(--vscode-inputValidation-warningForeground)}.scm-editor-validation-container.validation-error{background-color:var(--vscode-inputValidation-errorBackground);border-color:var(--vscode-inputValidation-errorBorder);color:var(--vscode-inputValidation-errorForeground)}.scm-editor-validation{border-style:none;box-sizing:border-box;display:block;flex:auto;font-size:.9em;padding:1px 3px}.scm-editor-validation p{margin:0;padding:0}.scm-editor-validation a{color:var(--vscode-textLink-foreground);-webkit-user-select:none;user-select:none}.scm-editor-validation a:active,.scm-editor-validation a:hover{color:var(--vscode-textLink-activeForeground)}.scm-editor-validation-actions{align-self:start;margin-top:1px}.scm-view .scm-editor-placeholder{box-sizing:border-box;color:var(--vscode-input-placeholderForeground);overflow:hidden;padding:2px 6px;pointer-events:none;position:absolute;text-overflow:ellipsis;white-space:nowrap;z-index:1}.scm-view .scm-editor-placeholder.hidden{display:none}.monaco-workbench .part.basepanel>.content .scm-view .scm-editor-container .monaco-editor,.monaco-workbench .part.basepanel>.content .scm-view .scm-editor-container .monaco-editor .margin,.monaco-workbench .part.basepanel>.content .scm-view .scm-editor-container .monaco-editor .monaco-editor-background,.scm-view .scm-editor-container .monaco-editor,.scm-view .scm-editor-container .monaco-editor .margin,.scm-view .scm-editor-container .monaco-editor-background{background-color:var(--vscode-input-background);color:inherit}.scm-view .scm-editor-container .mtk1{color:var(--vscode-input-foreground)}.scm-repositories-view .scm-provider{margin:0 12px 0 20px;overflow:hidden}.scm-repositories-view .scm-provider>.label>.name{font-weight:400}";
|
|
4
4
|
n(css,{});
|
|
5
5
|
|
|
6
6
|
export { css, css as default };
|
|
@@ -226,7 +226,7 @@ let SCMHistoryProviderMenus = class SCMHistoryProviderMenus {
|
|
|
226
226
|
}
|
|
227
227
|
getOutgoingHistoryItemGroupMenu(menuId, historyItemGroup) {
|
|
228
228
|
const contextKeyService = this.contextKeyService.createOverlay([
|
|
229
|
-
['
|
|
229
|
+
['scmHistoryItemGroupHasRemote', !!historyItemGroup.repository.provider.historyProvider?.currentHistoryItemGroup?.remote],
|
|
230
230
|
]);
|
|
231
231
|
return this.menuService.createMenu(menuId, contextKeyService);
|
|
232
232
|
}
|
|
@@ -6,7 +6,7 @@ import { VIEWLET_ID, VIEW_PANE_ID, REPOSITORIES_VIEW_PANE_ID } from 'vscode/vsco
|
|
|
6
6
|
import { ISCMService } from 'vscode/vscode/vs/workbench/contrib/scm/common/scm.service';
|
|
7
7
|
import { KeyMod, KeyCode } from 'vscode/vscode/vs/base/common/keyCodes';
|
|
8
8
|
import { MenuRegistry, MenuId } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
9
|
-
import {
|
|
9
|
+
import { SCMActiveRepositoryController, SCMActiveResourceContextKeyController } from './activity.js';
|
|
10
10
|
import { LifecyclePhase } from 'vscode/vscode/vs/workbench/services/lifecycle/common/lifecycle';
|
|
11
11
|
import { Extensions as Extensions$2, ConfigurationScope } from 'vscode/vscode/vs/platform/configuration/common/configurationRegistry';
|
|
12
12
|
import { ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
|
|
@@ -115,11 +115,9 @@ viewsRegistry.registerViews([{
|
|
|
115
115
|
containerIcon: sourceControlViewIcon
|
|
116
116
|
}], viewContainer);
|
|
117
117
|
( (Registry.as(Extensions.Workbench)))
|
|
118
|
-
.registerWorkbenchContribution(
|
|
119
|
-
( (Registry.as(Extensions.Workbench)))
|
|
120
|
-
.registerWorkbenchContribution(SCMActiveRepositoryContextKeyController, LifecyclePhase.Restored);
|
|
118
|
+
.registerWorkbenchContribution(SCMActiveRepositoryController, LifecyclePhase.Restored);
|
|
121
119
|
( (Registry.as(Extensions.Workbench)))
|
|
122
|
-
.registerWorkbenchContribution(
|
|
120
|
+
.registerWorkbenchContribution(SCMActiveResourceContextKeyController, LifecyclePhase.Restored);
|
|
123
121
|
registerWorkbenchContribution2(SCMWorkingSetController.ID, SCMWorkingSetController, WorkbenchPhase.AfterRestored);
|
|
124
122
|
( (Registry.as(Extensions$2.Configuration))).registerConfiguration({
|
|
125
123
|
id: 'scm',
|
|
@@ -483,12 +481,21 @@ registerWorkbenchContribution2(SCMWorkingSetController.ID, SCMWorkingSetControll
|
|
|
483
481
|
"Controls the default working set to use when switching to a source control history item group that does not have a working set."
|
|
484
482
|
)),
|
|
485
483
|
default: 'current'
|
|
484
|
+
},
|
|
485
|
+
'scm.experimental.showHistoryGraph': {
|
|
486
|
+
type: 'boolean',
|
|
487
|
+
description: ( localizeWithPath(
|
|
488
|
+
_moduleId,
|
|
489
|
+
70,
|
|
490
|
+
"Controls whether to show the history graph instead of incoming/outgoing changes in the Source Control view."
|
|
491
|
+
)),
|
|
492
|
+
default: false
|
|
486
493
|
}
|
|
487
494
|
}
|
|
488
495
|
});
|
|
489
496
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
490
497
|
id: 'scm.acceptInput',
|
|
491
|
-
metadata: { description: ( localizeWithPath(_moduleId,
|
|
498
|
+
metadata: { description: ( localizeWithPath(_moduleId, 71, "Source Control: Accept Input")), args: [] },
|
|
492
499
|
weight: KeybindingWeight.WorkbenchContrib,
|
|
493
500
|
when: ( (ContextKeyExpr.has('scmRepository'))),
|
|
494
501
|
primary: KeyMod.CtrlCmd | KeyCode.Enter,
|
|
@@ -510,8 +517,25 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
510
517
|
return commandService.executeCommand(id, ...(args || []));
|
|
511
518
|
}
|
|
512
519
|
});
|
|
520
|
+
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
521
|
+
id: 'scm.clearInput',
|
|
522
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
523
|
+
when: ( (ContextKeyExpr.and(
|
|
524
|
+
(ContextKeyExpr.has('scmRepository')),
|
|
525
|
+
(Context.Visible.toNegated())
|
|
526
|
+
))),
|
|
527
|
+
primary: KeyCode.Escape,
|
|
528
|
+
handler: async (accessor) => {
|
|
529
|
+
const scmService = accessor.get(ISCMService);
|
|
530
|
+
const contextKeyService = accessor.get(IContextKeyService);
|
|
531
|
+
const context = contextKeyService.getContext(getActiveElement());
|
|
532
|
+
const repositoryId = context.getValue('scmRepository');
|
|
533
|
+
const repository = repositoryId ? scmService.getRepository(repositoryId) : undefined;
|
|
534
|
+
repository?.input.setValue('', true);
|
|
535
|
+
}
|
|
536
|
+
});
|
|
513
537
|
const viewNextCommitCommand = {
|
|
514
|
-
description: { description: ( localizeWithPath(_moduleId,
|
|
538
|
+
description: { description: ( localizeWithPath(_moduleId, 72, "Source Control: View Next Commit")), args: [] },
|
|
515
539
|
weight: KeybindingWeight.WorkbenchContrib,
|
|
516
540
|
handler: (accessor) => {
|
|
517
541
|
const contextKeyService = accessor.get(IContextKeyService);
|
|
@@ -523,7 +547,7 @@ const viewNextCommitCommand = {
|
|
|
523
547
|
}
|
|
524
548
|
};
|
|
525
549
|
const viewPreviousCommitCommand = {
|
|
526
|
-
description: { description: ( localizeWithPath(_moduleId,
|
|
550
|
+
description: { description: ( localizeWithPath(_moduleId, 73, "Source Control: View Previous Commit")), args: [] },
|
|
527
551
|
weight: KeybindingWeight.WorkbenchContrib,
|
|
528
552
|
handler: (accessor) => {
|
|
529
553
|
const contextKeyService = accessor.get(IContextKeyService);
|
|
@@ -584,7 +608,7 @@ MenuRegistry.appendMenuItem(MenuId.SCMSourceControl, {
|
|
|
584
608
|
group: '100_end',
|
|
585
609
|
command: {
|
|
586
610
|
id: 'scm.openInTerminal',
|
|
587
|
-
title: ( localizeWithPath(_moduleId,
|
|
611
|
+
title: ( localizeWithPath(_moduleId, 74, "Open in External Terminal"))
|
|
588
612
|
},
|
|
589
613
|
when: ( (ContextKeyExpr.and(
|
|
590
614
|
(ContextKeyExpr.equals('scmProviderHasRootUri', true)),
|
|
@@ -598,7 +622,7 @@ MenuRegistry.appendMenuItem(MenuId.SCMSourceControl, {
|
|
|
598
622
|
group: '100_end',
|
|
599
623
|
command: {
|
|
600
624
|
id: 'scm.openInIntegratedTerminal',
|
|
601
|
-
title: ( localizeWithPath(_moduleId,
|
|
625
|
+
title: ( localizeWithPath(_moduleId, 75, "Open in Integrated Terminal"))
|
|
602
626
|
},
|
|
603
627
|
when: ( (ContextKeyExpr.and(
|
|
604
628
|
(ContextKeyExpr.equals('scmProviderHasRootUri', true)),
|