@codingame/monaco-vscode-scm-service-override 8.0.4 → 9.0.2
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 +4 -4
- 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 +109 -117
- package/vscode/src/vs/workbench/contrib/scm/browser/scmHistory.js +40 -28
- package/vscode/src/vs/workbench/contrib/scm/browser/scmHistoryViewPane.js +879 -0
- package/vscode/src/vs/workbench/contrib/scm/browser/scmRepositoriesViewPane.js +1 -1
- package/vscode/src/vs/workbench/contrib/scm/browser/scmRepositoryRenderer.js +9 -9
- package/vscode/src/vs/workbench/contrib/scm/browser/scmViewPane.js +72 -562
- package/vscode/src/vs/workbench/contrib/scm/browser/scmViewPaneContainer.js +12 -18
- package/vscode/src/vs/workbench/contrib/scm/browser/util.js +4 -1
|
@@ -2,7 +2,7 @@ import { localize, localize2 } from 'vscode/vscode/vs/nls';
|
|
|
2
2
|
import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
|
|
3
3
|
import { Extensions, registerWorkbenchContribution2, WorkbenchPhase } from 'vscode/vscode/vs/workbench/common/contributions';
|
|
4
4
|
import { DirtyDiffWorkbenchController } from 'vscode/vscode/vs/workbench/contrib/scm/browser/dirtydiffDecorator';
|
|
5
|
-
import { VIEWLET_ID, VIEW_PANE_ID, REPOSITORIES_VIEW_PANE_ID } from 'vscode/vscode/vs/workbench/contrib/scm/common/scm';
|
|
5
|
+
import { VIEWLET_ID, VIEW_PANE_ID, REPOSITORIES_VIEW_PANE_ID, HISTORY_VIEW_PANE_ID } from 'vscode/vscode/vs/workbench/contrib/scm/common/scm';
|
|
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';
|
|
@@ -29,9 +29,13 @@ import { Context } from 'vscode/vscode/vs/editor/contrib/suggest/browser/suggest
|
|
|
29
29
|
import { WorkspaceTrustContext, MANAGE_TRUST_COMMAND_ID } from 'vscode/vscode/vs/workbench/contrib/workspace/common/workspace';
|
|
30
30
|
import 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
31
31
|
import '../common/quickDiffService.js';
|
|
32
|
-
import { getActiveElement } from 'vscode/vscode/vs/base/browser/dom';
|
|
32
|
+
import { getActiveElement, isActiveElement } from 'vscode/vscode/vs/base/browser/dom';
|
|
33
33
|
import { SCMWorkingSetController } from './workingSet.js';
|
|
34
34
|
import { IViewsService } from 'vscode/vscode/vs/workbench/services/views/common/viewsService.service';
|
|
35
|
+
import { WorkbenchList } from 'vscode/vscode/vs/platform/list/browser/listService';
|
|
36
|
+
import { IListService } from 'vscode/vscode/vs/platform/list/browser/listService.service';
|
|
37
|
+
import { isSCMRepository } from './util.js';
|
|
38
|
+
import { SCMHistoryViewPane } from './scmHistoryViewPane.js';
|
|
35
39
|
|
|
36
40
|
ModesRegistry.registerLanguage({
|
|
37
41
|
id: 'scminput',
|
|
@@ -41,10 +45,10 @@ ModesRegistry.registerLanguage({
|
|
|
41
45
|
});
|
|
42
46
|
( (Registry.as(Extensions.Workbench)))
|
|
43
47
|
.registerWorkbenchContribution(DirtyDiffWorkbenchController, LifecyclePhase.Restored);
|
|
44
|
-
const sourceControlViewIcon = registerIcon('source-control-view-icon', Codicon.sourceControl, ( localize(
|
|
48
|
+
const sourceControlViewIcon = registerIcon('source-control-view-icon', Codicon.sourceControl, ( localize(2870, 'View icon of the Source Control view.')));
|
|
45
49
|
const viewContainer = ( (Registry.as(Extensions$1.ViewContainersRegistry))).registerViewContainer({
|
|
46
50
|
id: VIEWLET_ID,
|
|
47
|
-
title: ( localize2(
|
|
51
|
+
title: ( localize2(2871, 'Source Control')),
|
|
48
52
|
ctorDescriptor: ( (new SyncDescriptor(SCMViewPaneContainer))),
|
|
49
53
|
storageId: 'workbench.scm.views.state',
|
|
50
54
|
icon: sourceControlViewIcon,
|
|
@@ -54,12 +58,12 @@ const viewContainer = ( (Registry.as(Extensions$1.ViewContainersRegistry))).regi
|
|
|
54
58
|
}, ViewContainerLocation.Sidebar, { doNotRegisterOpenCommand: true });
|
|
55
59
|
const viewsRegistry = ( (Registry.as(Extensions$1.ViewsRegistry)));
|
|
56
60
|
viewsRegistry.registerViewWelcomeContent(VIEW_PANE_ID, {
|
|
57
|
-
content: ( localize(
|
|
61
|
+
content: ( localize(2872, "No source control providers registered.")),
|
|
58
62
|
when: 'default'
|
|
59
63
|
});
|
|
60
64
|
viewsRegistry.registerViewWelcomeContent(VIEW_PANE_ID, {
|
|
61
65
|
content: ( localize(
|
|
62
|
-
|
|
66
|
+
2873,
|
|
63
67
|
"None of the registered source control providers work in Restricted Mode."
|
|
64
68
|
)),
|
|
65
69
|
when: ( (ContextKeyExpr.and(
|
|
@@ -69,7 +73,7 @@ viewsRegistry.registerViewWelcomeContent(VIEW_PANE_ID, {
|
|
|
69
73
|
)))
|
|
70
74
|
});
|
|
71
75
|
viewsRegistry.registerViewWelcomeContent(VIEW_PANE_ID, {
|
|
72
|
-
content: `[${( localize(
|
|
76
|
+
content: `[${( localize(2874, "Manage Workspace Trust"))}](command:${MANAGE_TRUST_COMMAND_ID})`,
|
|
73
77
|
when: ( (ContextKeyExpr.and(
|
|
74
78
|
(ContextKeyExpr.equals('scm.providerCount', 0)),
|
|
75
79
|
WorkspaceTrustContext.IsEnabled,
|
|
@@ -78,16 +82,16 @@ viewsRegistry.registerViewWelcomeContent(VIEW_PANE_ID, {
|
|
|
78
82
|
});
|
|
79
83
|
viewsRegistry.registerViews([{
|
|
80
84
|
id: VIEW_PANE_ID,
|
|
81
|
-
name: ( localize2(
|
|
85
|
+
name: ( localize2(2871, 'Source Control')),
|
|
82
86
|
ctorDescriptor: ( (new SyncDescriptor(SCMViewPane))),
|
|
83
87
|
canToggleVisibility: true,
|
|
84
88
|
canMoveView: true,
|
|
85
|
-
weight:
|
|
89
|
+
weight: 40,
|
|
86
90
|
order: -999,
|
|
87
91
|
containerIcon: sourceControlViewIcon,
|
|
88
92
|
openCommandActionDescriptor: {
|
|
89
93
|
id: viewContainer.id,
|
|
90
|
-
mnemonicTitle: ( localize(
|
|
94
|
+
mnemonicTitle: ( localize(2875, "Source &&Control")),
|
|
91
95
|
keybindings: {
|
|
92
96
|
primary: 0,
|
|
93
97
|
win: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyG },
|
|
@@ -99,7 +103,7 @@ viewsRegistry.registerViews([{
|
|
|
99
103
|
}], viewContainer);
|
|
100
104
|
viewsRegistry.registerViews([{
|
|
101
105
|
id: REPOSITORIES_VIEW_PANE_ID,
|
|
102
|
-
name: ( localize2(
|
|
106
|
+
name: ( localize2(2876, "Source Control Repositories")),
|
|
103
107
|
ctorDescriptor: ( (new SyncDescriptor(SCMRepositoriesViewPane))),
|
|
104
108
|
canToggleVisibility: true,
|
|
105
109
|
hideByDefault: true,
|
|
@@ -112,6 +116,20 @@ viewsRegistry.registerViews([{
|
|
|
112
116
|
))),
|
|
113
117
|
containerIcon: sourceControlViewIcon
|
|
114
118
|
}], viewContainer);
|
|
119
|
+
viewsRegistry.registerViews([{
|
|
120
|
+
id: HISTORY_VIEW_PANE_ID,
|
|
121
|
+
name: ( localize2(2877, "Source Control Graph")),
|
|
122
|
+
ctorDescriptor: ( (new SyncDescriptor(SCMHistoryViewPane))),
|
|
123
|
+
canToggleVisibility: true,
|
|
124
|
+
canMoveView: true,
|
|
125
|
+
weight: 40,
|
|
126
|
+
order: 2,
|
|
127
|
+
when: ( (ContextKeyExpr.and(
|
|
128
|
+
(ContextKeyExpr.has('scm.providerCount')),
|
|
129
|
+
(ContextKeyExpr.notEquals('scm.providerCount', 0))
|
|
130
|
+
))),
|
|
131
|
+
containerIcon: sourceControlViewIcon
|
|
132
|
+
}], viewContainer);
|
|
115
133
|
( (Registry.as(Extensions.Workbench)))
|
|
116
134
|
.registerWorkbenchContribution(SCMActiveRepositoryController, LifecyclePhase.Restored);
|
|
117
135
|
( (Registry.as(Extensions.Workbench)))
|
|
@@ -120,7 +138,7 @@ registerWorkbenchContribution2(SCMWorkingSetController.ID, SCMWorkingSetControll
|
|
|
120
138
|
( (Registry.as(Extensions$2.Configuration))).registerConfiguration({
|
|
121
139
|
id: 'scm',
|
|
122
140
|
order: 5,
|
|
123
|
-
title: ( localize(
|
|
141
|
+
title: ( localize(2878, "Source Control")),
|
|
124
142
|
type: 'object',
|
|
125
143
|
scope: ConfigurationScope.RESOURCE,
|
|
126
144
|
properties: {
|
|
@@ -128,21 +146,21 @@ registerWorkbenchContribution2(SCMWorkingSetController.ID, SCMWorkingSetControll
|
|
|
128
146
|
type: 'string',
|
|
129
147
|
enum: ['all', 'gutter', 'overview', 'minimap', 'none'],
|
|
130
148
|
enumDescriptions: [
|
|
131
|
-
( localize(
|
|
132
|
-
( localize(
|
|
133
|
-
( localize(
|
|
134
|
-
( localize(
|
|
135
|
-
( localize(
|
|
149
|
+
( localize(2879, "Show the diff decorations in all available locations.")),
|
|
150
|
+
( localize(2880, "Show the diff decorations only in the editor gutter.")),
|
|
151
|
+
( localize(2881, "Show the diff decorations only in the overview ruler.")),
|
|
152
|
+
( localize(2882, "Show the diff decorations only in the minimap.")),
|
|
153
|
+
( localize(2883, "Do not show the diff decorations."))
|
|
136
154
|
],
|
|
137
155
|
default: 'all',
|
|
138
|
-
description: ( localize(
|
|
156
|
+
description: ( localize(2884, "Controls diff decorations in the editor."))
|
|
139
157
|
},
|
|
140
158
|
'scm.diffDecorationsGutterWidth': {
|
|
141
159
|
type: 'number',
|
|
142
160
|
enum: [1, 2, 3, 4, 5],
|
|
143
161
|
default: 3,
|
|
144
162
|
description: ( localize(
|
|
145
|
-
|
|
163
|
+
2885,
|
|
146
164
|
"Controls the width(px) of diff decorations in gutter (added & modified)."
|
|
147
165
|
))
|
|
148
166
|
},
|
|
@@ -150,11 +168,11 @@ registerWorkbenchContribution2(SCMWorkingSetController.ID, SCMWorkingSetControll
|
|
|
150
168
|
type: 'string',
|
|
151
169
|
enum: ['always', 'hover'],
|
|
152
170
|
enumDescriptions: [
|
|
153
|
-
( localize(
|
|
154
|
-
( localize(
|
|
171
|
+
( localize(2886, "Show the diff decorator in the gutter at all times.")),
|
|
172
|
+
( localize(2887, "Show the diff decorator in the gutter only on hover."))
|
|
155
173
|
],
|
|
156
174
|
description: ( localize(
|
|
157
|
-
|
|
175
|
+
2888,
|
|
158
176
|
"Controls the visibility of the Source Control diff decorator in the gutter."
|
|
159
177
|
)),
|
|
160
178
|
default: 'always'
|
|
@@ -163,27 +181,27 @@ registerWorkbenchContribution2(SCMWorkingSetController.ID, SCMWorkingSetControll
|
|
|
163
181
|
type: 'string',
|
|
164
182
|
enum: ['diff', 'none'],
|
|
165
183
|
enumDescriptions: [
|
|
166
|
-
( localize(
|
|
167
|
-
( localize(
|
|
184
|
+
( localize(2889, "Show the inline diff Peek view on click.")),
|
|
185
|
+
( localize(2890, "Do nothing."))
|
|
168
186
|
],
|
|
169
|
-
description: ( localize(
|
|
187
|
+
description: ( localize(2891, "Controls the behavior of Source Control diff gutter decorations.")),
|
|
170
188
|
default: 'diff'
|
|
171
189
|
},
|
|
172
190
|
'scm.diffDecorationsGutterPattern': {
|
|
173
191
|
type: 'object',
|
|
174
192
|
description: ( localize(
|
|
175
|
-
|
|
193
|
+
2892,
|
|
176
194
|
"Controls whether a pattern is used for the diff decorations in gutter."
|
|
177
195
|
)),
|
|
178
196
|
additionalProperties: false,
|
|
179
197
|
properties: {
|
|
180
198
|
'added': {
|
|
181
199
|
type: 'boolean',
|
|
182
|
-
description: ( localize(
|
|
200
|
+
description: ( localize(2893, "Use pattern for the diff decorations in gutter for added lines.")),
|
|
183
201
|
},
|
|
184
202
|
'modified': {
|
|
185
203
|
type: 'boolean',
|
|
186
|
-
description: ( localize(
|
|
204
|
+
description: ( localize(2894, "Use pattern for the diff decorations in gutter for modified lines.")),
|
|
187
205
|
},
|
|
188
206
|
},
|
|
189
207
|
default: {
|
|
@@ -195,12 +213,12 @@ registerWorkbenchContribution2(SCMWorkingSetController.ID, SCMWorkingSetControll
|
|
|
195
213
|
type: 'string',
|
|
196
214
|
enum: ['true', 'false', 'inherit'],
|
|
197
215
|
enumDescriptions: [
|
|
198
|
-
( localize(
|
|
199
|
-
( localize(
|
|
200
|
-
( localize(
|
|
216
|
+
( localize(2895, "Ignore leading and trailing whitespace.")),
|
|
217
|
+
( localize(2896, "Do not ignore leading and trailing whitespace.")),
|
|
218
|
+
( localize(2897, "Inherit from `diffEditor.ignoreTrimWhitespace`."))
|
|
201
219
|
],
|
|
202
220
|
description: ( localize(
|
|
203
|
-
|
|
221
|
+
2898,
|
|
204
222
|
"Controls whether leading and trailing whitespace is ignored in Source Control diff gutter decorations."
|
|
205
223
|
)),
|
|
206
224
|
default: 'false'
|
|
@@ -208,7 +226,7 @@ registerWorkbenchContribution2(SCMWorkingSetController.ID, SCMWorkingSetControll
|
|
|
208
226
|
'scm.alwaysShowActions': {
|
|
209
227
|
type: 'boolean',
|
|
210
228
|
description: ( localize(
|
|
211
|
-
|
|
229
|
+
2899,
|
|
212
230
|
"Controls whether inline actions are always visible in the Source Control view."
|
|
213
231
|
)),
|
|
214
232
|
default: false
|
|
@@ -217,12 +235,12 @@ registerWorkbenchContribution2(SCMWorkingSetController.ID, SCMWorkingSetControll
|
|
|
217
235
|
type: 'string',
|
|
218
236
|
enum: ['all', 'focused', 'off'],
|
|
219
237
|
enumDescriptions: [
|
|
220
|
-
( localize(
|
|
221
|
-
( localize(
|
|
222
|
-
( localize(
|
|
238
|
+
( localize(2900, "Show the sum of all Source Control Provider count badges.")),
|
|
239
|
+
( localize(2901, "Show the count badge of the focused Source Control Provider.")),
|
|
240
|
+
( localize(2902, "Disable the Source Control count badge."))
|
|
223
241
|
],
|
|
224
242
|
description: ( localize(
|
|
225
|
-
|
|
243
|
+
2903,
|
|
226
244
|
"Controls the count badge on the Source Control icon on the Activity Bar."
|
|
227
245
|
)),
|
|
228
246
|
default: 'all'
|
|
@@ -231,12 +249,12 @@ registerWorkbenchContribution2(SCMWorkingSetController.ID, SCMWorkingSetControll
|
|
|
231
249
|
type: 'string',
|
|
232
250
|
enum: ['hidden', 'auto', 'visible'],
|
|
233
251
|
enumDescriptions: [
|
|
234
|
-
( localize(
|
|
235
|
-
( localize(
|
|
236
|
-
( localize(
|
|
252
|
+
( localize(2904, "Hide Source Control Provider count badges.")),
|
|
253
|
+
( localize(2905, "Only show count badge for Source Control Provider when non-zero.")),
|
|
254
|
+
( localize(2906, "Show Source Control Provider count badges."))
|
|
237
255
|
],
|
|
238
256
|
markdownDescription: ( localize(
|
|
239
|
-
|
|
257
|
+
2907,
|
|
240
258
|
"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.",
|
|
241
259
|
'\`#scm.alwaysShowRepositories#\`'
|
|
242
260
|
)),
|
|
@@ -246,22 +264,22 @@ registerWorkbenchContribution2(SCMWorkingSetController.ID, SCMWorkingSetControll
|
|
|
246
264
|
type: 'string',
|
|
247
265
|
enum: ['tree', 'list'],
|
|
248
266
|
enumDescriptions: [
|
|
249
|
-
( localize(
|
|
250
|
-
( localize(
|
|
267
|
+
( localize(2908, "Show the repository changes as a tree.")),
|
|
268
|
+
( localize(2909, "Show the repository changes as a list."))
|
|
251
269
|
],
|
|
252
|
-
description: ( localize(
|
|
270
|
+
description: ( localize(2910, "Controls the default Source Control repository view mode.")),
|
|
253
271
|
default: 'list'
|
|
254
272
|
},
|
|
255
273
|
'scm.defaultViewSortKey': {
|
|
256
274
|
type: 'string',
|
|
257
275
|
enum: ['name', 'path', 'status'],
|
|
258
276
|
enumDescriptions: [
|
|
259
|
-
( localize(
|
|
260
|
-
( localize(
|
|
261
|
-
( localize(
|
|
277
|
+
( localize(2911, "Sort the repository changes by file name.")),
|
|
278
|
+
( localize(2912, "Sort the repository changes by path.")),
|
|
279
|
+
( localize(2913, "Sort the repository changes by Source Control status."))
|
|
262
280
|
],
|
|
263
281
|
description: ( localize(
|
|
264
|
-
|
|
282
|
+
2914,
|
|
265
283
|
"Controls the default Source Control repository changes sort order when viewed as a list."
|
|
266
284
|
)),
|
|
267
285
|
default: 'path'
|
|
@@ -269,7 +287,7 @@ registerWorkbenchContribution2(SCMWorkingSetController.ID, SCMWorkingSetControll
|
|
|
269
287
|
'scm.autoReveal': {
|
|
270
288
|
type: 'boolean',
|
|
271
289
|
description: ( localize(
|
|
272
|
-
|
|
290
|
+
2915,
|
|
273
291
|
"Controls whether the Source Control view should automatically reveal and select files when opening them."
|
|
274
292
|
)),
|
|
275
293
|
default: true
|
|
@@ -277,20 +295,20 @@ registerWorkbenchContribution2(SCMWorkingSetController.ID, SCMWorkingSetControll
|
|
|
277
295
|
'scm.inputFontFamily': {
|
|
278
296
|
type: 'string',
|
|
279
297
|
markdownDescription: ( localize(
|
|
280
|
-
|
|
298
|
+
2916,
|
|
281
299
|
"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."
|
|
282
300
|
)),
|
|
283
301
|
default: 'default'
|
|
284
302
|
},
|
|
285
303
|
'scm.inputFontSize': {
|
|
286
304
|
type: 'number',
|
|
287
|
-
markdownDescription: ( localize(
|
|
305
|
+
markdownDescription: ( localize(2917, "Controls the font size for the input message in pixels.")),
|
|
288
306
|
default: 13
|
|
289
307
|
},
|
|
290
308
|
'scm.inputMaxLineCount': {
|
|
291
309
|
type: 'number',
|
|
292
310
|
markdownDescription: ( localize(
|
|
293
|
-
|
|
311
|
+
2918,
|
|
294
312
|
"Controls the maximum number of lines that the input will auto-grow to."
|
|
295
313
|
)),
|
|
296
314
|
minimum: 1,
|
|
@@ -300,7 +318,7 @@ registerWorkbenchContribution2(SCMWorkingSetController.ID, SCMWorkingSetControll
|
|
|
300
318
|
'scm.inputMinLineCount': {
|
|
301
319
|
type: 'number',
|
|
302
320
|
markdownDescription: ( localize(
|
|
303
|
-
|
|
321
|
+
2919,
|
|
304
322
|
"Controls the minimum number of lines that the input will auto-grow from."
|
|
305
323
|
)),
|
|
306
324
|
minimum: 1,
|
|
@@ -310,7 +328,7 @@ registerWorkbenchContribution2(SCMWorkingSetController.ID, SCMWorkingSetControll
|
|
|
310
328
|
'scm.alwaysShowRepositories': {
|
|
311
329
|
type: 'boolean',
|
|
312
330
|
markdownDescription: ( localize(
|
|
313
|
-
|
|
331
|
+
2920,
|
|
314
332
|
"Controls whether repositories should always be visible in the Source Control view."
|
|
315
333
|
)),
|
|
316
334
|
default: false
|
|
@@ -320,20 +338,20 @@ registerWorkbenchContribution2(SCMWorkingSetController.ID, SCMWorkingSetControll
|
|
|
320
338
|
enum: ['discovery time', 'name', 'path'],
|
|
321
339
|
enumDescriptions: [
|
|
322
340
|
( localize(
|
|
323
|
-
|
|
341
|
+
2921,
|
|
324
342
|
"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."
|
|
325
343
|
)),
|
|
326
344
|
( localize(
|
|
327
|
-
|
|
345
|
+
2922,
|
|
328
346
|
"Repositories in the Source Control Repositories and Source Control views are sorted by repository name."
|
|
329
347
|
)),
|
|
330
348
|
( localize(
|
|
331
|
-
|
|
349
|
+
2923,
|
|
332
350
|
"Repositories in the Source Control Repositories and Source Control views are sorted by repository path."
|
|
333
351
|
))
|
|
334
352
|
],
|
|
335
353
|
description: ( localize(
|
|
336
|
-
|
|
354
|
+
2924,
|
|
337
355
|
"Controls the sort order of the repositories in the source control repositories view."
|
|
338
356
|
)),
|
|
339
357
|
default: 'discovery time'
|
|
@@ -341,7 +359,7 @@ registerWorkbenchContribution2(SCMWorkingSetController.ID, SCMWorkingSetControll
|
|
|
341
359
|
'scm.repositories.visible': {
|
|
342
360
|
type: 'number',
|
|
343
361
|
description: ( localize(
|
|
344
|
-
|
|
362
|
+
2925,
|
|
345
363
|
"Controls how many repositories are visible in the Source Control Repositories section. Set to 0, to be able to manually resize the view."
|
|
346
364
|
)),
|
|
347
365
|
default: 10
|
|
@@ -349,7 +367,7 @@ registerWorkbenchContribution2(SCMWorkingSetController.ID, SCMWorkingSetControll
|
|
|
349
367
|
'scm.showActionButton': {
|
|
350
368
|
type: 'boolean',
|
|
351
369
|
markdownDescription: ( localize(
|
|
352
|
-
|
|
370
|
+
2926,
|
|
353
371
|
"Controls whether an action button can be shown in the Source Control view."
|
|
354
372
|
)),
|
|
355
373
|
default: true
|
|
@@ -357,57 +375,15 @@ registerWorkbenchContribution2(SCMWorkingSetController.ID, SCMWorkingSetControll
|
|
|
357
375
|
'scm.showInputActionButton': {
|
|
358
376
|
type: 'boolean',
|
|
359
377
|
markdownDescription: ( localize(
|
|
360
|
-
|
|
378
|
+
2927,
|
|
361
379
|
"Controls whether an action button can be shown in the Source Control input."
|
|
362
380
|
)),
|
|
363
381
|
default: true
|
|
364
382
|
},
|
|
365
|
-
'scm.showIncomingChanges': {
|
|
366
|
-
type: 'string',
|
|
367
|
-
enum: ['always', 'never', 'auto'],
|
|
368
|
-
enumDescriptions: [
|
|
369
|
-
( localize(2916, "Always show incoming changes in the Source Control view.")),
|
|
370
|
-
( localize(2917, "Never show incoming changes in the Source Control view.")),
|
|
371
|
-
( localize(
|
|
372
|
-
2918,
|
|
373
|
-
"Only show incoming changes in the Source Control view when any exist."
|
|
374
|
-
)),
|
|
375
|
-
],
|
|
376
|
-
description: ( localize(
|
|
377
|
-
2919,
|
|
378
|
-
"Controls whether incoming changes are shown in the Source Control view."
|
|
379
|
-
)),
|
|
380
|
-
default: 'auto'
|
|
381
|
-
},
|
|
382
|
-
'scm.showOutgoingChanges': {
|
|
383
|
-
type: 'string',
|
|
384
|
-
enum: ['always', 'never', 'auto'],
|
|
385
|
-
enumDescriptions: [
|
|
386
|
-
( localize(2920, "Always show outgoing changes in the Source Control view.")),
|
|
387
|
-
( localize(2921, "Never show outgoing changes in the Source Control view.")),
|
|
388
|
-
( localize(
|
|
389
|
-
2922,
|
|
390
|
-
"Only show outgoing changes in the Source Control view when any exist."
|
|
391
|
-
)),
|
|
392
|
-
],
|
|
393
|
-
description: ( localize(
|
|
394
|
-
2923,
|
|
395
|
-
"Controls whether outgoing changes are shown in the Source Control view."
|
|
396
|
-
)),
|
|
397
|
-
default: 'auto'
|
|
398
|
-
},
|
|
399
|
-
'scm.showChangesSummary': {
|
|
400
|
-
type: 'boolean',
|
|
401
|
-
description: ( localize(
|
|
402
|
-
2924,
|
|
403
|
-
"Controls whether the All Changes entry is shown for incoming/outgoing changes in the Source Control view."
|
|
404
|
-
)),
|
|
405
|
-
default: true
|
|
406
|
-
},
|
|
407
383
|
'scm.workingSets.enabled': {
|
|
408
384
|
type: 'boolean',
|
|
409
385
|
description: ( localize(
|
|
410
|
-
|
|
386
|
+
2928,
|
|
411
387
|
"Controls whether to store editor working sets when switching between source control history item groups."
|
|
412
388
|
)),
|
|
413
389
|
default: false
|
|
@@ -417,25 +393,25 @@ registerWorkbenchContribution2(SCMWorkingSetController.ID, SCMWorkingSetControll
|
|
|
417
393
|
enum: ['empty', 'current'],
|
|
418
394
|
enumDescriptions: [
|
|
419
395
|
( localize(
|
|
420
|
-
|
|
396
|
+
2929,
|
|
421
397
|
"Use an empty working set when switching to a source control history item group that does not have a working set."
|
|
422
398
|
)),
|
|
423
399
|
( localize(
|
|
424
|
-
|
|
400
|
+
2930,
|
|
425
401
|
"Use the current working set when switching to a source control history item group that does not have a working set."
|
|
426
402
|
))
|
|
427
403
|
],
|
|
428
404
|
description: ( localize(
|
|
429
|
-
|
|
405
|
+
2931,
|
|
430
406
|
"Controls the default working set to use when switching to a source control history item group that does not have a working set."
|
|
431
407
|
)),
|
|
432
408
|
default: 'current'
|
|
433
409
|
},
|
|
434
|
-
'scm.
|
|
410
|
+
'scm.compactFolders': {
|
|
435
411
|
type: 'boolean',
|
|
436
412
|
description: ( localize(
|
|
437
|
-
|
|
438
|
-
"Controls whether
|
|
413
|
+
2932,
|
|
414
|
+
"Controls whether the Source Control view should render folders in a compact form. In such a form, single child folders will be compressed in a combined tree element."
|
|
439
415
|
)),
|
|
440
416
|
default: true
|
|
441
417
|
}
|
|
@@ -443,7 +419,7 @@ registerWorkbenchContribution2(SCMWorkingSetController.ID, SCMWorkingSetControll
|
|
|
443
419
|
});
|
|
444
420
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
445
421
|
id: 'scm.acceptInput',
|
|
446
|
-
metadata: { description: ( localize(
|
|
422
|
+
metadata: { description: ( localize(2933, "Source Control: Accept Input")), args: [] },
|
|
447
423
|
weight: KeybindingWeight.WorkbenchContrib,
|
|
448
424
|
when: ( (ContextKeyExpr.has('scmRepository'))),
|
|
449
425
|
primary: KeyMod.CtrlCmd | KeyCode.Enter,
|
|
@@ -483,7 +459,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
483
459
|
}
|
|
484
460
|
});
|
|
485
461
|
const viewNextCommitCommand = {
|
|
486
|
-
description: { description: ( localize(
|
|
462
|
+
description: { description: ( localize(2934, "Source Control: View Next Commit")), args: [] },
|
|
487
463
|
weight: KeybindingWeight.WorkbenchContrib,
|
|
488
464
|
handler: (accessor) => {
|
|
489
465
|
const contextKeyService = accessor.get(IContextKeyService);
|
|
@@ -495,7 +471,7 @@ const viewNextCommitCommand = {
|
|
|
495
471
|
}
|
|
496
472
|
};
|
|
497
473
|
const viewPreviousCommitCommand = {
|
|
498
|
-
description: { description: ( localize(
|
|
474
|
+
description: { description: ( localize(2935, "Source Control: View Previous Commit")), args: [] },
|
|
499
475
|
weight: KeybindingWeight.WorkbenchContrib,
|
|
500
476
|
handler: (accessor) => {
|
|
501
477
|
const contextKeyService = accessor.get(IContextKeyService);
|
|
@@ -538,11 +514,27 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
538
514
|
when: ( (ContextKeyExpr.has('scmRepository'))),
|
|
539
515
|
primary: KeyMod.Alt | KeyCode.UpArrow
|
|
540
516
|
});
|
|
541
|
-
CommandsRegistry.registerCommand('scm.openInIntegratedTerminal', async (accessor,
|
|
542
|
-
if (!
|
|
517
|
+
CommandsRegistry.registerCommand('scm.openInIntegratedTerminal', async (accessor, ...providers) => {
|
|
518
|
+
if (!providers || providers.length === 0) {
|
|
543
519
|
return;
|
|
544
520
|
}
|
|
545
521
|
const commandService = accessor.get(ICommandService);
|
|
522
|
+
const listService = accessor.get(IListService);
|
|
523
|
+
let provider = providers.length === 1 ? providers[0] : undefined;
|
|
524
|
+
if (!provider) {
|
|
525
|
+
const list = listService.lastFocusedList;
|
|
526
|
+
const element = list?.getHTMLElement();
|
|
527
|
+
if (list instanceof WorkbenchList && element && isActiveElement(element)) {
|
|
528
|
+
const [index] = list.getFocus();
|
|
529
|
+
const focusedElement = list.element(index);
|
|
530
|
+
if (isSCMRepository(focusedElement)) {
|
|
531
|
+
provider = focusedElement.provider;
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
if (!provider?.rootUri) {
|
|
536
|
+
return;
|
|
537
|
+
}
|
|
546
538
|
await commandService.executeCommand('openInIntegratedTerminal', provider.rootUri);
|
|
547
539
|
});
|
|
548
540
|
CommandsRegistry.registerCommand('scm.openInTerminal', async (accessor, provider) => {
|
|
@@ -556,7 +548,7 @@ MenuRegistry.appendMenuItem(MenuId.SCMSourceControl, {
|
|
|
556
548
|
group: '100_end',
|
|
557
549
|
command: {
|
|
558
550
|
id: 'scm.openInTerminal',
|
|
559
|
-
title: ( localize(
|
|
551
|
+
title: ( localize(2936, "Open in External Terminal"))
|
|
560
552
|
},
|
|
561
553
|
when: ( (ContextKeyExpr.and(
|
|
562
554
|
(ContextKeyExpr.equals('scmProviderHasRootUri', true)),
|
|
@@ -570,7 +562,7 @@ MenuRegistry.appendMenuItem(MenuId.SCMSourceControl, {
|
|
|
570
562
|
group: '100_end',
|
|
571
563
|
command: {
|
|
572
564
|
id: 'scm.openInIntegratedTerminal',
|
|
573
|
-
title: ( localize(
|
|
565
|
+
title: ( localize(2937, "Open in Integrated Terminal"))
|
|
574
566
|
},
|
|
575
567
|
when: ( (ContextKeyExpr.and(
|
|
576
568
|
(ContextKeyExpr.equals('scmProviderHasRootUri', true)),
|
|
@@ -14,19 +14,20 @@ import 'vscode/vscode/vs/platform/theme/common/colors/miscColors';
|
|
|
14
14
|
import 'vscode/vscode/vs/platform/theme/common/colors/quickpickColors';
|
|
15
15
|
import 'vscode/vscode/vs/platform/theme/common/colors/searchColors';
|
|
16
16
|
import { rot } from 'vscode/vscode/vs/base/common/numbers';
|
|
17
|
+
import { svgElem } from 'vscode/vscode/vs/base/browser/dom';
|
|
17
18
|
|
|
18
19
|
const SWIMLANE_HEIGHT = 22;
|
|
19
20
|
const SWIMLANE_WIDTH = 11;
|
|
20
21
|
const CIRCLE_RADIUS = 4;
|
|
21
22
|
const SWIMLANE_CURVE_RADIUS = 5;
|
|
22
|
-
const historyItemGroupLocal = registerColor('
|
|
23
|
-
const historyItemGroupRemote = registerColor('
|
|
24
|
-
const historyItemGroupBase = registerColor('
|
|
25
|
-
const historyItemGroupHoverLabelForeground = registerColor('
|
|
23
|
+
const historyItemGroupLocal = registerColor('scmGraph.historyItemGroupLocal', chartsBlue, ( localize(10520, "Local history item group color.")));
|
|
24
|
+
const historyItemGroupRemote = registerColor('scmGraph.historyItemGroupRemote', chartsPurple, ( localize(10521, "Remote history item group color.")));
|
|
25
|
+
const historyItemGroupBase = registerColor('scmGraph.historyItemGroupBase', chartsOrange, ( localize(10522, "Base history item group color.")));
|
|
26
|
+
const historyItemGroupHoverLabelForeground = registerColor('scmGraph.historyItemHoverLabelForeground', buttonForeground, ( localize(10523, "History item hover label foreground color.")));
|
|
26
27
|
const colorRegistry = [
|
|
27
|
-
registerColor('
|
|
28
|
-
registerColor('
|
|
29
|
-
registerColor('
|
|
28
|
+
registerColor('scmGraph.foreground1', chartsGreen, ( localize(10524, "Source control graph foreground color (1)."))),
|
|
29
|
+
registerColor('scmGraph.foreground2', chartsRed, ( localize(10525, "Source control graph foreground color (2)."))),
|
|
30
|
+
registerColor('scmGraph.foreground3', chartsYellow, ( localize(10526, "Source control graph foreground color (3)."))),
|
|
30
31
|
];
|
|
31
32
|
function getLabelColorIdentifier(historyItem, colorMap) {
|
|
32
33
|
for (const label of historyItem.labels ?? []) {
|
|
@@ -74,7 +75,8 @@ function renderSCMHistoryItemGraph(historyItemViewModel) {
|
|
|
74
75
|
const outputSwimlanes = historyItemViewModel.outputSwimlanes;
|
|
75
76
|
const inputIndex = inputSwimlanes.findIndex(node => node.id === historyItem.id);
|
|
76
77
|
const circleIndex = inputIndex !== -1 ? inputIndex : inputSwimlanes.length;
|
|
77
|
-
const circleColor = circleIndex < outputSwimlanes.length ? outputSwimlanes[circleIndex].color :
|
|
78
|
+
const circleColor = circleIndex < outputSwimlanes.length ? outputSwimlanes[circleIndex].color :
|
|
79
|
+
circleIndex < inputSwimlanes.length ? inputSwimlanes[circleIndex].color : historyItemGroupLocal;
|
|
78
80
|
let outputSwimlaneIndex = 0;
|
|
79
81
|
for (let index = 0; index < inputSwimlanes.length; index++) {
|
|
80
82
|
const color = inputSwimlanes[index].color;
|
|
@@ -155,6 +157,16 @@ function renderSCMHistoryItemGraph(historyItemViewModel) {
|
|
|
155
157
|
svg.style.width = `${SWIMLANE_WIDTH * (Math.max(inputSwimlanes.length, outputSwimlanes.length, 1) + 1)}px`;
|
|
156
158
|
return svg;
|
|
157
159
|
}
|
|
160
|
+
function renderSCMHistoryGraphPlaceholder(columns) {
|
|
161
|
+
const elements = svgElem('svg', {
|
|
162
|
+
style: { height: `${SWIMLANE_HEIGHT}px`, width: `${SWIMLANE_WIDTH * (columns.length + 1)}px`, }
|
|
163
|
+
});
|
|
164
|
+
for (let index = 0; index < columns.length; index++) {
|
|
165
|
+
const path = drawVerticalLine(SWIMLANE_WIDTH * (index + 1), 0, SWIMLANE_HEIGHT, columns[index].color);
|
|
166
|
+
elements.root.append(path);
|
|
167
|
+
}
|
|
168
|
+
return elements.root;
|
|
169
|
+
}
|
|
158
170
|
function toISCMHistoryItemViewModelArray(historyItems, colorMap = ( (new Map()))) {
|
|
159
171
|
let colorIndex = -1;
|
|
160
172
|
const viewModels = [];
|
|
@@ -163,8 +175,8 @@ function toISCMHistoryItemViewModelArray(historyItems, colorMap = ( (new Map()))
|
|
|
163
175
|
const outputSwimlanesFromPreviousItem = lastOrDefault(viewModels)?.outputSwimlanes ?? [];
|
|
164
176
|
const inputSwimlanes = ( (outputSwimlanesFromPreviousItem.map(i => deepClone(i))));
|
|
165
177
|
const outputSwimlanes = [];
|
|
178
|
+
let firstParentAdded = false;
|
|
166
179
|
if (historyItem.parentIds.length > 0) {
|
|
167
|
-
let firstParentAdded = false;
|
|
168
180
|
for (const node of inputSwimlanes) {
|
|
169
181
|
if (node.id === historyItem.id) {
|
|
170
182
|
if (!firstParentAdded) {
|
|
@@ -178,25 +190,25 @@ function toISCMHistoryItemViewModelArray(historyItems, colorMap = ( (new Map()))
|
|
|
178
190
|
}
|
|
179
191
|
outputSwimlanes.push(deepClone(node));
|
|
180
192
|
}
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
outputSwimlanes.push({
|
|
196
|
-
id: historyItem.parentIds[i],
|
|
197
|
-
color: colorIdentifier
|
|
198
|
-
});
|
|
193
|
+
}
|
|
194
|
+
for (let i = firstParentAdded ? 1 : 0; i < historyItem.parentIds.length; i++) {
|
|
195
|
+
let colorIdentifier;
|
|
196
|
+
if (!firstParentAdded) {
|
|
197
|
+
colorIdentifier = getLabelColorIdentifier(historyItem, colorMap);
|
|
198
|
+
}
|
|
199
|
+
else {
|
|
200
|
+
const historyItemParent = historyItems
|
|
201
|
+
.find(h => h.id === historyItem.parentIds[i]);
|
|
202
|
+
colorIdentifier = historyItemParent ? getLabelColorIdentifier(historyItemParent, colorMap) : undefined;
|
|
203
|
+
}
|
|
204
|
+
if (!colorIdentifier) {
|
|
205
|
+
colorIndex = rot(colorIndex + 1, colorRegistry.length);
|
|
206
|
+
colorIdentifier = colorRegistry[colorIndex];
|
|
199
207
|
}
|
|
208
|
+
outputSwimlanes.push({
|
|
209
|
+
id: historyItem.parentIds[i],
|
|
210
|
+
color: colorIdentifier
|
|
211
|
+
});
|
|
200
212
|
}
|
|
201
213
|
viewModels.push({
|
|
202
214
|
historyItem,
|
|
@@ -207,4 +219,4 @@ function toISCMHistoryItemViewModelArray(historyItems, colorMap = ( (new Map()))
|
|
|
207
219
|
return viewModels;
|
|
208
220
|
}
|
|
209
221
|
|
|
210
|
-
export { colorRegistry, historyItemGroupBase, historyItemGroupHoverLabelForeground, historyItemGroupLocal, historyItemGroupRemote, renderSCMHistoryItemGraph, toISCMHistoryItemViewModelArray };
|
|
222
|
+
export { SWIMLANE_HEIGHT, SWIMLANE_WIDTH, colorRegistry, historyItemGroupBase, historyItemGroupHoverLabelForeground, historyItemGroupLocal, historyItemGroupRemote, renderSCMHistoryGraphPlaceholder, renderSCMHistoryItemGraph, toISCMHistoryItemViewModelArray };
|