@codingame/monaco-vscode-scm-service-override 3.2.3 → 4.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.
- package/package.json +2 -2
- package/scm.js +4 -4
- package/external/rollup-plugin-styles/dist/runtime/inject-css.js +0 -3
- package/external/tslib/tslib.es6.js +0 -11
- package/vscode/src/vs/workbench/contrib/scm/browser/activity.js +0 -308
- package/vscode/src/vs/workbench/contrib/scm/browser/media/scm.css.js +0 -6
- package/vscode/src/vs/workbench/contrib/scm/browser/menus.js +0 -280
- package/vscode/src/vs/workbench/contrib/scm/browser/scm.contribution.js +0 -698
- package/vscode/src/vs/workbench/contrib/scm/browser/scmRepositoriesViewPane.js +0 -174
- package/vscode/src/vs/workbench/contrib/scm/browser/scmRepositoryRenderer.js +0 -136
- package/vscode/src/vs/workbench/contrib/scm/browser/scmViewPane.js +0 -3356
- package/vscode/src/vs/workbench/contrib/scm/browser/scmViewPaneContainer.js +0 -54
- package/vscode/src/vs/workbench/contrib/scm/browser/scmViewService.js +0 -305
- package/vscode/src/vs/workbench/contrib/scm/browser/util.js +0 -121
- package/vscode/src/vs/workbench/contrib/scm/common/quickDiffService.js +0 -76
- package/vscode/src/vs/workbench/contrib/scm/common/scmService.js +0 -312
|
@@ -1,698 +0,0 @@
|
|
|
1
|
-
import { localizeWithPath, localize2WithPath } from 'vscode/vscode/vs/nls';
|
|
2
|
-
import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
|
|
3
|
-
import { Extensions } from 'vscode/vscode/vs/workbench/common/contributions';
|
|
4
|
-
import { DirtyDiffWorkbenchController } from 'vscode/vscode/vs/workbench/contrib/scm/browser/dirtydiffDecorator';
|
|
5
|
-
import { VIEWLET_ID, VIEW_PANE_ID, REPOSITORIES_VIEW_PANE_ID, ISCMService } from 'vscode/vscode/vs/workbench/contrib/scm/common/scm';
|
|
6
|
-
import { MenuRegistry, MenuId } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
7
|
-
import { SCMActiveResourceContextKeyController, SCMActiveRepositoryContextKeyController, SCMStatusController } from './activity.js';
|
|
8
|
-
import { Extensions as Extensions$2 } from 'vscode/vscode/vs/platform/configuration/common/configurationRegistry';
|
|
9
|
-
import { ContextKeyExpr, IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
|
|
10
|
-
import { ICommandService, CommandsRegistry } from 'vscode/vscode/vs/platform/commands/common/commands';
|
|
11
|
-
import { KeybindingsRegistry } from 'vscode/vscode/vs/platform/keybinding/common/keybindingsRegistry';
|
|
12
|
-
import { Extensions as Extensions$1 } from 'vscode/vscode/vs/workbench/common/views';
|
|
13
|
-
import { SCMViewPaneContainer } from './scmViewPaneContainer.js';
|
|
14
|
-
import { SyncDescriptor } from 'vscode/vscode/vs/platform/instantiation/common/descriptors';
|
|
15
|
-
import { ModesRegistry } from 'vscode/vscode/vs/editor/common/languages/modesRegistry';
|
|
16
|
-
import { Codicon } from 'vscode/vscode/vs/base/common/codicons';
|
|
17
|
-
import { registerIcon } from 'vscode/vscode/vs/platform/theme/common/iconRegistry';
|
|
18
|
-
import { SCMViewPane } from './scmViewPane.js';
|
|
19
|
-
import { SCMRepositoriesViewPane } from './scmRepositoriesViewPane.js';
|
|
20
|
-
import { Context } from 'vscode/vscode/vs/editor/contrib/suggest/browser/suggest';
|
|
21
|
-
import { WorkspaceTrustContext, MANAGE_TRUST_COMMAND_ID } from 'vscode/vscode/vs/workbench/contrib/workspace/common/workspace';
|
|
22
|
-
import { getActiveElement } from 'vscode/vscode/vs/base/browser/dom';
|
|
23
|
-
|
|
24
|
-
ModesRegistry.registerLanguage({
|
|
25
|
-
id: 'scminput',
|
|
26
|
-
extensions: [],
|
|
27
|
-
aliases: [],
|
|
28
|
-
mimetypes: ['text/x-scm-input']
|
|
29
|
-
});
|
|
30
|
-
( Registry.as(Extensions.Workbench))
|
|
31
|
-
.registerWorkbenchContribution(DirtyDiffWorkbenchController, 3 );
|
|
32
|
-
const sourceControlViewIcon = registerIcon('source-control-view-icon', Codicon.sourceControl, ( localizeWithPath(
|
|
33
|
-
'vs/workbench/contrib/scm/browser/scm.contribution',
|
|
34
|
-
'sourceControlViewIcon',
|
|
35
|
-
'View icon of the Source Control view.'
|
|
36
|
-
)));
|
|
37
|
-
const viewContainer = ( Registry.as(Extensions$1.ViewContainersRegistry)).registerViewContainer({
|
|
38
|
-
id: VIEWLET_ID,
|
|
39
|
-
title: ( localize2WithPath(
|
|
40
|
-
'vs/workbench/contrib/scm/browser/scm.contribution',
|
|
41
|
-
'source control',
|
|
42
|
-
'Source Control'
|
|
43
|
-
)),
|
|
44
|
-
ctorDescriptor: ( new SyncDescriptor(SCMViewPaneContainer)),
|
|
45
|
-
storageId: 'workbench.scm.views.state',
|
|
46
|
-
icon: sourceControlViewIcon,
|
|
47
|
-
alwaysUseContainerInfo: true,
|
|
48
|
-
order: 2,
|
|
49
|
-
hideIfEmpty: true,
|
|
50
|
-
}, 0 , { doNotRegisterOpenCommand: true });
|
|
51
|
-
const viewsRegistry = ( Registry.as(Extensions$1.ViewsRegistry));
|
|
52
|
-
viewsRegistry.registerViewWelcomeContent(VIEW_PANE_ID, {
|
|
53
|
-
content: ( localizeWithPath(
|
|
54
|
-
'vs/workbench/contrib/scm/browser/scm.contribution',
|
|
55
|
-
'no open repo',
|
|
56
|
-
"No source control providers registered."
|
|
57
|
-
)),
|
|
58
|
-
when: 'default'
|
|
59
|
-
});
|
|
60
|
-
viewsRegistry.registerViewWelcomeContent(VIEW_PANE_ID, {
|
|
61
|
-
content: ( localizeWithPath(
|
|
62
|
-
'vs/workbench/contrib/scm/browser/scm.contribution',
|
|
63
|
-
'no open repo in an untrusted workspace',
|
|
64
|
-
"None of the registered source control providers work in Restricted Mode."
|
|
65
|
-
)),
|
|
66
|
-
when: ( ContextKeyExpr.and(( ContextKeyExpr.equals('scm.providerCount', 0)), WorkspaceTrustContext.IsEnabled, ( WorkspaceTrustContext.IsTrusted.toNegated())))
|
|
67
|
-
});
|
|
68
|
-
viewsRegistry.registerViewWelcomeContent(VIEW_PANE_ID, {
|
|
69
|
-
content: `[${( localizeWithPath(
|
|
70
|
-
'vs/workbench/contrib/scm/browser/scm.contribution',
|
|
71
|
-
'manageWorkspaceTrustAction',
|
|
72
|
-
"Manage Workspace Trust"
|
|
73
|
-
))}](command:${MANAGE_TRUST_COMMAND_ID})`,
|
|
74
|
-
when: ( ContextKeyExpr.and(( ContextKeyExpr.equals('scm.providerCount', 0)), WorkspaceTrustContext.IsEnabled, ( WorkspaceTrustContext.IsTrusted.toNegated())))
|
|
75
|
-
});
|
|
76
|
-
viewsRegistry.registerViews([{
|
|
77
|
-
id: VIEW_PANE_ID,
|
|
78
|
-
name: ( localize2WithPath(
|
|
79
|
-
'vs/workbench/contrib/scm/browser/scm.contribution',
|
|
80
|
-
'source control',
|
|
81
|
-
'Source Control'
|
|
82
|
-
)),
|
|
83
|
-
ctorDescriptor: ( new SyncDescriptor(SCMViewPane)),
|
|
84
|
-
canToggleVisibility: true,
|
|
85
|
-
canMoveView: true,
|
|
86
|
-
weight: 80,
|
|
87
|
-
order: -999,
|
|
88
|
-
containerIcon: sourceControlViewIcon,
|
|
89
|
-
openCommandActionDescriptor: {
|
|
90
|
-
id: viewContainer.id,
|
|
91
|
-
mnemonicTitle: ( localizeWithPath(
|
|
92
|
-
'vs/workbench/contrib/scm/browser/scm.contribution',
|
|
93
|
-
{ key: 'miViewSCM', comment: ['&& denotes a mnemonic'] },
|
|
94
|
-
"Source &&Control"
|
|
95
|
-
)),
|
|
96
|
-
keybindings: {
|
|
97
|
-
primary: 0,
|
|
98
|
-
win: { primary: 2048 | 1024 | 37 },
|
|
99
|
-
linux: { primary: 2048 | 1024 | 37 },
|
|
100
|
-
mac: { primary: 256 | 1024 | 37 },
|
|
101
|
-
},
|
|
102
|
-
order: 2,
|
|
103
|
-
}
|
|
104
|
-
}], viewContainer);
|
|
105
|
-
viewsRegistry.registerViews([{
|
|
106
|
-
id: REPOSITORIES_VIEW_PANE_ID,
|
|
107
|
-
name: ( localize2WithPath(
|
|
108
|
-
'vs/workbench/contrib/scm/browser/scm.contribution',
|
|
109
|
-
'source control repositories',
|
|
110
|
-
"Source Control Repositories"
|
|
111
|
-
)),
|
|
112
|
-
ctorDescriptor: ( new SyncDescriptor(SCMRepositoriesViewPane)),
|
|
113
|
-
canToggleVisibility: true,
|
|
114
|
-
hideByDefault: true,
|
|
115
|
-
canMoveView: true,
|
|
116
|
-
weight: 20,
|
|
117
|
-
order: -1000,
|
|
118
|
-
when: ( ContextKeyExpr.and(( ContextKeyExpr.has('scm.providerCount')), ( ContextKeyExpr.notEquals('scm.providerCount', 0)))),
|
|
119
|
-
containerIcon: sourceControlViewIcon
|
|
120
|
-
}], viewContainer);
|
|
121
|
-
( Registry.as(Extensions.Workbench))
|
|
122
|
-
.registerWorkbenchContribution(SCMActiveResourceContextKeyController, 3 );
|
|
123
|
-
( Registry.as(Extensions.Workbench))
|
|
124
|
-
.registerWorkbenchContribution(SCMActiveRepositoryContextKeyController, 3 );
|
|
125
|
-
( Registry.as(Extensions.Workbench))
|
|
126
|
-
.registerWorkbenchContribution(SCMStatusController, 3 );
|
|
127
|
-
( Registry.as(Extensions$2.Configuration)).registerConfiguration({
|
|
128
|
-
id: 'scm',
|
|
129
|
-
order: 5,
|
|
130
|
-
title: ( localizeWithPath(
|
|
131
|
-
'vs/workbench/contrib/scm/browser/scm.contribution',
|
|
132
|
-
'scmConfigurationTitle',
|
|
133
|
-
"Source Control"
|
|
134
|
-
)),
|
|
135
|
-
type: 'object',
|
|
136
|
-
scope: 4 ,
|
|
137
|
-
properties: {
|
|
138
|
-
'scm.diffDecorations': {
|
|
139
|
-
type: 'string',
|
|
140
|
-
enum: ['all', 'gutter', 'overview', 'minimap', 'none'],
|
|
141
|
-
enumDescriptions: [
|
|
142
|
-
( localizeWithPath(
|
|
143
|
-
'vs/workbench/contrib/scm/browser/scm.contribution',
|
|
144
|
-
'scm.diffDecorations.all',
|
|
145
|
-
"Show the diff decorations in all available locations."
|
|
146
|
-
)),
|
|
147
|
-
( localizeWithPath(
|
|
148
|
-
'vs/workbench/contrib/scm/browser/scm.contribution',
|
|
149
|
-
'scm.diffDecorations.gutter',
|
|
150
|
-
"Show the diff decorations only in the editor gutter."
|
|
151
|
-
)),
|
|
152
|
-
( localizeWithPath(
|
|
153
|
-
'vs/workbench/contrib/scm/browser/scm.contribution',
|
|
154
|
-
'scm.diffDecorations.overviewRuler',
|
|
155
|
-
"Show the diff decorations only in the overview ruler."
|
|
156
|
-
)),
|
|
157
|
-
( localizeWithPath(
|
|
158
|
-
'vs/workbench/contrib/scm/browser/scm.contribution',
|
|
159
|
-
'scm.diffDecorations.minimap',
|
|
160
|
-
"Show the diff decorations only in the minimap."
|
|
161
|
-
)),
|
|
162
|
-
( localizeWithPath(
|
|
163
|
-
'vs/workbench/contrib/scm/browser/scm.contribution',
|
|
164
|
-
'scm.diffDecorations.none',
|
|
165
|
-
"Do not show the diff decorations."
|
|
166
|
-
))
|
|
167
|
-
],
|
|
168
|
-
default: 'all',
|
|
169
|
-
description: ( localizeWithPath(
|
|
170
|
-
'vs/workbench/contrib/scm/browser/scm.contribution',
|
|
171
|
-
'diffDecorations',
|
|
172
|
-
"Controls diff decorations in the editor."
|
|
173
|
-
))
|
|
174
|
-
},
|
|
175
|
-
'scm.diffDecorationsGutterWidth': {
|
|
176
|
-
type: 'number',
|
|
177
|
-
enum: [1, 2, 3, 4, 5],
|
|
178
|
-
default: 3,
|
|
179
|
-
description: ( localizeWithPath(
|
|
180
|
-
'vs/workbench/contrib/scm/browser/scm.contribution',
|
|
181
|
-
'diffGutterWidth',
|
|
182
|
-
"Controls the width(px) of diff decorations in gutter (added & modified)."
|
|
183
|
-
))
|
|
184
|
-
},
|
|
185
|
-
'scm.diffDecorationsGutterVisibility': {
|
|
186
|
-
type: 'string',
|
|
187
|
-
enum: ['always', 'hover'],
|
|
188
|
-
enumDescriptions: [
|
|
189
|
-
( localizeWithPath(
|
|
190
|
-
'vs/workbench/contrib/scm/browser/scm.contribution',
|
|
191
|
-
'scm.diffDecorationsGutterVisibility.always',
|
|
192
|
-
"Show the diff decorator in the gutter at all times."
|
|
193
|
-
)),
|
|
194
|
-
( localizeWithPath(
|
|
195
|
-
'vs/workbench/contrib/scm/browser/scm.contribution',
|
|
196
|
-
'scm.diffDecorationsGutterVisibility.hover',
|
|
197
|
-
"Show the diff decorator in the gutter only on hover."
|
|
198
|
-
))
|
|
199
|
-
],
|
|
200
|
-
description: ( localizeWithPath(
|
|
201
|
-
'vs/workbench/contrib/scm/browser/scm.contribution',
|
|
202
|
-
'scm.diffDecorationsGutterVisibility',
|
|
203
|
-
"Controls the visibility of the Source Control diff decorator in the gutter."
|
|
204
|
-
)),
|
|
205
|
-
default: 'always'
|
|
206
|
-
},
|
|
207
|
-
'scm.diffDecorationsGutterAction': {
|
|
208
|
-
type: 'string',
|
|
209
|
-
enum: ['diff', 'none'],
|
|
210
|
-
enumDescriptions: [
|
|
211
|
-
( localizeWithPath(
|
|
212
|
-
'vs/workbench/contrib/scm/browser/scm.contribution',
|
|
213
|
-
'scm.diffDecorationsGutterAction.diff',
|
|
214
|
-
"Show the inline diff Peek view on click."
|
|
215
|
-
)),
|
|
216
|
-
( localizeWithPath(
|
|
217
|
-
'vs/workbench/contrib/scm/browser/scm.contribution',
|
|
218
|
-
'scm.diffDecorationsGutterAction.none',
|
|
219
|
-
"Do nothing."
|
|
220
|
-
))
|
|
221
|
-
],
|
|
222
|
-
description: ( localizeWithPath(
|
|
223
|
-
'vs/workbench/contrib/scm/browser/scm.contribution',
|
|
224
|
-
'scm.diffDecorationsGutterAction',
|
|
225
|
-
"Controls the behavior of Source Control diff gutter decorations."
|
|
226
|
-
)),
|
|
227
|
-
default: 'diff'
|
|
228
|
-
},
|
|
229
|
-
'scm.diffDecorationsGutterPattern': {
|
|
230
|
-
type: 'object',
|
|
231
|
-
description: ( localizeWithPath(
|
|
232
|
-
'vs/workbench/contrib/scm/browser/scm.contribution',
|
|
233
|
-
'diffGutterPattern',
|
|
234
|
-
"Controls whether a pattern is used for the diff decorations in gutter."
|
|
235
|
-
)),
|
|
236
|
-
additionalProperties: false,
|
|
237
|
-
properties: {
|
|
238
|
-
'added': {
|
|
239
|
-
type: 'boolean',
|
|
240
|
-
description: ( localizeWithPath(
|
|
241
|
-
'vs/workbench/contrib/scm/browser/scm.contribution',
|
|
242
|
-
'diffGutterPatternAdded',
|
|
243
|
-
"Use pattern for the diff decorations in gutter for added lines."
|
|
244
|
-
)),
|
|
245
|
-
},
|
|
246
|
-
'modified': {
|
|
247
|
-
type: 'boolean',
|
|
248
|
-
description: ( localizeWithPath(
|
|
249
|
-
'vs/workbench/contrib/scm/browser/scm.contribution',
|
|
250
|
-
'diffGutterPatternModifed',
|
|
251
|
-
"Use pattern for the diff decorations in gutter for modified lines."
|
|
252
|
-
)),
|
|
253
|
-
},
|
|
254
|
-
},
|
|
255
|
-
default: {
|
|
256
|
-
'added': false,
|
|
257
|
-
'modified': true
|
|
258
|
-
}
|
|
259
|
-
},
|
|
260
|
-
'scm.diffDecorationsIgnoreTrimWhitespace': {
|
|
261
|
-
type: 'string',
|
|
262
|
-
enum: ['true', 'false', 'inherit'],
|
|
263
|
-
enumDescriptions: [
|
|
264
|
-
( localizeWithPath(
|
|
265
|
-
'vs/workbench/contrib/scm/browser/scm.contribution',
|
|
266
|
-
'scm.diffDecorationsIgnoreTrimWhitespace.true',
|
|
267
|
-
"Ignore leading and trailing whitespace."
|
|
268
|
-
)),
|
|
269
|
-
( localizeWithPath(
|
|
270
|
-
'vs/workbench/contrib/scm/browser/scm.contribution',
|
|
271
|
-
'scm.diffDecorationsIgnoreTrimWhitespace.false',
|
|
272
|
-
"Do not ignore leading and trailing whitespace."
|
|
273
|
-
)),
|
|
274
|
-
( localizeWithPath(
|
|
275
|
-
'vs/workbench/contrib/scm/browser/scm.contribution',
|
|
276
|
-
'scm.diffDecorationsIgnoreTrimWhitespace.inherit',
|
|
277
|
-
"Inherit from `diffEditor.ignoreTrimWhitespace`."
|
|
278
|
-
))
|
|
279
|
-
],
|
|
280
|
-
description: ( localizeWithPath(
|
|
281
|
-
'vs/workbench/contrib/scm/browser/scm.contribution',
|
|
282
|
-
'diffDecorationsIgnoreTrimWhitespace',
|
|
283
|
-
"Controls whether leading and trailing whitespace is ignored in Source Control diff gutter decorations."
|
|
284
|
-
)),
|
|
285
|
-
default: 'false'
|
|
286
|
-
},
|
|
287
|
-
'scm.alwaysShowActions': {
|
|
288
|
-
type: 'boolean',
|
|
289
|
-
description: ( localizeWithPath(
|
|
290
|
-
'vs/workbench/contrib/scm/browser/scm.contribution',
|
|
291
|
-
'alwaysShowActions',
|
|
292
|
-
"Controls whether inline actions are always visible in the Source Control view."
|
|
293
|
-
)),
|
|
294
|
-
default: false
|
|
295
|
-
},
|
|
296
|
-
'scm.countBadge': {
|
|
297
|
-
type: 'string',
|
|
298
|
-
enum: ['all', 'focused', 'off'],
|
|
299
|
-
enumDescriptions: [
|
|
300
|
-
( localizeWithPath(
|
|
301
|
-
'vs/workbench/contrib/scm/browser/scm.contribution',
|
|
302
|
-
'scm.countBadge.all',
|
|
303
|
-
"Show the sum of all Source Control Provider count badges."
|
|
304
|
-
)),
|
|
305
|
-
( localizeWithPath(
|
|
306
|
-
'vs/workbench/contrib/scm/browser/scm.contribution',
|
|
307
|
-
'scm.countBadge.focused',
|
|
308
|
-
"Show the count badge of the focused Source Control Provider."
|
|
309
|
-
)),
|
|
310
|
-
( localizeWithPath(
|
|
311
|
-
'vs/workbench/contrib/scm/browser/scm.contribution',
|
|
312
|
-
'scm.countBadge.off',
|
|
313
|
-
"Disable the Source Control count badge."
|
|
314
|
-
))
|
|
315
|
-
],
|
|
316
|
-
description: ( localizeWithPath(
|
|
317
|
-
'vs/workbench/contrib/scm/browser/scm.contribution',
|
|
318
|
-
'scm.countBadge',
|
|
319
|
-
"Controls the count badge on the Source Control icon on the Activity Bar."
|
|
320
|
-
)),
|
|
321
|
-
default: 'all'
|
|
322
|
-
},
|
|
323
|
-
'scm.providerCountBadge': {
|
|
324
|
-
type: 'string',
|
|
325
|
-
enum: ['hidden', 'auto', 'visible'],
|
|
326
|
-
enumDescriptions: [
|
|
327
|
-
( localizeWithPath(
|
|
328
|
-
'vs/workbench/contrib/scm/browser/scm.contribution',
|
|
329
|
-
'scm.providerCountBadge.hidden',
|
|
330
|
-
"Hide Source Control Provider count badges."
|
|
331
|
-
)),
|
|
332
|
-
( localizeWithPath(
|
|
333
|
-
'vs/workbench/contrib/scm/browser/scm.contribution',
|
|
334
|
-
'scm.providerCountBadge.auto',
|
|
335
|
-
"Only show count badge for Source Control Provider when non-zero."
|
|
336
|
-
)),
|
|
337
|
-
( localizeWithPath(
|
|
338
|
-
'vs/workbench/contrib/scm/browser/scm.contribution',
|
|
339
|
-
'scm.providerCountBadge.visible',
|
|
340
|
-
"Show Source Control Provider count badges."
|
|
341
|
-
))
|
|
342
|
-
],
|
|
343
|
-
markdownDescription: ( localizeWithPath(
|
|
344
|
-
'vs/workbench/contrib/scm/browser/scm.contribution',
|
|
345
|
-
'scm.providerCountBadge',
|
|
346
|
-
"Controls the count badges on Source Control Provider headers. These headers appear in the Source Control view when there is more than one provider or when the {0} setting is enabled, and in the Source Control Repositories view.",
|
|
347
|
-
'\`#scm.alwaysShowRepositories#\`'
|
|
348
|
-
)),
|
|
349
|
-
default: 'hidden'
|
|
350
|
-
},
|
|
351
|
-
'scm.defaultViewMode': {
|
|
352
|
-
type: 'string',
|
|
353
|
-
enum: ['tree', 'list'],
|
|
354
|
-
enumDescriptions: [
|
|
355
|
-
( localizeWithPath(
|
|
356
|
-
'vs/workbench/contrib/scm/browser/scm.contribution',
|
|
357
|
-
'scm.defaultViewMode.tree',
|
|
358
|
-
"Show the repository changes as a tree."
|
|
359
|
-
)),
|
|
360
|
-
( localizeWithPath(
|
|
361
|
-
'vs/workbench/contrib/scm/browser/scm.contribution',
|
|
362
|
-
'scm.defaultViewMode.list',
|
|
363
|
-
"Show the repository changes as a list."
|
|
364
|
-
))
|
|
365
|
-
],
|
|
366
|
-
description: ( localizeWithPath(
|
|
367
|
-
'vs/workbench/contrib/scm/browser/scm.contribution',
|
|
368
|
-
'scm.defaultViewMode',
|
|
369
|
-
"Controls the default Source Control repository view mode."
|
|
370
|
-
)),
|
|
371
|
-
default: 'list'
|
|
372
|
-
},
|
|
373
|
-
'scm.defaultViewSortKey': {
|
|
374
|
-
type: 'string',
|
|
375
|
-
enum: ['name', 'path', 'status'],
|
|
376
|
-
enumDescriptions: [
|
|
377
|
-
( localizeWithPath(
|
|
378
|
-
'vs/workbench/contrib/scm/browser/scm.contribution',
|
|
379
|
-
'scm.defaultViewSortKey.name',
|
|
380
|
-
"Sort the repository changes by file name."
|
|
381
|
-
)),
|
|
382
|
-
( localizeWithPath(
|
|
383
|
-
'vs/workbench/contrib/scm/browser/scm.contribution',
|
|
384
|
-
'scm.defaultViewSortKey.path',
|
|
385
|
-
"Sort the repository changes by path."
|
|
386
|
-
)),
|
|
387
|
-
( localizeWithPath(
|
|
388
|
-
'vs/workbench/contrib/scm/browser/scm.contribution',
|
|
389
|
-
'scm.defaultViewSortKey.status',
|
|
390
|
-
"Sort the repository changes by Source Control status."
|
|
391
|
-
))
|
|
392
|
-
],
|
|
393
|
-
description: ( localizeWithPath(
|
|
394
|
-
'vs/workbench/contrib/scm/browser/scm.contribution',
|
|
395
|
-
'scm.defaultViewSortKey',
|
|
396
|
-
"Controls the default Source Control repository changes sort order when viewed as a list."
|
|
397
|
-
)),
|
|
398
|
-
default: 'path'
|
|
399
|
-
},
|
|
400
|
-
'scm.autoReveal': {
|
|
401
|
-
type: 'boolean',
|
|
402
|
-
description: ( localizeWithPath(
|
|
403
|
-
'vs/workbench/contrib/scm/browser/scm.contribution',
|
|
404
|
-
'autoReveal',
|
|
405
|
-
"Controls whether the Source Control view should automatically reveal and select files when opening them."
|
|
406
|
-
)),
|
|
407
|
-
default: true
|
|
408
|
-
},
|
|
409
|
-
'scm.inputFontFamily': {
|
|
410
|
-
type: 'string',
|
|
411
|
-
markdownDescription: ( localizeWithPath(
|
|
412
|
-
'vs/workbench/contrib/scm/browser/scm.contribution',
|
|
413
|
-
'inputFontFamily',
|
|
414
|
-
"Controls the font for the input message. Use `default` for the workbench user interface font family, `editor` for the `#editor.fontFamily#`'s value, or a custom font family."
|
|
415
|
-
)),
|
|
416
|
-
default: 'default'
|
|
417
|
-
},
|
|
418
|
-
'scm.inputFontSize': {
|
|
419
|
-
type: 'number',
|
|
420
|
-
markdownDescription: ( localizeWithPath(
|
|
421
|
-
'vs/workbench/contrib/scm/browser/scm.contribution',
|
|
422
|
-
'inputFontSize',
|
|
423
|
-
"Controls the font size for the input message in pixels."
|
|
424
|
-
)),
|
|
425
|
-
default: 13
|
|
426
|
-
},
|
|
427
|
-
'scm.inputMaxLineCount': {
|
|
428
|
-
type: 'number',
|
|
429
|
-
markdownDescription: ( localizeWithPath(
|
|
430
|
-
'vs/workbench/contrib/scm/browser/scm.contribution',
|
|
431
|
-
'inputMaxLines',
|
|
432
|
-
"Controls the maximum number of lines that the input will auto-grow to."
|
|
433
|
-
)),
|
|
434
|
-
minimum: 1,
|
|
435
|
-
maximum: 50,
|
|
436
|
-
default: 10
|
|
437
|
-
},
|
|
438
|
-
'scm.inputMinLineCount': {
|
|
439
|
-
type: 'number',
|
|
440
|
-
markdownDescription: ( localizeWithPath(
|
|
441
|
-
'vs/workbench/contrib/scm/browser/scm.contribution',
|
|
442
|
-
'inputMinLines',
|
|
443
|
-
"Controls the minimum number of lines that the input will auto-grow from."
|
|
444
|
-
)),
|
|
445
|
-
minimum: 1,
|
|
446
|
-
maximum: 50,
|
|
447
|
-
default: 1
|
|
448
|
-
},
|
|
449
|
-
'scm.alwaysShowRepositories': {
|
|
450
|
-
type: 'boolean',
|
|
451
|
-
markdownDescription: ( localizeWithPath(
|
|
452
|
-
'vs/workbench/contrib/scm/browser/scm.contribution',
|
|
453
|
-
'alwaysShowRepository',
|
|
454
|
-
"Controls whether repositories should always be visible in the Source Control view."
|
|
455
|
-
)),
|
|
456
|
-
default: false
|
|
457
|
-
},
|
|
458
|
-
'scm.repositories.sortOrder': {
|
|
459
|
-
type: 'string',
|
|
460
|
-
enum: ['discovery time', 'name', 'path'],
|
|
461
|
-
enumDescriptions: [
|
|
462
|
-
( localizeWithPath(
|
|
463
|
-
'vs/workbench/contrib/scm/browser/scm.contribution',
|
|
464
|
-
'scm.repositoriesSortOrder.discoveryTime',
|
|
465
|
-
"Repositories in the Source Control Repositories view are sorted by discovery time. Repositories in the Source Control view are sorted in the order that they were selected."
|
|
466
|
-
)),
|
|
467
|
-
( localizeWithPath(
|
|
468
|
-
'vs/workbench/contrib/scm/browser/scm.contribution',
|
|
469
|
-
'scm.repositoriesSortOrder.name',
|
|
470
|
-
"Repositories in the Source Control Repositories and Source Control views are sorted by repository name."
|
|
471
|
-
)),
|
|
472
|
-
( localizeWithPath(
|
|
473
|
-
'vs/workbench/contrib/scm/browser/scm.contribution',
|
|
474
|
-
'scm.repositoriesSortOrder.path',
|
|
475
|
-
"Repositories in the Source Control Repositories and Source Control views are sorted by repository path."
|
|
476
|
-
))
|
|
477
|
-
],
|
|
478
|
-
description: ( localizeWithPath(
|
|
479
|
-
'vs/workbench/contrib/scm/browser/scm.contribution',
|
|
480
|
-
'repositoriesSortOrder',
|
|
481
|
-
"Controls the sort order of the repositories in the source control repositories view."
|
|
482
|
-
)),
|
|
483
|
-
default: 'discovery time'
|
|
484
|
-
},
|
|
485
|
-
'scm.repositories.visible': {
|
|
486
|
-
type: 'number',
|
|
487
|
-
description: ( localizeWithPath(
|
|
488
|
-
'vs/workbench/contrib/scm/browser/scm.contribution',
|
|
489
|
-
'providersVisible',
|
|
490
|
-
"Controls how many repositories are visible in the Source Control Repositories section. Set to 0, to be able to manually resize the view."
|
|
491
|
-
)),
|
|
492
|
-
default: 10
|
|
493
|
-
},
|
|
494
|
-
'scm.showActionButton': {
|
|
495
|
-
type: 'boolean',
|
|
496
|
-
markdownDescription: ( localizeWithPath(
|
|
497
|
-
'vs/workbench/contrib/scm/browser/scm.contribution',
|
|
498
|
-
'showActionButton',
|
|
499
|
-
"Controls whether an action button can be shown in the Source Control view."
|
|
500
|
-
)),
|
|
501
|
-
default: true
|
|
502
|
-
},
|
|
503
|
-
'scm.showInputActionButton': {
|
|
504
|
-
type: 'boolean',
|
|
505
|
-
markdownDescription: ( localizeWithPath(
|
|
506
|
-
'vs/workbench/contrib/scm/browser/scm.contribution',
|
|
507
|
-
'showInputActionButton',
|
|
508
|
-
"Controls whether an action button can be shown in the Source Control input."
|
|
509
|
-
)),
|
|
510
|
-
default: true
|
|
511
|
-
},
|
|
512
|
-
'scm.showIncomingChanges': {
|
|
513
|
-
type: 'string',
|
|
514
|
-
enum: ['always', 'never', 'auto'],
|
|
515
|
-
enumDescriptions: [
|
|
516
|
-
( localizeWithPath(
|
|
517
|
-
'vs/workbench/contrib/scm/browser/scm.contribution',
|
|
518
|
-
'scm.showIncomingChanges.always',
|
|
519
|
-
"Always show incoming changes in the Source Control view."
|
|
520
|
-
)),
|
|
521
|
-
( localizeWithPath(
|
|
522
|
-
'vs/workbench/contrib/scm/browser/scm.contribution',
|
|
523
|
-
'scm.showIncomingChanges.never',
|
|
524
|
-
"Never show incoming changes in the Source Control view."
|
|
525
|
-
)),
|
|
526
|
-
( localizeWithPath(
|
|
527
|
-
'vs/workbench/contrib/scm/browser/scm.contribution',
|
|
528
|
-
'scm.showIncomingChanges.auto',
|
|
529
|
-
"Only show incoming changes in the Source Control view when any exist."
|
|
530
|
-
)),
|
|
531
|
-
],
|
|
532
|
-
description: ( localizeWithPath(
|
|
533
|
-
'vs/workbench/contrib/scm/browser/scm.contribution',
|
|
534
|
-
'scm.showIncomingChanges',
|
|
535
|
-
"Controls whether incoming changes are shown in the Source Control view."
|
|
536
|
-
)),
|
|
537
|
-
default: 'auto'
|
|
538
|
-
},
|
|
539
|
-
'scm.showOutgoingChanges': {
|
|
540
|
-
type: 'string',
|
|
541
|
-
enum: ['always', 'never', 'auto'],
|
|
542
|
-
enumDescriptions: [
|
|
543
|
-
( localizeWithPath(
|
|
544
|
-
'vs/workbench/contrib/scm/browser/scm.contribution',
|
|
545
|
-
'scm.showOutgoingChanges.always',
|
|
546
|
-
"Always show outgoing changes in the Source Control view."
|
|
547
|
-
)),
|
|
548
|
-
( localizeWithPath(
|
|
549
|
-
'vs/workbench/contrib/scm/browser/scm.contribution',
|
|
550
|
-
'scm.showOutgoingChanges.never',
|
|
551
|
-
"Never show outgoing changes in the Source Control view."
|
|
552
|
-
)),
|
|
553
|
-
( localizeWithPath(
|
|
554
|
-
'vs/workbench/contrib/scm/browser/scm.contribution',
|
|
555
|
-
'scm.showOutgoingChanges.auto',
|
|
556
|
-
"Only show outgoing changes in the Source Control view when any exist."
|
|
557
|
-
)),
|
|
558
|
-
],
|
|
559
|
-
description: ( localizeWithPath(
|
|
560
|
-
'vs/workbench/contrib/scm/browser/scm.contribution',
|
|
561
|
-
'scm.showOutgoingChanges',
|
|
562
|
-
"Controls whether outgoing changes are shown in the Source Control view."
|
|
563
|
-
)),
|
|
564
|
-
default: 'auto'
|
|
565
|
-
},
|
|
566
|
-
'scm.showChangesSummary': {
|
|
567
|
-
type: 'boolean',
|
|
568
|
-
description: ( localizeWithPath(
|
|
569
|
-
'vs/workbench/contrib/scm/browser/scm.contribution',
|
|
570
|
-
'scm.showChangesSummary',
|
|
571
|
-
"Controls whether the All Changes entry is shown for incoming/outgoing changes in the Source Control view."
|
|
572
|
-
)),
|
|
573
|
-
default: true
|
|
574
|
-
}
|
|
575
|
-
}
|
|
576
|
-
});
|
|
577
|
-
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
578
|
-
id: 'scm.acceptInput',
|
|
579
|
-
metadata: { description: ( localizeWithPath(
|
|
580
|
-
'vs/workbench/contrib/scm/browser/scm.contribution',
|
|
581
|
-
'scm accept',
|
|
582
|
-
"Source Control: Accept Input"
|
|
583
|
-
)), args: [] },
|
|
584
|
-
weight: 200 ,
|
|
585
|
-
when: ( ContextKeyExpr.has('scmRepository')),
|
|
586
|
-
primary: 2048 | 3 ,
|
|
587
|
-
handler: accessor => {
|
|
588
|
-
const contextKeyService = accessor.get(IContextKeyService);
|
|
589
|
-
const context = contextKeyService.getContext(getActiveElement());
|
|
590
|
-
const repositoryId = context.getValue('scmRepository');
|
|
591
|
-
if (!repositoryId) {
|
|
592
|
-
return Promise.resolve(null);
|
|
593
|
-
}
|
|
594
|
-
const scmService = accessor.get(ISCMService);
|
|
595
|
-
const repository = scmService.getRepository(repositoryId);
|
|
596
|
-
if (!repository?.provider.acceptInputCommand) {
|
|
597
|
-
return Promise.resolve(null);
|
|
598
|
-
}
|
|
599
|
-
const id = repository.provider.acceptInputCommand.id;
|
|
600
|
-
const args = repository.provider.acceptInputCommand.arguments;
|
|
601
|
-
const commandService = accessor.get(ICommandService);
|
|
602
|
-
return commandService.executeCommand(id, ...(args || []));
|
|
603
|
-
}
|
|
604
|
-
});
|
|
605
|
-
const viewNextCommitCommand = {
|
|
606
|
-
description: { description: ( localizeWithPath(
|
|
607
|
-
'vs/workbench/contrib/scm/browser/scm.contribution',
|
|
608
|
-
'scm view next commit',
|
|
609
|
-
"Source Control: View Next Commit"
|
|
610
|
-
)), args: [] },
|
|
611
|
-
weight: 200 ,
|
|
612
|
-
handler: (accessor) => {
|
|
613
|
-
const contextKeyService = accessor.get(IContextKeyService);
|
|
614
|
-
const scmService = accessor.get(ISCMService);
|
|
615
|
-
const context = contextKeyService.getContext(getActiveElement());
|
|
616
|
-
const repositoryId = context.getValue('scmRepository');
|
|
617
|
-
const repository = repositoryId ? scmService.getRepository(repositoryId) : undefined;
|
|
618
|
-
repository?.input.showNextHistoryValue();
|
|
619
|
-
}
|
|
620
|
-
};
|
|
621
|
-
const viewPreviousCommitCommand = {
|
|
622
|
-
description: { description: ( localizeWithPath(
|
|
623
|
-
'vs/workbench/contrib/scm/browser/scm.contribution',
|
|
624
|
-
'scm view previous commit',
|
|
625
|
-
"Source Control: View Previous Commit"
|
|
626
|
-
)), args: [] },
|
|
627
|
-
weight: 200 ,
|
|
628
|
-
handler: (accessor) => {
|
|
629
|
-
const contextKeyService = accessor.get(IContextKeyService);
|
|
630
|
-
const scmService = accessor.get(ISCMService);
|
|
631
|
-
const context = contextKeyService.getContext(getActiveElement());
|
|
632
|
-
const repositoryId = context.getValue('scmRepository');
|
|
633
|
-
const repository = repositoryId ? scmService.getRepository(repositoryId) : undefined;
|
|
634
|
-
repository?.input.showPreviousHistoryValue();
|
|
635
|
-
}
|
|
636
|
-
};
|
|
637
|
-
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
638
|
-
...viewNextCommitCommand,
|
|
639
|
-
id: 'scm.viewNextCommit',
|
|
640
|
-
when: ( ContextKeyExpr.and(( ContextKeyExpr.has('scmRepository')), ( ContextKeyExpr.has('scmInputIsInLastPosition')), ( Context.Visible.toNegated()))),
|
|
641
|
-
primary: 18
|
|
642
|
-
});
|
|
643
|
-
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
644
|
-
...viewPreviousCommitCommand,
|
|
645
|
-
id: 'scm.viewPreviousCommit',
|
|
646
|
-
when: ( ContextKeyExpr.and(( ContextKeyExpr.has('scmRepository')), ( ContextKeyExpr.has('scmInputIsInFirstPosition')), ( Context.Visible.toNegated()))),
|
|
647
|
-
primary: 16
|
|
648
|
-
});
|
|
649
|
-
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
650
|
-
...viewNextCommitCommand,
|
|
651
|
-
id: 'scm.forceViewNextCommit',
|
|
652
|
-
when: ( ContextKeyExpr.has('scmRepository')),
|
|
653
|
-
primary: 512 | 18
|
|
654
|
-
});
|
|
655
|
-
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
656
|
-
...viewPreviousCommitCommand,
|
|
657
|
-
id: 'scm.forceViewPreviousCommit',
|
|
658
|
-
when: ( ContextKeyExpr.has('scmRepository')),
|
|
659
|
-
primary: 512 | 16
|
|
660
|
-
});
|
|
661
|
-
CommandsRegistry.registerCommand('scm.openInIntegratedTerminal', async (accessor, provider) => {
|
|
662
|
-
if (!provider || !provider.rootUri) {
|
|
663
|
-
return;
|
|
664
|
-
}
|
|
665
|
-
const commandService = accessor.get(ICommandService);
|
|
666
|
-
await commandService.executeCommand('openInIntegratedTerminal', provider.rootUri);
|
|
667
|
-
});
|
|
668
|
-
CommandsRegistry.registerCommand('scm.openInTerminal', async (accessor, provider) => {
|
|
669
|
-
if (!provider || !provider.rootUri) {
|
|
670
|
-
return;
|
|
671
|
-
}
|
|
672
|
-
const commandService = accessor.get(ICommandService);
|
|
673
|
-
await commandService.executeCommand('openInTerminal', provider.rootUri);
|
|
674
|
-
});
|
|
675
|
-
MenuRegistry.appendMenuItem(MenuId.SCMSourceControl, {
|
|
676
|
-
group: '100_end',
|
|
677
|
-
command: {
|
|
678
|
-
id: 'scm.openInTerminal',
|
|
679
|
-
title: ( localizeWithPath(
|
|
680
|
-
'vs/workbench/contrib/scm/browser/scm.contribution',
|
|
681
|
-
'open in external terminal',
|
|
682
|
-
"Open in External Terminal"
|
|
683
|
-
))
|
|
684
|
-
},
|
|
685
|
-
when: ( ContextKeyExpr.and(( ContextKeyExpr.equals('scmProviderHasRootUri', true)), ( ContextKeyExpr.or(( ContextKeyExpr.equals('config.terminal.sourceControlRepositoriesKind', 'external')), ( ContextKeyExpr.equals('config.terminal.sourceControlRepositoriesKind', 'both'))))))
|
|
686
|
-
});
|
|
687
|
-
MenuRegistry.appendMenuItem(MenuId.SCMSourceControl, {
|
|
688
|
-
group: '100_end',
|
|
689
|
-
command: {
|
|
690
|
-
id: 'scm.openInIntegratedTerminal',
|
|
691
|
-
title: ( localizeWithPath(
|
|
692
|
-
'vs/workbench/contrib/scm/browser/scm.contribution',
|
|
693
|
-
'open in integrated terminal',
|
|
694
|
-
"Open in Integrated Terminal"
|
|
695
|
-
))
|
|
696
|
-
},
|
|
697
|
-
when: ( ContextKeyExpr.and(( ContextKeyExpr.equals('scmProviderHasRootUri', true)), ( ContextKeyExpr.or(( ContextKeyExpr.equals('config.terminal.sourceControlRepositoriesKind', 'integrated')), ( ContextKeyExpr.equals('config.terminal.sourceControlRepositoriesKind', 'both'))))))
|
|
698
|
-
});
|