@codingame/monaco-vscode-scm-service-override 15.0.2 → 16.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 +17 -13
- package/vscode/src/vs/workbench/contrib/scm/browser/activity.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/scm/browser/activity.js +24 -12
- package/vscode/src/vs/workbench/contrib/scm/browser/media/dirtydiffDecorator.css +96 -0
- package/vscode/src/vs/workbench/contrib/scm/browser/media/scm.css +525 -0
- package/vscode/src/vs/workbench/contrib/scm/browser/menus.js +2 -2
- package/vscode/src/vs/workbench/contrib/scm/browser/quickDiffDecorator.js +6 -6
- package/vscode/src/vs/workbench/contrib/scm/browser/quickDiffModel.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/scm/browser/quickDiffModel.js +1 -1
- package/vscode/src/vs/workbench/contrib/scm/browser/quickDiffWidget.js +15 -15
- package/vscode/src/vs/workbench/contrib/scm/browser/scm.contribution.js +96 -81
- package/vscode/src/vs/workbench/contrib/scm/browser/scmAccessibilityHelp.js +30 -30
- package/vscode/src/vs/workbench/contrib/scm/browser/scmHistoryViewPane.js +45 -46
- package/vscode/src/vs/workbench/contrib/scm/browser/scmRepositoriesViewPane.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/scm/browser/scmRepositoriesViewPane.js +8 -2
- package/vscode/src/vs/workbench/contrib/scm/browser/scmRepositoryRenderer.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/scm/browser/scmRepositoryRenderer.js +1 -1
- package/vscode/src/vs/workbench/contrib/scm/browser/scmViewPane.js +30 -27
- package/vscode/src/vs/workbench/contrib/scm/browser/scmViewPaneContainer.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/scm/browser/scmViewPaneContainer.js +2 -2
- package/vscode/src/vs/workbench/contrib/scm/browser/scmViewService.d.ts +22 -5
- package/vscode/src/vs/workbench/contrib/scm/browser/scmViewService.js +52 -9
- package/vscode/src/vs/workbench/contrib/scm/browser/workingSet.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/scm/browser/workingSet.js +2 -2
- package/vscode/src/vs/workbench/contrib/scm/browser/media/dirtydiffDecorator.css.js +0 -6
- package/vscode/src/vs/workbench/contrib/scm/browser/media/scm.css.js +0 -6
|
@@ -35,7 +35,7 @@ import { RawContextKey, ContextKeyExpr } from '@codingame/monaco-vscode-api/vsco
|
|
|
35
35
|
import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
36
36
|
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
37
37
|
import { rot } from '@codingame/monaco-vscode-api/vscode/vs/base/common/numbers';
|
|
38
|
-
import { getModifiedEndLineNumber, getChangeHeight, getChangeType, getChangeTypeColor, lineIntersectsChange, ChangeType } from '@codingame/monaco-vscode-
|
|
38
|
+
import { getModifiedEndLineNumber, getChangeHeight, getChangeType, getChangeTypeColor, lineIntersectsChange, ChangeType } from '@codingame/monaco-vscode-ae8a8ca1-f243-508b-9c37-c88ebbd295fa-common/vscode/vs/workbench/contrib/scm/common/quickDiff';
|
|
39
39
|
import { ICodeEditorService } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/services/codeEditorService.service';
|
|
40
40
|
import { TextCompareEditorActiveContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/contextkeys';
|
|
41
41
|
import { EditorContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/editorContextKeys';
|
|
@@ -71,7 +71,7 @@ let QuickDiffPickerViewItem = class QuickDiffPickerViewItem extends SelectAction
|
|
|
71
71
|
const peekTitleColor = theme.getColor(peekViewTitleBackground);
|
|
72
72
|
const opaqueTitleColor = peekTitleColor?.makeOpaque(editorBackgroundColor) ?? editorBackgroundColor;
|
|
73
73
|
styles.selectBackground = ( ( opaqueTitleColor.lighten(.6)).toString());
|
|
74
|
-
super(null, action, items, startingSelection, contextViewService, styles, { ariaLabel: ( localize(
|
|
74
|
+
super(null, action, items, startingSelection, contextViewService, styles, { ariaLabel: ( localize(8979, 'Switch quick diff base')) });
|
|
75
75
|
this.optionsItems = items;
|
|
76
76
|
}
|
|
77
77
|
setSelection(provider) {
|
|
@@ -92,7 +92,7 @@ QuickDiffPickerViewItem = ( __decorate([
|
|
|
92
92
|
], QuickDiffPickerViewItem));
|
|
93
93
|
class QuickDiffPickerBaseAction extends Action {
|
|
94
94
|
static { this.ID = 'quickDiff.base.switch'; }
|
|
95
|
-
static { this.LABEL = ( localize(
|
|
95
|
+
static { this.LABEL = ( localize(8980, "Switch Quick Diff Base")); }
|
|
96
96
|
constructor(callback) {
|
|
97
97
|
super(QuickDiffPickerBaseAction.ID, QuickDiffPickerBaseAction.LABEL, undefined, undefined);
|
|
98
98
|
this.callback = callback;
|
|
@@ -136,7 +136,7 @@ let QuickDiffWidget = class QuickDiffWidget extends PeekViewWidget {
|
|
|
136
136
|
this._index = 0;
|
|
137
137
|
this._provider = '';
|
|
138
138
|
this.height = undefined;
|
|
139
|
-
this._disposables.add(themeService.onDidColorThemeChange(
|
|
139
|
+
this._disposables.add(themeService.onDidColorThemeChange(this._applyTheme, this));
|
|
140
140
|
this._applyTheme(themeService.getColorTheme());
|
|
141
141
|
if (!Iterable.isEmpty(this.model.originalTextModels)) {
|
|
142
142
|
contextKeyService = contextKeyService.createOverlay([
|
|
@@ -215,14 +215,14 @@ let QuickDiffWidget = class QuickDiffWidget extends PeekViewWidget {
|
|
|
215
215
|
if (!this.shouldUseDropdown()) {
|
|
216
216
|
detail = this.model.changes.length > 1
|
|
217
217
|
? ( localize(
|
|
218
|
-
|
|
218
|
+
8981,
|
|
219
219
|
"{0} - {1} of {2} changes",
|
|
220
220
|
label,
|
|
221
221
|
providerIndex + 1,
|
|
222
222
|
providerChanges.length
|
|
223
223
|
))
|
|
224
224
|
: ( localize(
|
|
225
|
-
|
|
225
|
+
8982,
|
|
226
226
|
"{0} - {1} of {2} change",
|
|
227
227
|
label,
|
|
228
228
|
providerIndex + 1,
|
|
@@ -232,8 +232,8 @@ let QuickDiffWidget = class QuickDiffWidget extends PeekViewWidget {
|
|
|
232
232
|
}
|
|
233
233
|
else {
|
|
234
234
|
detail = this.model.changes.length > 1
|
|
235
|
-
? ( localize(
|
|
236
|
-
: ( localize(
|
|
235
|
+
? ( localize(8983, "{0} of {1} changes", providerIndex + 1, providerChanges.length))
|
|
236
|
+
: ( localize(8984, "{0} of {1} change", providerIndex + 1, providerChanges.length));
|
|
237
237
|
this.dropdownContainer.style.display = 'inherit';
|
|
238
238
|
}
|
|
239
239
|
this.setTitle(this.title, detail);
|
|
@@ -285,7 +285,7 @@ let QuickDiffWidget = class QuickDiffWidget extends PeekViewWidget {
|
|
|
285
285
|
this._actionbarWidget.clear();
|
|
286
286
|
this._actionbarWidget.push(actions.reverse(), { label: false, icon: true });
|
|
287
287
|
this._actionbarWidget.push([next, previous], { label: false, icon: true });
|
|
288
|
-
this._actionbarWidget.push(this._disposables.add(( new Action('peekview.close', ( localize(
|
|
288
|
+
this._actionbarWidget.push(this._disposables.add(( new Action('peekview.close', ( localize(8985, "Close")), ThemeIcon.asClassName(Codicon.close), true, () => this.dispose()))), { label: false, icon: true });
|
|
289
289
|
}
|
|
290
290
|
_fillHead(container) {
|
|
291
291
|
super._fillHead(container, true);
|
|
@@ -623,7 +623,7 @@ class ShowPreviousChangeAction extends EditorAction {
|
|
|
623
623
|
constructor(outerEditor) {
|
|
624
624
|
super({
|
|
625
625
|
id: 'editor.action.dirtydiff.previous',
|
|
626
|
-
label: ( localize2(
|
|
626
|
+
label: ( localize2(8986, "Show Previous Change")),
|
|
627
627
|
precondition: ( TextCompareEditorActiveContext.toNegated()),
|
|
628
628
|
kbOpts: { kbExpr: EditorContextKeys.editorTextFocus, primary: KeyMod.Shift | KeyMod.Alt | KeyCode.F3, weight: KeybindingWeight.EditorContrib }
|
|
629
629
|
});
|
|
@@ -649,7 +649,7 @@ class ShowNextChangeAction extends EditorAction {
|
|
|
649
649
|
constructor(outerEditor) {
|
|
650
650
|
super({
|
|
651
651
|
id: 'editor.action.dirtydiff.next',
|
|
652
|
-
label: ( localize2(
|
|
652
|
+
label: ( localize2(8987, "Show Next Change")),
|
|
653
653
|
precondition: ( TextCompareEditorActiveContext.toNegated()),
|
|
654
654
|
kbOpts: { kbExpr: EditorContextKeys.editorTextFocus, primary: KeyMod.Alt | KeyCode.F3, weight: KeybindingWeight.EditorContrib }
|
|
655
655
|
});
|
|
@@ -675,7 +675,7 @@ class GotoPreviousChangeAction extends EditorAction {
|
|
|
675
675
|
constructor() {
|
|
676
676
|
super({
|
|
677
677
|
id: 'workbench.action.editor.previousChange',
|
|
678
|
-
label: ( localize2(
|
|
678
|
+
label: ( localize2(8988, "Go to Previous Change")),
|
|
679
679
|
precondition: ( ContextKeyExpr.and(( TextCompareEditorActiveContext.toNegated()), ( quickDiffDecorationCount.notEqualsTo(0)))),
|
|
680
680
|
kbOpts: { kbExpr: EditorContextKeys.editorTextFocus, primary: KeyMod.Shift | KeyMod.Alt | KeyCode.F5, weight: KeybindingWeight.EditorContrib }
|
|
681
681
|
});
|
|
@@ -710,7 +710,7 @@ class GotoNextChangeAction extends EditorAction {
|
|
|
710
710
|
constructor() {
|
|
711
711
|
super({
|
|
712
712
|
id: 'workbench.action.editor.nextChange',
|
|
713
|
-
label: ( localize2(
|
|
713
|
+
label: ( localize2(8989, "Go to Next Change")),
|
|
714
714
|
precondition: ( ContextKeyExpr.and(( TextCompareEditorActiveContext.toNegated()), ( quickDiffDecorationCount.notEqualsTo(0)))),
|
|
715
715
|
kbOpts: { kbExpr: EditorContextKeys.editorTextFocus, primary: KeyMod.Alt | KeyCode.F5, weight: KeybindingWeight.EditorContrib }
|
|
716
716
|
});
|
|
@@ -745,7 +745,7 @@ MenuRegistry.appendMenuItem(MenuId.MenubarGoMenu, {
|
|
|
745
745
|
group: '7_change_nav',
|
|
746
746
|
command: {
|
|
747
747
|
id: 'editor.action.dirtydiff.next',
|
|
748
|
-
title: ( localize(
|
|
748
|
+
title: ( localize(8990, "Next &&Change"))
|
|
749
749
|
},
|
|
750
750
|
order: 1
|
|
751
751
|
});
|
|
@@ -753,7 +753,7 @@ MenuRegistry.appendMenuItem(MenuId.MenubarGoMenu, {
|
|
|
753
753
|
group: '7_change_nav',
|
|
754
754
|
command: {
|
|
755
755
|
id: 'editor.action.dirtydiff.previous',
|
|
756
|
-
title: ( localize(
|
|
756
|
+
title: ( localize(8991, "Previous &&Change"))
|
|
757
757
|
},
|
|
758
758
|
order: 2
|
|
759
759
|
});
|
|
@@ -4,7 +4,7 @@ import { Registry } from '@codingame/monaco-vscode-api/vscode/vs/platform/regist
|
|
|
4
4
|
import { Extensions, registerWorkbenchContribution2, WorkbenchPhase } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/contributions';
|
|
5
5
|
import { QuickDiffWorkbenchController } from './quickDiffDecorator.js';
|
|
6
6
|
import { VIEWLET_ID, VIEW_PANE_ID, HISTORY_VIEW_PANE_ID, REPOSITORIES_VIEW_PANE_ID } from '@codingame/monaco-vscode-ff9fa663-eae3-5274-8573-c2b918871e4b-common/vscode/vs/workbench/contrib/scm/common/scm';
|
|
7
|
-
import { ISCMService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/scm/common/scm.service';
|
|
7
|
+
import { ISCMService, ISCMViewService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/scm/common/scm.service';
|
|
8
8
|
import { KeyMod, KeyCode } from '@codingame/monaco-vscode-api/vscode/vs/base/common/keyCodes';
|
|
9
9
|
import { MenuRegistry, MenuId } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
|
|
10
10
|
import { SCMActiveRepositoryController, SCMActiveResourceContextKeyController } from './activity.js';
|
|
@@ -24,11 +24,11 @@ import { ModesRegistry } from '@codingame/monaco-vscode-api/vscode/vs/editor/com
|
|
|
24
24
|
import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
|
|
25
25
|
import { registerIcon } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/iconRegistry';
|
|
26
26
|
import { ContextKeys, SCMViewPane } from './scmViewPane.js';
|
|
27
|
-
import './scmViewService.js';
|
|
27
|
+
import { RepositoryPicker } from './scmViewService.js';
|
|
28
28
|
import { SCMRepositoriesViewPane } from './scmRepositoriesViewPane.js';
|
|
29
|
+
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
29
30
|
import { Context } from '@codingame/monaco-vscode-api/vscode/vs/editor/contrib/suggest/browser/suggest';
|
|
30
31
|
import { WorkspaceTrustContext, MANAGE_TRUST_COMMAND_ID } from '@codingame/monaco-vscode-27663a0b-1249-58ba-9085-e52d706b50bc-common/vscode/vs/workbench/contrib/workspace/common/workspace';
|
|
31
|
-
import '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
32
32
|
import '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/scm/common/quickDiffService';
|
|
33
33
|
import { getActiveElement, isActiveElement } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
|
|
34
34
|
import { SCMWorkingSetController } from './workingSet.js';
|
|
@@ -54,10 +54,10 @@ ModesRegistry.registerLanguage({
|
|
|
54
54
|
( Registry.as(Extensions.Workbench))
|
|
55
55
|
.registerWorkbenchContribution(QuickDiffWorkbenchController, LifecyclePhase.Restored);
|
|
56
56
|
registerEditorContribution(QuickDiffEditorController.ID, QuickDiffEditorController, EditorContributionInstantiation.AfterFirstRender);
|
|
57
|
-
const sourceControlViewIcon = registerIcon('source-control-view-icon', Codicon.sourceControl, ( localize(
|
|
57
|
+
const sourceControlViewIcon = registerIcon('source-control-view-icon', Codicon.sourceControl, ( localize(8992, 'View icon of the Source Control view.')));
|
|
58
58
|
const viewContainer = ( Registry.as(Extensions$1.ViewContainersRegistry)).registerViewContainer({
|
|
59
59
|
id: VIEWLET_ID,
|
|
60
|
-
title: ( localize2(
|
|
60
|
+
title: ( localize2(8993, 'Source Control')),
|
|
61
61
|
ctorDescriptor: ( new SyncDescriptor(SCMViewPaneContainer)),
|
|
62
62
|
storageId: 'workbench.scm.views.state',
|
|
63
63
|
icon: sourceControlViewIcon,
|
|
@@ -66,25 +66,25 @@ const viewContainer = ( Registry.as(Extensions$1.ViewContainersRegistry)).regist
|
|
|
66
66
|
hideIfEmpty: true,
|
|
67
67
|
}, ViewContainerLocation.Sidebar, { doNotRegisterOpenCommand: true });
|
|
68
68
|
const viewsRegistry = ( Registry.as(Extensions$1.ViewsRegistry));
|
|
69
|
-
const containerTitle = ( localize(
|
|
69
|
+
const containerTitle = ( localize(8994, "Source Control"));
|
|
70
70
|
viewsRegistry.registerViewWelcomeContent(VIEW_PANE_ID, {
|
|
71
|
-
content: ( localize(
|
|
71
|
+
content: ( localize(8995, "No source control providers registered.")),
|
|
72
72
|
when: 'default'
|
|
73
73
|
});
|
|
74
74
|
viewsRegistry.registerViewWelcomeContent(VIEW_PANE_ID, {
|
|
75
75
|
content: ( localize(
|
|
76
|
-
|
|
76
|
+
8996,
|
|
77
77
|
"None of the registered source control providers work in Restricted Mode."
|
|
78
78
|
)),
|
|
79
79
|
when: ( ContextKeyExpr.and(( ContextKeyExpr.equals('scm.providerCount', 0)), WorkspaceTrustContext.IsEnabled, ( WorkspaceTrustContext.IsTrusted.toNegated())))
|
|
80
80
|
});
|
|
81
81
|
viewsRegistry.registerViewWelcomeContent(VIEW_PANE_ID, {
|
|
82
|
-
content: `[${( localize(
|
|
82
|
+
content: `[${( localize(8997, "Manage Workspace Trust"))}](command:${MANAGE_TRUST_COMMAND_ID})`,
|
|
83
83
|
when: ( ContextKeyExpr.and(( ContextKeyExpr.equals('scm.providerCount', 0)), WorkspaceTrustContext.IsEnabled, ( WorkspaceTrustContext.IsTrusted.toNegated())))
|
|
84
84
|
});
|
|
85
85
|
viewsRegistry.registerViewWelcomeContent(HISTORY_VIEW_PANE_ID, {
|
|
86
86
|
content: ( localize(
|
|
87
|
-
|
|
87
|
+
8998,
|
|
88
88
|
"The selected source control provider does not have any source control history items."
|
|
89
89
|
)),
|
|
90
90
|
when: ( ContextKeys.SCMHistoryItemCount.isEqualTo(0))
|
|
@@ -92,8 +92,8 @@ viewsRegistry.registerViewWelcomeContent(HISTORY_VIEW_PANE_ID, {
|
|
|
92
92
|
viewsRegistry.registerViews([{
|
|
93
93
|
id: REPOSITORIES_VIEW_PANE_ID,
|
|
94
94
|
containerTitle,
|
|
95
|
-
name: ( localize2(
|
|
96
|
-
singleViewPaneContainerTitle: ( localize(
|
|
95
|
+
name: ( localize2(8999, "Repositories")),
|
|
96
|
+
singleViewPaneContainerTitle: ( localize(9000, "Source Control Repositories")),
|
|
97
97
|
ctorDescriptor: ( new SyncDescriptor(SCMRepositoriesViewPane)),
|
|
98
98
|
canToggleVisibility: true,
|
|
99
99
|
hideByDefault: true,
|
|
@@ -106,7 +106,7 @@ viewsRegistry.registerViews([{
|
|
|
106
106
|
viewsRegistry.registerViews([{
|
|
107
107
|
id: VIEW_PANE_ID,
|
|
108
108
|
containerTitle,
|
|
109
|
-
name: ( localize2(
|
|
109
|
+
name: ( localize2(9001, 'Changes')),
|
|
110
110
|
singleViewPaneContainerTitle: containerTitle,
|
|
111
111
|
ctorDescriptor: ( new SyncDescriptor(SCMViewPane)),
|
|
112
112
|
canToggleVisibility: true,
|
|
@@ -116,7 +116,7 @@ viewsRegistry.registerViews([{
|
|
|
116
116
|
containerIcon: sourceControlViewIcon,
|
|
117
117
|
openCommandActionDescriptor: {
|
|
118
118
|
id: viewContainer.id,
|
|
119
|
-
mnemonicTitle: ( localize(
|
|
119
|
+
mnemonicTitle: ( localize(9002, "Source &&Control")),
|
|
120
120
|
keybindings: {
|
|
121
121
|
primary: 0,
|
|
122
122
|
win: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyG },
|
|
@@ -129,8 +129,8 @@ viewsRegistry.registerViews([{
|
|
|
129
129
|
viewsRegistry.registerViews([{
|
|
130
130
|
id: HISTORY_VIEW_PANE_ID,
|
|
131
131
|
containerTitle,
|
|
132
|
-
name: ( localize2(
|
|
133
|
-
singleViewPaneContainerTitle: ( localize(
|
|
132
|
+
name: ( localize2(9003, "Graph")),
|
|
133
|
+
singleViewPaneContainerTitle: ( localize(9004, "Source Control Graph")),
|
|
134
134
|
ctorDescriptor: ( new SyncDescriptor(SCMHistoryViewPane)),
|
|
135
135
|
canToggleVisibility: true,
|
|
136
136
|
canMoveView: true,
|
|
@@ -147,7 +147,7 @@ registerWorkbenchContribution2(SCMWorkingSetController.ID, SCMWorkingSetControll
|
|
|
147
147
|
( Registry.as(Extensions$2.Configuration)).registerConfiguration({
|
|
148
148
|
id: 'scm',
|
|
149
149
|
order: 5,
|
|
150
|
-
title: ( localize(
|
|
150
|
+
title: ( localize(9005, "Source Control")),
|
|
151
151
|
type: 'object',
|
|
152
152
|
scope: ConfigurationScope.RESOURCE,
|
|
153
153
|
properties: {
|
|
@@ -155,21 +155,21 @@ registerWorkbenchContribution2(SCMWorkingSetController.ID, SCMWorkingSetControll
|
|
|
155
155
|
type: 'string',
|
|
156
156
|
enum: ['all', 'gutter', 'overview', 'minimap', 'none'],
|
|
157
157
|
enumDescriptions: [
|
|
158
|
-
( localize(
|
|
159
|
-
( localize(
|
|
160
|
-
( localize(
|
|
161
|
-
( localize(
|
|
162
|
-
( localize(
|
|
158
|
+
( localize(9006, "Show the diff decorations in all available locations.")),
|
|
159
|
+
( localize(9007, "Show the diff decorations only in the editor gutter.")),
|
|
160
|
+
( localize(9008, "Show the diff decorations only in the overview ruler.")),
|
|
161
|
+
( localize(9009, "Show the diff decorations only in the minimap.")),
|
|
162
|
+
( localize(9010, "Do not show the diff decorations."))
|
|
163
163
|
],
|
|
164
164
|
default: 'all',
|
|
165
|
-
description: ( localize(
|
|
165
|
+
description: ( localize(9011, "Controls diff decorations in the editor."))
|
|
166
166
|
},
|
|
167
167
|
'scm.diffDecorationsGutterWidth': {
|
|
168
168
|
type: 'number',
|
|
169
169
|
enum: [1, 2, 3, 4, 5],
|
|
170
170
|
default: 3,
|
|
171
171
|
description: ( localize(
|
|
172
|
-
|
|
172
|
+
9012,
|
|
173
173
|
"Controls the width(px) of diff decorations in gutter (added & modified)."
|
|
174
174
|
))
|
|
175
175
|
},
|
|
@@ -177,11 +177,11 @@ registerWorkbenchContribution2(SCMWorkingSetController.ID, SCMWorkingSetControll
|
|
|
177
177
|
type: 'string',
|
|
178
178
|
enum: ['always', 'hover'],
|
|
179
179
|
enumDescriptions: [
|
|
180
|
-
( localize(
|
|
181
|
-
( localize(
|
|
180
|
+
( localize(9013, "Show the diff decorator in the gutter at all times.")),
|
|
181
|
+
( localize(9014, "Show the diff decorator in the gutter only on hover."))
|
|
182
182
|
],
|
|
183
183
|
description: ( localize(
|
|
184
|
-
|
|
184
|
+
9015,
|
|
185
185
|
"Controls the visibility of the Source Control diff decorator in the gutter."
|
|
186
186
|
)),
|
|
187
187
|
default: 'always'
|
|
@@ -190,27 +190,27 @@ registerWorkbenchContribution2(SCMWorkingSetController.ID, SCMWorkingSetControll
|
|
|
190
190
|
type: 'string',
|
|
191
191
|
enum: ['diff', 'none'],
|
|
192
192
|
enumDescriptions: [
|
|
193
|
-
( localize(
|
|
194
|
-
( localize(
|
|
193
|
+
( localize(9016, "Show the inline diff Peek view on click.")),
|
|
194
|
+
( localize(9017, "Do nothing."))
|
|
195
195
|
],
|
|
196
|
-
description: ( localize(
|
|
196
|
+
description: ( localize(9018, "Controls the behavior of Source Control diff gutter decorations.")),
|
|
197
197
|
default: 'diff'
|
|
198
198
|
},
|
|
199
199
|
'scm.diffDecorationsGutterPattern': {
|
|
200
200
|
type: 'object',
|
|
201
201
|
description: ( localize(
|
|
202
|
-
|
|
202
|
+
9019,
|
|
203
203
|
"Controls whether a pattern is used for the diff decorations in gutter."
|
|
204
204
|
)),
|
|
205
205
|
additionalProperties: false,
|
|
206
206
|
properties: {
|
|
207
207
|
'added': {
|
|
208
208
|
type: 'boolean',
|
|
209
|
-
description: ( localize(
|
|
209
|
+
description: ( localize(9020, "Use pattern for the diff decorations in gutter for added lines.")),
|
|
210
210
|
},
|
|
211
211
|
'modified': {
|
|
212
212
|
type: 'boolean',
|
|
213
|
-
description: ( localize(
|
|
213
|
+
description: ( localize(9021, "Use pattern for the diff decorations in gutter for modified lines.")),
|
|
214
214
|
},
|
|
215
215
|
},
|
|
216
216
|
default: {
|
|
@@ -222,12 +222,12 @@ registerWorkbenchContribution2(SCMWorkingSetController.ID, SCMWorkingSetControll
|
|
|
222
222
|
type: 'string',
|
|
223
223
|
enum: ['true', 'false', 'inherit'],
|
|
224
224
|
enumDescriptions: [
|
|
225
|
-
( localize(
|
|
226
|
-
( localize(
|
|
227
|
-
( localize(
|
|
225
|
+
( localize(9022, "Ignore leading and trailing whitespace.")),
|
|
226
|
+
( localize(9023, "Do not ignore leading and trailing whitespace.")),
|
|
227
|
+
( localize(9024, "Inherit from `diffEditor.ignoreTrimWhitespace`."))
|
|
228
228
|
],
|
|
229
229
|
description: ( localize(
|
|
230
|
-
|
|
230
|
+
9025,
|
|
231
231
|
"Controls whether leading and trailing whitespace is ignored in Source Control diff gutter decorations."
|
|
232
232
|
)),
|
|
233
233
|
default: 'false'
|
|
@@ -235,7 +235,7 @@ registerWorkbenchContribution2(SCMWorkingSetController.ID, SCMWorkingSetControll
|
|
|
235
235
|
'scm.alwaysShowActions': {
|
|
236
236
|
type: 'boolean',
|
|
237
237
|
description: ( localize(
|
|
238
|
-
|
|
238
|
+
9026,
|
|
239
239
|
"Controls whether inline actions are always visible in the Source Control view."
|
|
240
240
|
)),
|
|
241
241
|
default: false
|
|
@@ -244,12 +244,12 @@ registerWorkbenchContribution2(SCMWorkingSetController.ID, SCMWorkingSetControll
|
|
|
244
244
|
type: 'string',
|
|
245
245
|
enum: ['all', 'focused', 'off'],
|
|
246
246
|
enumDescriptions: [
|
|
247
|
-
( localize(
|
|
248
|
-
( localize(
|
|
249
|
-
( localize(
|
|
247
|
+
( localize(9027, "Show the sum of all Source Control Provider count badges.")),
|
|
248
|
+
( localize(9028, "Show the count badge of the focused Source Control Provider.")),
|
|
249
|
+
( localize(9029, "Disable the Source Control count badge."))
|
|
250
250
|
],
|
|
251
251
|
description: ( localize(
|
|
252
|
-
|
|
252
|
+
9030,
|
|
253
253
|
"Controls the count badge on the Source Control icon on the Activity Bar."
|
|
254
254
|
)),
|
|
255
255
|
default: 'all'
|
|
@@ -258,12 +258,12 @@ registerWorkbenchContribution2(SCMWorkingSetController.ID, SCMWorkingSetControll
|
|
|
258
258
|
type: 'string',
|
|
259
259
|
enum: ['hidden', 'auto', 'visible'],
|
|
260
260
|
enumDescriptions: [
|
|
261
|
-
( localize(
|
|
262
|
-
( localize(
|
|
263
|
-
( localize(
|
|
261
|
+
( localize(9031, "Hide Source Control Provider count badges.")),
|
|
262
|
+
( localize(9032, "Only show count badge for Source Control Provider when non-zero.")),
|
|
263
|
+
( localize(9033, "Show Source Control Provider count badges."))
|
|
264
264
|
],
|
|
265
265
|
markdownDescription: ( localize(
|
|
266
|
-
|
|
266
|
+
9034,
|
|
267
267
|
"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.",
|
|
268
268
|
'\`#scm.alwaysShowRepositories#\`'
|
|
269
269
|
)),
|
|
@@ -273,22 +273,22 @@ registerWorkbenchContribution2(SCMWorkingSetController.ID, SCMWorkingSetControll
|
|
|
273
273
|
type: 'string',
|
|
274
274
|
enum: ['tree', 'list'],
|
|
275
275
|
enumDescriptions: [
|
|
276
|
-
( localize(
|
|
277
|
-
( localize(
|
|
276
|
+
( localize(9035, "Show the repository changes as a tree.")),
|
|
277
|
+
( localize(9036, "Show the repository changes as a list."))
|
|
278
278
|
],
|
|
279
|
-
description: ( localize(
|
|
279
|
+
description: ( localize(9037, "Controls the default Source Control repository view mode.")),
|
|
280
280
|
default: 'list'
|
|
281
281
|
},
|
|
282
282
|
'scm.defaultViewSortKey': {
|
|
283
283
|
type: 'string',
|
|
284
284
|
enum: ['name', 'path', 'status'],
|
|
285
285
|
enumDescriptions: [
|
|
286
|
-
( localize(
|
|
287
|
-
( localize(
|
|
288
|
-
( localize(
|
|
286
|
+
( localize(9038, "Sort the repository changes by file name.")),
|
|
287
|
+
( localize(9039, "Sort the repository changes by path.")),
|
|
288
|
+
( localize(9040, "Sort the repository changes by Source Control status."))
|
|
289
289
|
],
|
|
290
290
|
description: ( localize(
|
|
291
|
-
|
|
291
|
+
9041,
|
|
292
292
|
"Controls the default Source Control repository changes sort order when viewed as a list."
|
|
293
293
|
)),
|
|
294
294
|
default: 'path'
|
|
@@ -296,7 +296,7 @@ registerWorkbenchContribution2(SCMWorkingSetController.ID, SCMWorkingSetControll
|
|
|
296
296
|
'scm.autoReveal': {
|
|
297
297
|
type: 'boolean',
|
|
298
298
|
description: ( localize(
|
|
299
|
-
|
|
299
|
+
9042,
|
|
300
300
|
"Controls whether the Source Control view should automatically reveal and select files when opening them."
|
|
301
301
|
)),
|
|
302
302
|
default: true
|
|
@@ -304,20 +304,20 @@ registerWorkbenchContribution2(SCMWorkingSetController.ID, SCMWorkingSetControll
|
|
|
304
304
|
'scm.inputFontFamily': {
|
|
305
305
|
type: 'string',
|
|
306
306
|
markdownDescription: ( localize(
|
|
307
|
-
|
|
307
|
+
9043,
|
|
308
308
|
"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."
|
|
309
309
|
)),
|
|
310
310
|
default: 'default'
|
|
311
311
|
},
|
|
312
312
|
'scm.inputFontSize': {
|
|
313
313
|
type: 'number',
|
|
314
|
-
markdownDescription: ( localize(
|
|
314
|
+
markdownDescription: ( localize(9044, "Controls the font size for the input message in pixels.")),
|
|
315
315
|
default: 13
|
|
316
316
|
},
|
|
317
317
|
'scm.inputMaxLineCount': {
|
|
318
318
|
type: 'number',
|
|
319
319
|
markdownDescription: ( localize(
|
|
320
|
-
|
|
320
|
+
9045,
|
|
321
321
|
"Controls the maximum number of lines that the input will auto-grow to."
|
|
322
322
|
)),
|
|
323
323
|
minimum: 1,
|
|
@@ -327,7 +327,7 @@ registerWorkbenchContribution2(SCMWorkingSetController.ID, SCMWorkingSetControll
|
|
|
327
327
|
'scm.inputMinLineCount': {
|
|
328
328
|
type: 'number',
|
|
329
329
|
markdownDescription: ( localize(
|
|
330
|
-
|
|
330
|
+
9046,
|
|
331
331
|
"Controls the minimum number of lines that the input will auto-grow from."
|
|
332
332
|
)),
|
|
333
333
|
minimum: 1,
|
|
@@ -337,7 +337,7 @@ registerWorkbenchContribution2(SCMWorkingSetController.ID, SCMWorkingSetControll
|
|
|
337
337
|
'scm.alwaysShowRepositories': {
|
|
338
338
|
type: 'boolean',
|
|
339
339
|
markdownDescription: ( localize(
|
|
340
|
-
|
|
340
|
+
9047,
|
|
341
341
|
"Controls whether repositories should always be visible in the Source Control view."
|
|
342
342
|
)),
|
|
343
343
|
default: false
|
|
@@ -347,20 +347,20 @@ registerWorkbenchContribution2(SCMWorkingSetController.ID, SCMWorkingSetControll
|
|
|
347
347
|
enum: ['discovery time', 'name', 'path'],
|
|
348
348
|
enumDescriptions: [
|
|
349
349
|
( localize(
|
|
350
|
-
|
|
350
|
+
9048,
|
|
351
351
|
"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."
|
|
352
352
|
)),
|
|
353
353
|
( localize(
|
|
354
|
-
|
|
354
|
+
9049,
|
|
355
355
|
"Repositories in the Source Control Repositories and Source Control views are sorted by repository name."
|
|
356
356
|
)),
|
|
357
357
|
( localize(
|
|
358
|
-
|
|
358
|
+
9050,
|
|
359
359
|
"Repositories in the Source Control Repositories and Source Control views are sorted by repository path."
|
|
360
360
|
))
|
|
361
361
|
],
|
|
362
362
|
description: ( localize(
|
|
363
|
-
|
|
363
|
+
9051,
|
|
364
364
|
"Controls the sort order of the repositories in the source control repositories view."
|
|
365
365
|
)),
|
|
366
366
|
default: 'discovery time'
|
|
@@ -368,7 +368,7 @@ registerWorkbenchContribution2(SCMWorkingSetController.ID, SCMWorkingSetControll
|
|
|
368
368
|
'scm.repositories.visible': {
|
|
369
369
|
type: 'number',
|
|
370
370
|
description: ( localize(
|
|
371
|
-
|
|
371
|
+
9052,
|
|
372
372
|
"Controls how many repositories are visible in the Source Control Repositories section. Set to 0, to be able to manually resize the view."
|
|
373
373
|
)),
|
|
374
374
|
default: 10
|
|
@@ -376,7 +376,7 @@ registerWorkbenchContribution2(SCMWorkingSetController.ID, SCMWorkingSetControll
|
|
|
376
376
|
'scm.showActionButton': {
|
|
377
377
|
type: 'boolean',
|
|
378
378
|
markdownDescription: ( localize(
|
|
379
|
-
|
|
379
|
+
9053,
|
|
380
380
|
"Controls whether an action button can be shown in the Source Control view."
|
|
381
381
|
)),
|
|
382
382
|
default: true
|
|
@@ -384,7 +384,7 @@ registerWorkbenchContribution2(SCMWorkingSetController.ID, SCMWorkingSetControll
|
|
|
384
384
|
'scm.showInputActionButton': {
|
|
385
385
|
type: 'boolean',
|
|
386
386
|
markdownDescription: ( localize(
|
|
387
|
-
|
|
387
|
+
9054,
|
|
388
388
|
"Controls whether an action button can be shown in the Source Control input."
|
|
389
389
|
)),
|
|
390
390
|
default: true
|
|
@@ -392,7 +392,7 @@ registerWorkbenchContribution2(SCMWorkingSetController.ID, SCMWorkingSetControll
|
|
|
392
392
|
'scm.workingSets.enabled': {
|
|
393
393
|
type: 'boolean',
|
|
394
394
|
description: ( localize(
|
|
395
|
-
|
|
395
|
+
9055,
|
|
396
396
|
"Controls whether to store editor working sets when switching between source control history item groups."
|
|
397
397
|
)),
|
|
398
398
|
default: false
|
|
@@ -402,16 +402,16 @@ registerWorkbenchContribution2(SCMWorkingSetController.ID, SCMWorkingSetControll
|
|
|
402
402
|
enum: ['empty', 'current'],
|
|
403
403
|
enumDescriptions: [
|
|
404
404
|
( localize(
|
|
405
|
-
|
|
405
|
+
9056,
|
|
406
406
|
"Use an empty working set when switching to a source control history item group that does not have a working set."
|
|
407
407
|
)),
|
|
408
408
|
( localize(
|
|
409
|
-
|
|
409
|
+
9057,
|
|
410
410
|
"Use the current working set when switching to a source control history item group that does not have a working set."
|
|
411
411
|
))
|
|
412
412
|
],
|
|
413
413
|
description: ( localize(
|
|
414
|
-
|
|
414
|
+
9058,
|
|
415
415
|
"Controls the default working set to use when switching to a source control history item group that does not have a working set."
|
|
416
416
|
)),
|
|
417
417
|
default: 'current'
|
|
@@ -419,7 +419,7 @@ registerWorkbenchContribution2(SCMWorkingSetController.ID, SCMWorkingSetControll
|
|
|
419
419
|
'scm.compactFolders': {
|
|
420
420
|
type: 'boolean',
|
|
421
421
|
description: ( localize(
|
|
422
|
-
|
|
422
|
+
9059,
|
|
423
423
|
"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."
|
|
424
424
|
)),
|
|
425
425
|
default: true
|
|
@@ -427,7 +427,7 @@ registerWorkbenchContribution2(SCMWorkingSetController.ID, SCMWorkingSetControll
|
|
|
427
427
|
'scm.graph.pageOnScroll': {
|
|
428
428
|
type: 'boolean',
|
|
429
429
|
description: ( localize(
|
|
430
|
-
|
|
430
|
+
9060,
|
|
431
431
|
"Controls whether the Source Control Graph view will load the next page of items when you scroll to the end of the list."
|
|
432
432
|
)),
|
|
433
433
|
default: true
|
|
@@ -435,7 +435,7 @@ registerWorkbenchContribution2(SCMWorkingSetController.ID, SCMWorkingSetControll
|
|
|
435
435
|
'scm.graph.pageSize': {
|
|
436
436
|
type: 'number',
|
|
437
437
|
description: ( localize(
|
|
438
|
-
|
|
438
|
+
9061,
|
|
439
439
|
"The number of items to show in the Source Control Graph view by default and when loading more items."
|
|
440
440
|
)),
|
|
441
441
|
minimum: 1,
|
|
@@ -447,16 +447,16 @@ registerWorkbenchContribution2(SCMWorkingSetController.ID, SCMWorkingSetControll
|
|
|
447
447
|
enum: ['all', 'filter'],
|
|
448
448
|
enumDescriptions: [
|
|
449
449
|
( localize(
|
|
450
|
-
|
|
450
|
+
9062,
|
|
451
451
|
"Show badges of all history item groups in the Source Control Graph view."
|
|
452
452
|
)),
|
|
453
453
|
( localize(
|
|
454
|
-
|
|
454
|
+
9063,
|
|
455
455
|
"Show only the badges of history item groups used as a filter in the Source Control Graph view."
|
|
456
456
|
))
|
|
457
457
|
],
|
|
458
458
|
description: ( localize(
|
|
459
|
-
|
|
459
|
+
9064,
|
|
460
460
|
"Controls which badges are shown in the Source Control Graph view. The badges are shown on the right side of the graph indicating the names of history item groups."
|
|
461
461
|
)),
|
|
462
462
|
default: 'filter'
|
|
@@ -465,7 +465,7 @@ registerWorkbenchContribution2(SCMWorkingSetController.ID, SCMWorkingSetControll
|
|
|
465
465
|
});
|
|
466
466
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
467
467
|
id: 'scm.acceptInput',
|
|
468
|
-
metadata: { description: ( localize(
|
|
468
|
+
metadata: { description: ( localize(9065, "Source Control: Accept Input")), args: [] },
|
|
469
469
|
weight: KeybindingWeight.WorkbenchContrib,
|
|
470
470
|
when: ( ContextKeyExpr.has('scmRepository')),
|
|
471
471
|
primary: KeyMod.CtrlCmd | KeyCode.Enter,
|
|
@@ -502,7 +502,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
502
502
|
}
|
|
503
503
|
});
|
|
504
504
|
const viewNextCommitCommand = {
|
|
505
|
-
description: { description: ( localize(
|
|
505
|
+
description: { description: ( localize(9066, "Source Control: View Next Commit")), args: [] },
|
|
506
506
|
weight: KeybindingWeight.WorkbenchContrib,
|
|
507
507
|
handler: (accessor) => {
|
|
508
508
|
const contextKeyService = accessor.get(IContextKeyService);
|
|
@@ -514,7 +514,7 @@ const viewNextCommitCommand = {
|
|
|
514
514
|
}
|
|
515
515
|
};
|
|
516
516
|
const viewPreviousCommitCommand = {
|
|
517
|
-
description: { description: ( localize(
|
|
517
|
+
description: { description: ( localize(9067, "Source Control: View Previous Commit")), args: [] },
|
|
518
518
|
weight: KeybindingWeight.WorkbenchContrib,
|
|
519
519
|
handler: (accessor) => {
|
|
520
520
|
const contextKeyService = accessor.get(IContextKeyService);
|
|
@@ -579,11 +579,26 @@ CommandsRegistry.registerCommand('scm.openInTerminal', async (accessor, provider
|
|
|
579
579
|
const commandService = accessor.get(ICommandService);
|
|
580
580
|
await commandService.executeCommand('openInTerminal', provider.rootUri);
|
|
581
581
|
});
|
|
582
|
+
CommandsRegistry.registerCommand('scm.setActiveProvider', async (accessor) => {
|
|
583
|
+
const instantiationService = accessor.get(IInstantiationService);
|
|
584
|
+
const scmViewService = accessor.get(ISCMViewService);
|
|
585
|
+
const placeHolder = ( localize(9068, "Select the active repository, type to filter all repositories"));
|
|
586
|
+
const autoQuickItemDescription = ( localize(
|
|
587
|
+
9069,
|
|
588
|
+
"The active repository is updated based on focused repository/active editor"
|
|
589
|
+
));
|
|
590
|
+
const repositoryPicker = instantiationService.createInstance(RepositoryPicker, placeHolder, autoQuickItemDescription);
|
|
591
|
+
const result = await repositoryPicker.pickRepository();
|
|
592
|
+
if (result?.repository) {
|
|
593
|
+
const repository = result.repository !== 'auto' ? result.repository : undefined;
|
|
594
|
+
scmViewService.pinActiveRepository(repository);
|
|
595
|
+
}
|
|
596
|
+
});
|
|
582
597
|
MenuRegistry.appendMenuItem(MenuId.SCMSourceControl, {
|
|
583
598
|
group: '100_end',
|
|
584
599
|
command: {
|
|
585
600
|
id: 'scm.openInTerminal',
|
|
586
|
-
title: ( localize(
|
|
601
|
+
title: ( localize(9070, "Open in External Terminal"))
|
|
587
602
|
},
|
|
588
603
|
when: ( ContextKeyExpr.and(( RemoteNameContext.isEqualTo('')), ( ContextKeyExpr.equals('scmProviderHasRootUri', true)), ( ContextKeyExpr.or(( ContextKeyExpr.equals('config.terminal.sourceControlRepositoriesKind', 'external')), ( ContextKeyExpr.equals('config.terminal.sourceControlRepositoriesKind', 'both'))))))
|
|
589
604
|
});
|
|
@@ -591,7 +606,7 @@ MenuRegistry.appendMenuItem(MenuId.SCMSourceControl, {
|
|
|
591
606
|
group: '100_end',
|
|
592
607
|
command: {
|
|
593
608
|
id: 'scm.openInIntegratedTerminal',
|
|
594
|
-
title: ( localize(
|
|
609
|
+
title: ( localize(9071, "Open in Integrated Terminal"))
|
|
595
610
|
},
|
|
596
611
|
when: ( ContextKeyExpr.and(( ContextKeyExpr.equals('scmProviderHasRootUri', true)), ( ContextKeyExpr.or(( ContextKeyExpr.equals('config.terminal.sourceControlRepositoriesKind', 'integrated')), ( ContextKeyExpr.equals('config.terminal.sourceControlRepositoriesKind', 'both'))))))
|
|
597
612
|
});
|