@codingame/monaco-vscode-scm-service-override 26.2.2 → 27.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/index.js +6 -2
- package/package.json +2 -2
- package/vscode/src/vs/workbench/contrib/scm/browser/activity.js +5 -5
- package/vscode/src/vs/workbench/contrib/scm/browser/menus.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/scm/browser/menus.js +3 -3
- package/vscode/src/vs/workbench/contrib/scm/browser/quickDiffDecorator.js +3 -3
- package/vscode/src/vs/workbench/contrib/scm/browser/quickDiffWidget.js +13 -13
- package/vscode/src/vs/workbench/contrib/scm/browser/scm.contribution.js +75 -74
- package/vscode/src/vs/workbench/contrib/scm/browser/scmAccessibilityHelp.js +23 -23
- package/vscode/src/vs/workbench/contrib/scm/browser/scmHistoryViewPane.js +26 -26
- package/vscode/src/vs/workbench/contrib/scm/browser/scmInput.d.ts +62 -0
- package/vscode/src/vs/workbench/contrib/scm/browser/scmInput.js +828 -0
- package/vscode/src/vs/workbench/contrib/scm/browser/scmRepositoriesViewPane.js +2 -1
- package/vscode/src/vs/workbench/contrib/scm/browser/scmViewPane.d.ts +1 -2
- package/vscode/src/vs/workbench/contrib/scm/browser/scmViewPane.js +35 -814
- package/vscode/src/vs/workbench/contrib/scm/browser/scmViewService.js +2 -1
- package/vscode/src/vs/workbench/contrib/scm/common/scmService.js +10 -8
package/index.js
CHANGED
|
@@ -5,17 +5,21 @@ import { SCMService } from './vscode/src/vs/workbench/contrib/scm/common/scmServ
|
|
|
5
5
|
import { SCMViewService } from './vscode/src/vs/workbench/contrib/scm/browser/scmViewService.js';
|
|
6
6
|
import { IQuickDiffService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/scm/common/quickDiff.service';
|
|
7
7
|
import { QuickDiffService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/scm/common/quickDiffService';
|
|
8
|
-
import './vscode/src/vs/workbench/contrib/scm/browser/scm.contribution.js';
|
|
9
8
|
import { SyncDescriptor } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/descriptors';
|
|
10
9
|
import { IQuickDiffModelService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/scm/browser/quickDiffModel.service';
|
|
11
10
|
import { QuickDiffModelService } from './vscode/src/vs/workbench/contrib/scm/browser/quickDiffModel.js';
|
|
11
|
+
import { IGitService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/git/common/gitService.service';
|
|
12
|
+
import { GitService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/git/browser/gitService';
|
|
13
|
+
import './vscode/src/vs/workbench/contrib/scm/browser/scm.contribution.js';
|
|
14
|
+
import '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/extensions';
|
|
12
15
|
|
|
13
16
|
function getServiceOverride() {
|
|
14
17
|
return {
|
|
15
18
|
[ISCMService.toString()]: new SyncDescriptor(SCMService, [], true),
|
|
16
19
|
[ISCMViewService.toString()]: new SyncDescriptor(SCMViewService, [], true),
|
|
17
20
|
[IQuickDiffService.toString()]: new SyncDescriptor(QuickDiffService, [], true),
|
|
18
|
-
[IQuickDiffModelService.toString()]: new SyncDescriptor(QuickDiffModelService, [], true)
|
|
21
|
+
[IQuickDiffModelService.toString()]: new SyncDescriptor(QuickDiffModelService, [], true),
|
|
22
|
+
[IGitService.toString()]: new SyncDescriptor(GitService, [], true)
|
|
19
23
|
};
|
|
20
24
|
}
|
|
21
25
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-scm-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "27.0.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor - scm service-override",
|
|
6
6
|
"keywords": [],
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codingame/monaco-vscode-api": "
|
|
18
|
+
"@codingame/monaco-vscode-api": "27.0.0"
|
|
19
19
|
},
|
|
20
20
|
"main": "index.js",
|
|
21
21
|
"module": "index.js",
|
|
@@ -127,7 +127,7 @@ let SCMActiveRepositoryController = class SCMActiveRepositoryController extends
|
|
|
127
127
|
if (count === 0) {
|
|
128
128
|
return;
|
|
129
129
|
}
|
|
130
|
-
const badge = ( new NumberBadge(count, num => ( localize(
|
|
130
|
+
const badge = ( new NumberBadge(count, num => ( localize(11699, "{0} pending changes", num))));
|
|
131
131
|
store.add(this.activityService.showViewActivity(VIEW_PANE_ID, {
|
|
132
132
|
badge
|
|
133
133
|
}));
|
|
@@ -142,7 +142,7 @@ let SCMActiveRepositoryController = class SCMActiveRepositoryController extends
|
|
|
142
142
|
const tooltip = `${label}${command.tooltip ? ` - ${command.tooltip}` : ""}`;
|
|
143
143
|
const genericCommandName = getStatusBarCommandGenericName(command);
|
|
144
144
|
const statusbarEntry = {
|
|
145
|
-
name: ( localize(
|
|
145
|
+
name: ( localize(11700, "Source Control")) + (genericCommandName ? ` ${genericCommandName}` : ""),
|
|
146
146
|
text: command.title,
|
|
147
147
|
ariaLabel: tooltip,
|
|
148
148
|
tooltip,
|
|
@@ -170,7 +170,7 @@ let SCMActiveRepositoryController = class SCMActiveRepositoryController extends
|
|
|
170
170
|
if (this.scmViewService.repositories.length > 1) {
|
|
171
171
|
const icon = getSCMRepositoryIcon(activeRepository, activeRepository.repository);
|
|
172
172
|
const repositoryStatusbarEntry = {
|
|
173
|
-
name: ( localize(
|
|
173
|
+
name: ( localize(11701, "Source Control Provider")),
|
|
174
174
|
text: `$(${icon.id}) ${activeRepository.repository.provider.name}`,
|
|
175
175
|
ariaLabel: label,
|
|
176
176
|
tooltip: label,
|
|
@@ -203,8 +203,8 @@ let SCMActiveResourceContextKeyController = class SCMActiveResourceContextKeyCon
|
|
|
203
203
|
this.scmService = scmService;
|
|
204
204
|
this.uriIdentityService = uriIdentityService;
|
|
205
205
|
this._onDidRepositoryChange = ( new Emitter());
|
|
206
|
-
const activeResourceHasChangesContextKey = ( new RawContextKey("scmActiveResourceHasChanges", false, ( localize(
|
|
207
|
-
const activeResourceRepositoryContextKey = ( new RawContextKey("scmActiveResourceRepository", undefined, ( localize(
|
|
206
|
+
const activeResourceHasChangesContextKey = ( new RawContextKey("scmActiveResourceHasChanges", false, ( localize(11702, "Whether the active resource has changes"))));
|
|
207
|
+
const activeResourceRepositoryContextKey = ( new RawContextKey("scmActiveResourceRepository", undefined, ( localize(11703, "The active resource's repository"))));
|
|
208
208
|
this._repositories = observableFromEvent(
|
|
209
209
|
this,
|
|
210
210
|
Event.any(this.scmService.onDidAddRepository, this.scmService.onDidRemoveRepository),
|
|
@@ -12,10 +12,10 @@ export declare class SCMTitleMenu implements IDisposable {
|
|
|
12
12
|
get actions(): IAction[];
|
|
13
13
|
private _secondaryActions;
|
|
14
14
|
get secondaryActions(): IAction[];
|
|
15
|
-
private readonly _onDidChangeTitle;
|
|
16
|
-
readonly onDidChangeTitle: import("@codingame/monaco-vscode-api/vscode/vs/base/common/event").Event<void>;
|
|
17
15
|
readonly menu: IMenu;
|
|
18
16
|
private readonly disposables;
|
|
17
|
+
private readonly _onDidChangeTitle;
|
|
18
|
+
readonly onDidChangeTitle: import("@codingame/monaco-vscode-api/vscode/vs/base/common/event").Event<void>;
|
|
19
19
|
constructor(menuService: IMenuService, contextKeyService: IContextKeyService);
|
|
20
20
|
private updateTitleActions;
|
|
21
21
|
dispose(): void;
|
|
@@ -28,9 +28,9 @@ let SCMTitleMenu = class SCMTitleMenu {
|
|
|
28
28
|
constructor(menuService, contextKeyService) {
|
|
29
29
|
this._actions = [];
|
|
30
30
|
this._secondaryActions = [];
|
|
31
|
-
this._onDidChangeTitle = ( new Emitter());
|
|
32
|
-
this.onDidChangeTitle = this._onDidChangeTitle.event;
|
|
33
31
|
this.disposables = ( new DisposableStore());
|
|
32
|
+
this._onDidChangeTitle = this.disposables.add(( new Emitter()));
|
|
33
|
+
this.onDidChangeTitle = this._onDidChangeTitle.event;
|
|
34
34
|
this.menu = menuService.createMenu(MenuId.SCMTitle, contextKeyService);
|
|
35
35
|
this.disposables.add(this.menu);
|
|
36
36
|
this.menu.onDidChange(this.updateTitleActions, this, this.disposables);
|
|
@@ -313,7 +313,7 @@ let SCMMenus = class SCMMenus {
|
|
|
313
313
|
};
|
|
314
314
|
SCMMenus = ( __decorate([( __param(0, ISCMService)), ( __param(1, IInstantiationService))], SCMMenus));
|
|
315
315
|
MenuRegistry.appendMenuItem(MenuId.SCMResourceContext, {
|
|
316
|
-
title: ( localize(
|
|
316
|
+
title: ( localize(11704, "Share")),
|
|
317
317
|
submenu: MenuId.SCMResourceContextShare,
|
|
318
318
|
group: "45_share",
|
|
319
319
|
order: 3
|
|
@@ -61,7 +61,7 @@ let QuickDiffDecorator = QuickDiffDecorator_1 = class QuickDiffDecorator extends
|
|
|
61
61
|
const gutter = decorations === "all" || decorations === "gutter";
|
|
62
62
|
const overview = decorations === "all" || decorations === "overview";
|
|
63
63
|
const minimap = decorations === "all" || decorations === "minimap";
|
|
64
|
-
const diffAdded = ( localize(
|
|
64
|
+
const diffAdded = ( localize(11705, "Added lines"));
|
|
65
65
|
const diffAddedOptions = {
|
|
66
66
|
gutter,
|
|
67
67
|
overview: {
|
|
@@ -78,7 +78,7 @@ let QuickDiffDecorator = QuickDiffDecorator_1 = class QuickDiffDecorator extends
|
|
|
78
78
|
this.addedPatternOptions = QuickDiffDecorator_1.createDecoration("dirty-diff-added primary pattern", diffAdded, diffAddedOptions);
|
|
79
79
|
this.addedSecondaryOptions = QuickDiffDecorator_1.createDecoration("dirty-diff-added secondary", diffAdded, diffAddedOptions);
|
|
80
80
|
this.addedSecondaryPatternOptions = QuickDiffDecorator_1.createDecoration("dirty-diff-added secondary pattern", diffAdded, diffAddedOptions);
|
|
81
|
-
const diffModified = ( localize(
|
|
81
|
+
const diffModified = ( localize(11706, "Changed lines"));
|
|
82
82
|
const diffModifiedOptions = {
|
|
83
83
|
gutter,
|
|
84
84
|
overview: {
|
|
@@ -95,7 +95,7 @@ let QuickDiffDecorator = QuickDiffDecorator_1 = class QuickDiffDecorator extends
|
|
|
95
95
|
this.modifiedPatternOptions = QuickDiffDecorator_1.createDecoration("dirty-diff-modified primary pattern", diffModified, diffModifiedOptions);
|
|
96
96
|
this.modifiedSecondaryOptions = QuickDiffDecorator_1.createDecoration("dirty-diff-modified secondary", diffModified, diffModifiedOptions);
|
|
97
97
|
this.modifiedSecondaryPatternOptions = QuickDiffDecorator_1.createDecoration("dirty-diff-modified secondary pattern", diffModified, diffModifiedOptions);
|
|
98
|
-
const diffDeleted = ( localize(
|
|
98
|
+
const diffDeleted = ( localize(11707, "Removed lines"));
|
|
99
99
|
const diffDeletedOptions = {
|
|
100
100
|
gutter,
|
|
101
101
|
overview: {
|
|
@@ -71,7 +71,7 @@ let QuickDiffPickerViewItem = class QuickDiffPickerViewItem extends SelectAction
|
|
|
71
71
|
const opaqueTitleColor = peekTitleColor?.makeOpaque(editorBackgroundColor) ?? editorBackgroundColor;
|
|
72
72
|
styles.selectBackground = ( ( opaqueTitleColor.lighten(.6)).toString());
|
|
73
73
|
super(null, action, [], 0, contextViewService, styles, {
|
|
74
|
-
ariaLabel: ( localize(
|
|
74
|
+
ariaLabel: ( localize(11708, "Switch quick diff base")),
|
|
75
75
|
useCustomDrawn: !hasNativeContextMenu(configurationService)
|
|
76
76
|
});
|
|
77
77
|
this.optionsItems = [];
|
|
@@ -98,7 +98,7 @@ class QuickDiffPickerBaseAction extends Action {
|
|
|
98
98
|
this.ID = "quickDiff.base.switch";
|
|
99
99
|
}
|
|
100
100
|
static {
|
|
101
|
-
this.LABEL = ( localize(
|
|
101
|
+
this.LABEL = ( localize(11709, "Switch Quick Diff Base"));
|
|
102
102
|
}
|
|
103
103
|
constructor(callback) {
|
|
104
104
|
super(
|
|
@@ -245,13 +245,13 @@ let QuickDiffWidget = class QuickDiffWidget extends PeekViewWidget {
|
|
|
245
245
|
if (!this.shouldUseDropdown()) {
|
|
246
246
|
const label = this.model.quickDiffs.find(quickDiff => quickDiff.id === this._providerId)?.label ?? "";
|
|
247
247
|
detail = this.model.changes.length > 1 ? ( localize(
|
|
248
|
-
|
|
248
|
+
11710,
|
|
249
249
|
"{0} - {1} of {2} changes",
|
|
250
250
|
label,
|
|
251
251
|
providerIndex + 1,
|
|
252
252
|
providerChanges.length
|
|
253
253
|
)) : ( localize(
|
|
254
|
-
|
|
254
|
+
11711,
|
|
255
255
|
"{0} - {1} of {2} change",
|
|
256
256
|
label,
|
|
257
257
|
providerIndex + 1,
|
|
@@ -259,7 +259,7 @@ let QuickDiffWidget = class QuickDiffWidget extends PeekViewWidget {
|
|
|
259
259
|
));
|
|
260
260
|
this.dropdownContainer.style.display = "none";
|
|
261
261
|
} else {
|
|
262
|
-
detail = this.model.changes.length > 1 ? ( localize(
|
|
262
|
+
detail = this.model.changes.length > 1 ? ( localize(11712, "{0} of {1} changes", providerIndex + 1, providerChanges.length)) : ( localize(11713, "{0} of {1} change", providerIndex + 1, providerChanges.length));
|
|
263
263
|
this.dropdownContainer.style.display = "inherit";
|
|
264
264
|
}
|
|
265
265
|
this.setTitle(this.title, detail);
|
|
@@ -318,7 +318,7 @@ let QuickDiffWidget = class QuickDiffWidget extends PeekViewWidget {
|
|
|
318
318
|
label: false,
|
|
319
319
|
icon: true
|
|
320
320
|
});
|
|
321
|
-
this._actionbarWidget.push(this._disposables.add(( new Action("peekview.close", ( localize(
|
|
321
|
+
this._actionbarWidget.push(this._disposables.add(( new Action("peekview.close", ( localize(11714, "Close")), ThemeIcon.asClassName(Codicon.close), true, () => this.dispose()))), {
|
|
322
322
|
label: false,
|
|
323
323
|
icon: true
|
|
324
324
|
});
|
|
@@ -700,7 +700,7 @@ class ShowPreviousChangeAction extends EditorAction {
|
|
|
700
700
|
constructor(outerEditor) {
|
|
701
701
|
super({
|
|
702
702
|
id: "editor.action.dirtydiff.previous",
|
|
703
|
-
label: ( localize2(
|
|
703
|
+
label: ( localize2(11715, "Show Previous Change")),
|
|
704
704
|
precondition: ( TextCompareEditorActiveContext.toNegated()),
|
|
705
705
|
kbOpts: {
|
|
706
706
|
kbExpr: EditorContextKeys.editorTextFocus,
|
|
@@ -730,7 +730,7 @@ class ShowNextChangeAction extends EditorAction {
|
|
|
730
730
|
constructor(outerEditor) {
|
|
731
731
|
super({
|
|
732
732
|
id: "editor.action.dirtydiff.next",
|
|
733
|
-
label: ( localize2(
|
|
733
|
+
label: ( localize2(11716, "Show Next Change")),
|
|
734
734
|
precondition: ( TextCompareEditorActiveContext.toNegated()),
|
|
735
735
|
kbOpts: {
|
|
736
736
|
kbExpr: EditorContextKeys.editorTextFocus,
|
|
@@ -760,7 +760,7 @@ class GotoPreviousChangeAction extends EditorAction {
|
|
|
760
760
|
constructor() {
|
|
761
761
|
super({
|
|
762
762
|
id: "workbench.action.editor.previousChange",
|
|
763
|
-
label: ( localize2(
|
|
763
|
+
label: ( localize2(11717, "Go to Previous Change")),
|
|
764
764
|
precondition: ( ContextKeyExpr.and(( TextCompareEditorActiveContext.toNegated()), ( quickDiffDecorationCount.notEqualsTo(0)))),
|
|
765
765
|
kbOpts: {
|
|
766
766
|
kbExpr: EditorContextKeys.editorTextFocus,
|
|
@@ -798,7 +798,7 @@ class GotoNextChangeAction extends EditorAction {
|
|
|
798
798
|
constructor() {
|
|
799
799
|
super({
|
|
800
800
|
id: "workbench.action.editor.nextChange",
|
|
801
|
-
label: ( localize2(
|
|
801
|
+
label: ( localize2(11718, "Go to Next Change")),
|
|
802
802
|
precondition: ( ContextKeyExpr.and(( TextCompareEditorActiveContext.toNegated()), ( quickDiffDecorationCount.notEqualsTo(0)))),
|
|
803
803
|
kbOpts: {
|
|
804
804
|
kbExpr: EditorContextKeys.editorTextFocus,
|
|
@@ -836,7 +836,7 @@ MenuRegistry.appendMenuItem(MenuId.MenubarGoMenu, {
|
|
|
836
836
|
group: "7_change_nav",
|
|
837
837
|
command: {
|
|
838
838
|
id: "editor.action.dirtydiff.next",
|
|
839
|
-
title: ( localize(
|
|
839
|
+
title: ( localize(11719, "Next &&Change"))
|
|
840
840
|
},
|
|
841
841
|
order: 1
|
|
842
842
|
});
|
|
@@ -844,7 +844,7 @@ MenuRegistry.appendMenuItem(MenuId.MenubarGoMenu, {
|
|
|
844
844
|
group: "7_change_nav",
|
|
845
845
|
command: {
|
|
846
846
|
id: "editor.action.dirtydiff.previous",
|
|
847
|
-
title: ( localize(
|
|
847
|
+
title: ( localize(11720, "Previous &&Change"))
|
|
848
848
|
},
|
|
849
849
|
order: 2
|
|
850
850
|
});
|
|
@@ -867,7 +867,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
867
867
|
}
|
|
868
868
|
});
|
|
869
869
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
870
|
-
id: "
|
|
870
|
+
id: "toggleQuickDiffWidgetFocus",
|
|
871
871
|
weight: KeybindingWeight.EditorContrib,
|
|
872
872
|
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyCode.F2),
|
|
873
873
|
when: isQuickDiffVisible,
|