@codingame/monaco-vscode-scm-service-override 19.1.3 → 20.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 +13 -15
- package/vscode/src/vs/workbench/contrib/scm/browser/activity.js +12 -8
- package/vscode/src/vs/workbench/contrib/scm/browser/media/scm.css +7 -10
- package/vscode/src/vs/workbench/contrib/scm/browser/menus.d.ts +7 -4
- package/vscode/src/vs/workbench/contrib/scm/browser/menus.js +57 -12
- package/vscode/src/vs/workbench/contrib/scm/browser/quickDiffDecorator.js +4 -4
- 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.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/scm/browser/quickDiffWidget.js +14 -14
- package/vscode/src/vs/workbench/contrib/scm/browser/scm.contribution.js +85 -90
- package/vscode/src/vs/workbench/contrib/scm/browser/scmAccessibilityHelp.js +23 -23
- package/vscode/src/vs/workbench/contrib/scm/browser/scmHistoryViewPane.js +101 -32
- package/vscode/src/vs/workbench/contrib/scm/browser/scmRepositoriesViewPane.d.ts +9 -3
- package/vscode/src/vs/workbench/contrib/scm/browser/scmRepositoriesViewPane.js +117 -55
- package/vscode/src/vs/workbench/contrib/scm/browser/scmRepositoryRenderer.d.ts +3 -8
- package/vscode/src/vs/workbench/contrib/scm/browser/scmRepositoryRenderer.js +34 -28
- package/vscode/src/vs/workbench/contrib/scm/browser/scmViewPane.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/scm/browser/scmViewPane.js +34 -31
- package/vscode/src/vs/workbench/contrib/scm/browser/scmViewService.js +5 -3
- package/vscode/src/vs/workbench/contrib/scm/browser/workingSet.js +1 -1
- package/vscode/src/vs/workbench/contrib/scm/browser/scmHistoryChatContext.d.ts +0 -9
- package/vscode/src/vs/workbench/contrib/scm/browser/scmHistoryChatContext.js +0 -185
|
@@ -16,18 +16,14 @@ import { IMenuService } from "@codingame/monaco-vscode-api/vscode/vs/platform/ac
|
|
|
16
16
|
import { IContextKeyService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service";
|
|
17
17
|
import { IKeybindingService } from "@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service";
|
|
18
18
|
import { ITelemetryService } from "@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service";
|
|
19
|
-
import {
|
|
20
|
-
import { IHoverService } from "@codingame/monaco-vscode-api/vscode/vs/platform/hover/browser/hover.service";
|
|
19
|
+
import { IconLabel } from "@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/iconLabel/iconLabel";
|
|
21
20
|
export declare class RepositoryActionRunner extends ActionRunner {
|
|
22
21
|
private readonly getSelectedRepositories;
|
|
23
22
|
constructor(getSelectedRepositories: () => ISCMRepository[]);
|
|
24
23
|
protected runAction(action: IAction, context: ISCMProvider): Promise<void>;
|
|
25
24
|
}
|
|
26
25
|
interface RepositoryTemplate {
|
|
27
|
-
readonly label:
|
|
28
|
-
readonly labelCustomHover: IManagedHover;
|
|
29
|
-
readonly name: HTMLElement;
|
|
30
|
-
readonly description: HTMLElement;
|
|
26
|
+
readonly label: IconLabel;
|
|
31
27
|
readonly countContainer: HTMLElement;
|
|
32
28
|
readonly count: CountBadge;
|
|
33
29
|
readonly toolBar: WorkbenchToolBar;
|
|
@@ -40,14 +36,13 @@ export declare class RepositoryRenderer implements ICompressibleTreeRenderer<ISC
|
|
|
40
36
|
private commandService;
|
|
41
37
|
private contextKeyService;
|
|
42
38
|
private contextMenuService;
|
|
43
|
-
private hoverService;
|
|
44
39
|
private keybindingService;
|
|
45
40
|
private menuService;
|
|
46
41
|
private scmViewService;
|
|
47
42
|
private telemetryService;
|
|
48
43
|
static readonly TEMPLATE_ID = "repository";
|
|
49
44
|
get templateId(): string;
|
|
50
|
-
constructor(toolbarMenuId: MenuId, actionViewItemProvider: IActionViewItemProvider, commandService: ICommandService, contextKeyService: IContextKeyService, contextMenuService: IContextMenuService,
|
|
45
|
+
constructor(toolbarMenuId: MenuId, actionViewItemProvider: IActionViewItemProvider, commandService: ICommandService, contextKeyService: IContextKeyService, contextMenuService: IContextMenuService, keybindingService: IKeybindingService, menuService: IMenuService, scmViewService: ISCMViewService, telemetryService: ITelemetryService);
|
|
51
46
|
renderTemplate(container: HTMLElement): RepositoryTemplate;
|
|
52
47
|
renderElement(arg: ISCMRepository | ITreeNode<ISCMRepository, FuzzyScore>, index: number, templateData: RepositoryTemplate): void;
|
|
53
48
|
renderCompressedElements(): void;
|
|
@@ -10,7 +10,7 @@ import { CountBadge } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/
|
|
|
10
10
|
import { IContextMenuService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextview/browser/contextView.service';
|
|
11
11
|
import { ICommandService } from '@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service';
|
|
12
12
|
import { ActionRunner } from '@codingame/monaco-vscode-api/vscode/vs/base/common/actions';
|
|
13
|
-
import { isSCMRepository, StatusBarAction, getRepositoryResourceCount, connectPrimaryMenu } from '@codingame/monaco-vscode-
|
|
13
|
+
import { isSCMRepository, StatusBarAction, getRepositoryResourceCount, connectPrimaryMenu } from '@codingame/monaco-vscode-d0569cfb-4706-5ad6-b0b0-5115ad8685db-common/vscode/vs/workbench/contrib/scm/browser/util';
|
|
14
14
|
import { defaultCountBadgeStyles } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/browser/defaultStyles';
|
|
15
15
|
import { WorkbenchToolBar } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/browser/toolbar';
|
|
16
16
|
import { MenuItemAction, MenuId } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
|
|
@@ -18,8 +18,8 @@ import { IMenuService } from '@codingame/monaco-vscode-api/vscode/vs/platform/ac
|
|
|
18
18
|
import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
19
19
|
import { IKeybindingService } from '@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service';
|
|
20
20
|
import { ITelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service';
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
21
|
+
import { IconLabel } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/iconLabel/iconLabel';
|
|
22
|
+
import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
|
|
23
23
|
import { autorunWithStore, autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
|
|
24
24
|
|
|
25
25
|
var RepositoryRenderer_1;
|
|
@@ -33,8 +33,11 @@ class RepositoryActionRunner extends ActionRunner {
|
|
|
33
33
|
if (!(action instanceof MenuItemAction)) {
|
|
34
34
|
return super.runAction(action, context);
|
|
35
35
|
}
|
|
36
|
+
const actionContext = [context];
|
|
36
37
|
const selection = ( this.getSelectedRepositories().map(r => r.provider));
|
|
37
|
-
|
|
38
|
+
if (( selection.some(s => s === context))) {
|
|
39
|
+
actionContext.push(...selection.filter(s => s !== context));
|
|
40
|
+
}
|
|
38
41
|
await action.run(...actionContext);
|
|
39
42
|
}
|
|
40
43
|
}
|
|
@@ -42,13 +45,12 @@ let RepositoryRenderer = class RepositoryRenderer {
|
|
|
42
45
|
static { RepositoryRenderer_1 = this; }
|
|
43
46
|
static { this.TEMPLATE_ID = 'repository'; }
|
|
44
47
|
get templateId() { return RepositoryRenderer_1.TEMPLATE_ID; }
|
|
45
|
-
constructor(toolbarMenuId, actionViewItemProvider, commandService, contextKeyService, contextMenuService,
|
|
48
|
+
constructor(toolbarMenuId, actionViewItemProvider, commandService, contextKeyService, contextMenuService, keybindingService, menuService, scmViewService, telemetryService) {
|
|
46
49
|
this.toolbarMenuId = toolbarMenuId;
|
|
47
50
|
this.actionViewItemProvider = actionViewItemProvider;
|
|
48
51
|
this.commandService = commandService;
|
|
49
52
|
this.contextKeyService = contextKeyService;
|
|
50
53
|
this.contextMenuService = contextMenuService;
|
|
51
|
-
this.hoverService = hoverService;
|
|
52
54
|
this.keybindingService = keybindingService;
|
|
53
55
|
this.menuService = menuService;
|
|
54
56
|
this.scmViewService = scmViewService;
|
|
@@ -59,10 +61,7 @@ let RepositoryRenderer = class RepositoryRenderer {
|
|
|
59
61
|
container.parentElement.parentElement.querySelector('.monaco-tl-twistie').classList.add('force-twistie');
|
|
60
62
|
}
|
|
61
63
|
const provider = append(container, $('.scm-provider'));
|
|
62
|
-
const label =
|
|
63
|
-
const labelCustomHover = this.hoverService.setupManagedHover(getDefaultHoverDelegate('mouse'), label, '', {});
|
|
64
|
-
const name = append(label, $('span.name'));
|
|
65
|
-
const description = append(label, $('span.description'));
|
|
64
|
+
const label = ( new IconLabel(provider, { supportIcons: true }));
|
|
66
65
|
const actions = append(provider, $('.actions'));
|
|
67
66
|
const toolBar = ( new WorkbenchToolBar(
|
|
68
67
|
actions,
|
|
@@ -77,19 +76,22 @@ let RepositoryRenderer = class RepositoryRenderer {
|
|
|
77
76
|
const countContainer = append(provider, $('.count'));
|
|
78
77
|
const count = ( new CountBadge(countContainer, {}, defaultCountBadgeStyles));
|
|
79
78
|
const visibilityDisposable = toolBar.onDidChangeDropdownVisibility(e => provider.classList.toggle('active', e));
|
|
80
|
-
const templateDisposable = combinedDisposable(
|
|
81
|
-
return { label,
|
|
79
|
+
const templateDisposable = combinedDisposable(label, visibilityDisposable, toolBar);
|
|
80
|
+
return { label, countContainer, count, toolBar, elementDisposables: ( new DisposableStore()), templateDisposable };
|
|
82
81
|
}
|
|
83
82
|
renderElement(arg, index, templateData) {
|
|
84
83
|
const repository = isSCMRepository(arg) ? arg : arg.element;
|
|
85
|
-
|
|
84
|
+
const icon = ThemeIcon.isThemeIcon(repository.provider.iconPath)
|
|
85
|
+
? repository.provider.iconPath.id
|
|
86
|
+
: undefined;
|
|
87
|
+
const label = icon
|
|
88
|
+
? `$(${icon}) ${repository.provider.name}`
|
|
89
|
+
: repository.provider.name;
|
|
86
90
|
if (repository.provider.rootUri) {
|
|
87
|
-
templateData.
|
|
88
|
-
templateData.description.textContent = repository.provider.label;
|
|
91
|
+
templateData.label.setLabel(label, repository.provider.label, { title: `${repository.provider.label}: ${repository.provider.rootUri.fsPath}` });
|
|
89
92
|
}
|
|
90
93
|
else {
|
|
91
|
-
templateData.
|
|
92
|
-
templateData.description.textContent = '';
|
|
94
|
+
templateData.label.setLabel(label, undefined, { title: repository.provider.label });
|
|
93
95
|
}
|
|
94
96
|
let statusPrimaryActions = [];
|
|
95
97
|
let menuPrimaryActions = [];
|
|
@@ -107,12 +109,17 @@ let RepositoryRenderer = class RepositoryRenderer {
|
|
|
107
109
|
templateData.countContainer.setAttribute('data-count', String(count));
|
|
108
110
|
templateData.count.setCount(count);
|
|
109
111
|
}));
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
112
|
+
templateData.elementDisposables.add(autorun(reader => {
|
|
113
|
+
repository.provider.contextValue.read(reader);
|
|
114
|
+
const repositoryMenus = this.scmViewService.menus.getRepositoryMenus(repository.provider);
|
|
115
|
+
const menu = this.toolbarMenuId === MenuId.SCMTitle
|
|
116
|
+
? repositoryMenus.titleMenu.menu
|
|
117
|
+
: repositoryMenus.getRepositoryMenu(repository);
|
|
118
|
+
reader.store.add(connectPrimaryMenu(menu, (primary, secondary) => {
|
|
119
|
+
menuPrimaryActions = primary;
|
|
120
|
+
menuSecondaryActions = secondary;
|
|
121
|
+
updateToolbar();
|
|
122
|
+
}));
|
|
116
123
|
}));
|
|
117
124
|
templateData.toolBar.context = repository.provider;
|
|
118
125
|
}
|
|
@@ -132,11 +139,10 @@ RepositoryRenderer = RepositoryRenderer_1 = ( __decorate([
|
|
|
132
139
|
( __param(2, ICommandService)),
|
|
133
140
|
( __param(3, IContextKeyService)),
|
|
134
141
|
( __param(4, IContextMenuService)),
|
|
135
|
-
( __param(5,
|
|
136
|
-
( __param(6,
|
|
137
|
-
( __param(7,
|
|
138
|
-
( __param(8,
|
|
139
|
-
( __param(9, ITelemetryService))
|
|
142
|
+
( __param(5, IKeybindingService)),
|
|
143
|
+
( __param(6, IMenuService)),
|
|
144
|
+
( __param(7, ISCMViewService)),
|
|
145
|
+
( __param(8, ITelemetryService))
|
|
140
146
|
], RepositoryRenderer));
|
|
141
147
|
|
|
142
148
|
export { RepositoryActionRunner, RepositoryRenderer };
|
|
@@ -15,7 +15,7 @@ import { IMenuService } from "@codingame/monaco-vscode-api/vscode/vs/platform/ac
|
|
|
15
15
|
import { IThemeService } from "@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/themeService.service";
|
|
16
16
|
import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
17
17
|
import { ITreeNode, ITreeSorter } from "@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/tree/tree";
|
|
18
|
-
import { IResourceNode } from "@codingame/monaco-vscode-
|
|
18
|
+
import { IResourceNode } from "@codingame/monaco-vscode-d0569cfb-4706-5ad6-b0b0-5115ad8685db-common/vscode/vs/base/common/resourceTree";
|
|
19
19
|
import { ICompressibleTreeRenderer, ICompressibleKeyboardNavigationLabelProvider } from "@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/tree/objectTree";
|
|
20
20
|
import { FuzzyScore } from "@codingame/monaco-vscode-api/vscode/vs/base/common/filters";
|
|
21
21
|
import { IViewDescriptorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/views.service";
|
|
@@ -10,7 +10,7 @@ import { append, $, Dimension, trackFocus, isPointerEvent, isActiveElement, clea
|
|
|
10
10
|
import { asCSSUrl } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/cssValue';
|
|
11
11
|
import { ViewMode, VIEW_PANE_ID, ISCMRepositorySortKey, InputValidationType, SCMInputChangeReason } from '@codingame/monaco-vscode-ff9fa663-eae3-5274-8573-c2b918871e4b-common/vscode/vs/workbench/contrib/scm/common/scm';
|
|
12
12
|
import { ISCMViewService, ISCMService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/scm/common/scm.service';
|
|
13
|
-
import { ResourceLabels } from '@codingame/monaco-vscode-
|
|
13
|
+
import { ResourceLabels } from '@codingame/monaco-vscode-d941ac7b-412f-57e3-b1bf-f6b0eb253b21-common/vscode/vs/workbench/browser/labels';
|
|
14
14
|
import { CountBadge } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/countBadge/countBadge';
|
|
15
15
|
import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
16
16
|
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
@@ -24,12 +24,12 @@ import { IMenuService } from '@codingame/monaco-vscode-api/vscode/vs/platform/ac
|
|
|
24
24
|
import { ActionRunner, Action, toAction, Separator } from '@codingame/monaco-vscode-api/vscode/vs/base/common/actions';
|
|
25
25
|
import { ActionBar } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/actionbar/actionbar';
|
|
26
26
|
import { IThemeService } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/themeService.service';
|
|
27
|
-
import { isSCMResource, connectPrimaryMenu, isSCMResourceGroup, isSCMInput, isSCMActionButton, isSCMRepository, isSCMResourceNode, getActionViewItemProvider, collectContextMenuActions, isSCMViewService } from '@codingame/monaco-vscode-
|
|
27
|
+
import { isSCMResource, connectPrimaryMenu, isSCMResourceGroup, isSCMInput, isSCMActionButton, isSCMRepository, isSCMResourceNode, getActionViewItemProvider, collectContextMenuActions, isSCMViewService } from '@codingame/monaco-vscode-d0569cfb-4706-5ad6-b0b0-5115ad8685db-common/vscode/vs/workbench/contrib/scm/browser/util';
|
|
28
28
|
import { WorkbenchCompressibleAsyncDataTree } from '@codingame/monaco-vscode-api/vscode/vs/platform/list/browser/listService';
|
|
29
29
|
import { ConfigurationTarget } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration';
|
|
30
30
|
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
31
31
|
import { disposableTimeout, ThrottledDelayer, Sequencer, Throttler } from '@codingame/monaco-vscode-api/vscode/vs/base/common/async';
|
|
32
|
-
import { ResourceTree } from '@codingame/monaco-vscode-
|
|
32
|
+
import { ResourceTree } from '@codingame/monaco-vscode-d0569cfb-4706-5ad6-b0b0-5115ad8685db-common/vscode/vs/base/common/resourceTree';
|
|
33
33
|
import { Iterable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/iterator';
|
|
34
34
|
import { FileKind } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files';
|
|
35
35
|
import { compareFileNames, comparePaths } from '@codingame/monaco-vscode-api/vscode/vs/base/common/comparers';
|
|
@@ -89,7 +89,7 @@ import { CancellationTokenSource } from '@codingame/monaco-vscode-api/vscode/vs/
|
|
|
89
89
|
import { DropdownWithPrimaryActionViewItem } from '@codingame/monaco-vscode-262ed59d-4f76-57cd-9e9f-1877f26ae049-common/vscode/vs/platform/actions/browser/dropdownWithPrimaryActionViewItem';
|
|
90
90
|
import { clamp, rot } from '@codingame/monaco-vscode-api/vscode/vs/base/common/numbers';
|
|
91
91
|
import { IHoverService } from '@codingame/monaco-vscode-api/vscode/vs/platform/hover/browser/hover.service';
|
|
92
|
-
import { OpenScmGroupAction } from '@codingame/monaco-vscode-
|
|
92
|
+
import { OpenScmGroupAction } from '@codingame/monaco-vscode-d0569cfb-4706-5ad6-b0b0-5115ad8685db-common/vscode/vs/workbench/contrib/multiDiffEditor/browser/scmMultiDiffSourceResolver';
|
|
93
93
|
import { ContentHoverController } from '@codingame/monaco-vscode-api/vscode/vs/editor/contrib/hover/browser/contentHoverController';
|
|
94
94
|
import { GlyphHoverController } from '@codingame/monaco-vscode-api/vscode/vs/editor/contrib/hover/browser/glyphHoverController';
|
|
95
95
|
import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
|
|
@@ -100,7 +100,7 @@ import { IAccessibilityService } from '@codingame/monaco-vscode-api/vscode/vs/pl
|
|
|
100
100
|
import { AccessibilityCommandId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/accessibility/common/accessibilityCommands';
|
|
101
101
|
import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatContextKeys';
|
|
102
102
|
import product from '@codingame/monaco-vscode-api/vscode/vs/platform/product/common/product';
|
|
103
|
-
import { CHAT_SETUP_ACTION_ID } from '@codingame/monaco-vscode-
|
|
103
|
+
import { CHAT_SETUP_ACTION_ID } from '@codingame/monaco-vscode-c2deffc4-ad68-5e63-8f95-9b89e0fc6898-common/vscode/vs/workbench/contrib/chat/browser/actions/chatActions';
|
|
104
104
|
import { runOnChange } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/utils/runOnChange';
|
|
105
105
|
import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
|
|
106
106
|
|
|
@@ -307,6 +307,7 @@ let InputRenderer = class InputRenderer {
|
|
|
307
307
|
template.elementDisposables.clear();
|
|
308
308
|
}
|
|
309
309
|
disposeTemplate(templateData) {
|
|
310
|
+
templateData.elementDisposables.dispose();
|
|
310
311
|
templateData.templateDisposable.dispose();
|
|
311
312
|
}
|
|
312
313
|
getHeight(input) {
|
|
@@ -759,7 +760,7 @@ let SCMAccessibilityProvider = class SCMAccessibilityProvider {
|
|
|
759
760
|
this.labelService = labelService;
|
|
760
761
|
}
|
|
761
762
|
getWidgetAriaLabel() {
|
|
762
|
-
return localize(
|
|
763
|
+
return localize(9886, "Source Control Management");
|
|
763
764
|
}
|
|
764
765
|
getAriaLabel(element) {
|
|
765
766
|
if (ResourceTree.isResourceNode(element)) {
|
|
@@ -771,17 +772,17 @@ let SCMAccessibilityProvider = class SCMAccessibilityProvider {
|
|
|
771
772
|
else if (isSCMInput(element)) {
|
|
772
773
|
const verbosity = this.configurationService.getValue(AccessibilityVerbositySettingId.SourceControl) === true;
|
|
773
774
|
if (!verbosity || !this.accessibilityService.isScreenReaderOptimized()) {
|
|
774
|
-
return localize(
|
|
775
|
+
return localize(9887, "Source Control Input");
|
|
775
776
|
}
|
|
776
777
|
const kbLabel = this.keybindingService.lookupKeybinding(AccessibilityCommandId.OpenAccessibilityHelp)?.getLabel();
|
|
777
778
|
return kbLabel
|
|
778
779
|
? ( localize(
|
|
779
|
-
|
|
780
|
+
9888,
|
|
780
781
|
"Source Control Input, Use {0} to open Source Control Accessibility Help.",
|
|
781
782
|
kbLabel
|
|
782
783
|
))
|
|
783
784
|
: ( localize(
|
|
784
|
-
|
|
785
|
+
9889,
|
|
785
786
|
"Source Control Input, Run the Open Accessibility Help command for more information."
|
|
786
787
|
));
|
|
787
788
|
}
|
|
@@ -839,14 +840,14 @@ const ContextKeys = {
|
|
|
839
840
|
}
|
|
840
841
|
};
|
|
841
842
|
MenuRegistry.appendMenuItem(MenuId.SCMTitle, {
|
|
842
|
-
title: ( localize(
|
|
843
|
+
title: ( localize(9890, "View & Sort")),
|
|
843
844
|
submenu: Menus.ViewSort,
|
|
844
845
|
when: ( ContextKeyExpr.and(( ContextKeyExpr.equals('view', VIEW_PANE_ID)), ( ContextKeys.RepositoryCount.notEqualsTo(0)))),
|
|
845
846
|
group: '0_view&sort',
|
|
846
847
|
order: 1
|
|
847
848
|
});
|
|
848
849
|
MenuRegistry.appendMenuItem(Menus.ViewSort, {
|
|
849
|
-
title: ( localize(
|
|
850
|
+
title: ( localize(9891, "Repositories")),
|
|
850
851
|
submenu: Menus.Repositories,
|
|
851
852
|
when: ContextKeyExpr.greater(ContextKeys.RepositoryCount.key, 1),
|
|
852
853
|
group: '0_repositories'
|
|
@@ -936,7 +937,7 @@ class SetListViewModeAction extends ViewAction {
|
|
|
936
937
|
constructor(id = 'workbench.scm.action.setListViewMode', menu = {}) {
|
|
937
938
|
super({
|
|
938
939
|
id,
|
|
939
|
-
title: ( localize(
|
|
940
|
+
title: ( localize(9892, "View as List")),
|
|
940
941
|
viewId: VIEW_PANE_ID,
|
|
941
942
|
f1: false,
|
|
942
943
|
icon: Codicon.listTree,
|
|
@@ -962,7 +963,7 @@ class SetTreeViewModeAction extends ViewAction {
|
|
|
962
963
|
constructor(id = 'workbench.scm.action.setTreeViewMode', menu = {}) {
|
|
963
964
|
super({
|
|
964
965
|
id,
|
|
965
|
-
title: ( localize(
|
|
966
|
+
title: ( localize(9893, "View as Tree")),
|
|
966
967
|
viewId: VIEW_PANE_ID,
|
|
967
968
|
f1: false,
|
|
968
969
|
icon: Codicon.listFlat,
|
|
@@ -1015,17 +1016,17 @@ class RepositorySortAction extends ViewAction {
|
|
|
1015
1016
|
}
|
|
1016
1017
|
class RepositorySortByDiscoveryTimeAction extends RepositorySortAction {
|
|
1017
1018
|
constructor() {
|
|
1018
|
-
super(ISCMRepositorySortKey.DiscoveryTime, ( localize(
|
|
1019
|
+
super(ISCMRepositorySortKey.DiscoveryTime, ( localize(9894, "Sort by Discovery Time")));
|
|
1019
1020
|
}
|
|
1020
1021
|
}
|
|
1021
1022
|
class RepositorySortByNameAction extends RepositorySortAction {
|
|
1022
1023
|
constructor() {
|
|
1023
|
-
super(ISCMRepositorySortKey.Name, ( localize(
|
|
1024
|
+
super(ISCMRepositorySortKey.Name, ( localize(9895, "Sort by Name")));
|
|
1024
1025
|
}
|
|
1025
1026
|
}
|
|
1026
1027
|
class RepositorySortByPathAction extends RepositorySortAction {
|
|
1027
1028
|
constructor() {
|
|
1028
|
-
super(ISCMRepositorySortKey.Path, ( localize(
|
|
1029
|
+
super(ISCMRepositorySortKey.Path, ( localize(9896, "Sort by Path")));
|
|
1029
1030
|
}
|
|
1030
1031
|
}
|
|
1031
1032
|
registerAction2(RepositorySortByDiscoveryTimeAction);
|
|
@@ -1050,17 +1051,17 @@ class SetSortKeyAction extends ViewAction {
|
|
|
1050
1051
|
}
|
|
1051
1052
|
class SetSortByNameAction extends SetSortKeyAction {
|
|
1052
1053
|
constructor() {
|
|
1053
|
-
super(ViewSortKey.Name, ( localize(
|
|
1054
|
+
super(ViewSortKey.Name, ( localize(9897, "Sort Changes by Name")));
|
|
1054
1055
|
}
|
|
1055
1056
|
}
|
|
1056
1057
|
class SetSortByPathAction extends SetSortKeyAction {
|
|
1057
1058
|
constructor() {
|
|
1058
|
-
super(ViewSortKey.Path, ( localize(
|
|
1059
|
+
super(ViewSortKey.Path, ( localize(9898, "Sort Changes by Path")));
|
|
1059
1060
|
}
|
|
1060
1061
|
}
|
|
1061
1062
|
class SetSortByStatusAction extends SetSortKeyAction {
|
|
1062
1063
|
constructor() {
|
|
1063
|
-
super(ViewSortKey.Status, ( localize(
|
|
1064
|
+
super(ViewSortKey.Status, ( localize(9899, "Sort Changes by Status")));
|
|
1064
1065
|
}
|
|
1065
1066
|
}
|
|
1066
1067
|
registerAction2(SetSortByNameAction);
|
|
@@ -1070,7 +1071,7 @@ class CollapseAllRepositoriesAction extends ViewAction {
|
|
|
1070
1071
|
constructor() {
|
|
1071
1072
|
super({
|
|
1072
1073
|
id: `workbench.scm.action.collapseAllRepositories`,
|
|
1073
|
-
title: ( localize(
|
|
1074
|
+
title: ( localize(9900, "Collapse All Repositories")),
|
|
1074
1075
|
viewId: VIEW_PANE_ID,
|
|
1075
1076
|
f1: false,
|
|
1076
1077
|
icon: Codicon.collapseAll,
|
|
@@ -1089,7 +1090,7 @@ class ExpandAllRepositoriesAction extends ViewAction {
|
|
|
1089
1090
|
constructor() {
|
|
1090
1091
|
super({
|
|
1091
1092
|
id: `workbench.scm.action.expandAllRepositories`,
|
|
1092
|
-
title: ( localize(
|
|
1093
|
+
title: ( localize(9901, "Expand All Repositories")),
|
|
1093
1094
|
viewId: VIEW_PANE_ID,
|
|
1094
1095
|
f1: false,
|
|
1095
1096
|
icon: Codicon.expandAll,
|
|
@@ -1119,7 +1120,7 @@ registerAction2(class extends Action2 {
|
|
|
1119
1120
|
constructor() {
|
|
1120
1121
|
super({
|
|
1121
1122
|
id: SCMInputWidgetCommandId.SetupAction,
|
|
1122
|
-
title: ( localize(
|
|
1123
|
+
title: ( localize(9902, "Generate commit message")),
|
|
1123
1124
|
icon: Codicon.sparkle,
|
|
1124
1125
|
f1: false,
|
|
1125
1126
|
menu: {
|
|
@@ -1196,17 +1197,17 @@ let SCMInputWidgetToolbar = class SCMInputWidgetToolbar extends WorkbenchToolBar
|
|
|
1196
1197
|
this._onDidChange = ( new Emitter());
|
|
1197
1198
|
this.onDidChange = this._onDidChange.event;
|
|
1198
1199
|
this._disposables = this._register(( new MutableDisposable()));
|
|
1199
|
-
this._dropdownAction = ( new Action('scmInputMoreActions', ( localize(
|
|
1200
|
+
this._dropdownAction = ( new Action('scmInputMoreActions', ( localize(9903, "More Actions...")), 'codicon-chevron-down'));
|
|
1200
1201
|
this._cancelAction = ( new MenuItemAction({
|
|
1201
1202
|
id: SCMInputWidgetCommandId.CancelAction,
|
|
1202
|
-
title: ( localize(
|
|
1203
|
+
title: ( localize(9904, "Cancel")),
|
|
1203
1204
|
icon: Codicon.stopCircle,
|
|
1204
1205
|
}, undefined, undefined, undefined, undefined, contextKeyService, commandService));
|
|
1205
1206
|
}
|
|
1206
1207
|
setInput(input) {
|
|
1207
1208
|
this._disposables.value = ( new DisposableStore());
|
|
1208
1209
|
const contextKeyService = this.contextKeyService.createOverlay([
|
|
1209
|
-
['scmProvider', input.repository.provider.
|
|
1210
|
+
['scmProvider', input.repository.provider.providerId],
|
|
1210
1211
|
['scmProviderRootUri', input.repository.provider.rootUri?.toString()],
|
|
1211
1212
|
['scmProviderHasRootUri', !!input.repository.provider.rootUri]
|
|
1212
1213
|
]);
|
|
@@ -1279,6 +1280,7 @@ class SCMInputWidgetEditorOptions {
|
|
|
1279
1280
|
e.affectsConfiguration('editor.fontFamily') ||
|
|
1280
1281
|
e.affectsConfiguration('editor.rulers') ||
|
|
1281
1282
|
e.affectsConfiguration('editor.wordWrap') ||
|
|
1283
|
+
e.affectsConfiguration('editor.wordSegmenterLocales') ||
|
|
1282
1284
|
e.affectsConfiguration('scm.inputFontFamily') ||
|
|
1283
1285
|
e.affectsConfiguration('scm.inputFontSize');
|
|
1284
1286
|
}, this._disposables);
|
|
@@ -1308,12 +1310,13 @@ class SCMInputWidgetEditorOptions {
|
|
|
1308
1310
|
const fontFamily = this._getEditorFontFamily();
|
|
1309
1311
|
const fontSize = this._getEditorFontSize();
|
|
1310
1312
|
const lineHeight = this._getEditorLineHeight(fontSize);
|
|
1313
|
+
const wordSegmenterLocales = this.configurationService.getValue('editor.wordSegmenterLocales');
|
|
1311
1314
|
const accessibilitySupport = this.configurationService.getValue('editor.accessibilitySupport');
|
|
1312
1315
|
const cursorBlinking = this.configurationService.getValue('editor.cursorBlinking');
|
|
1313
1316
|
const cursorStyle = this.configurationService.getValue('editor.cursorStyle');
|
|
1314
1317
|
const cursorWidth = this.configurationService.getValue('editor.cursorWidth') ?? 1;
|
|
1315
1318
|
const emptySelectionClipboard = this.configurationService.getValue('editor.emptySelectionClipboard') === true;
|
|
1316
|
-
return { ...this._getEditorLanguageConfiguration(), accessibilitySupport, cursorBlinking, cursorStyle, cursorWidth, fontFamily, fontSize, lineHeight, emptySelectionClipboard };
|
|
1319
|
+
return { ...this._getEditorLanguageConfiguration(), accessibilitySupport, cursorBlinking, cursorStyle, cursorWidth, fontFamily, fontSize, lineHeight, emptySelectionClipboard, wordSegmenterLocales };
|
|
1317
1320
|
}
|
|
1318
1321
|
_getEditorFontFamily() {
|
|
1319
1322
|
const inputFontFamily = this.configurationService.getValue('scm.inputFontFamily').trim();
|
|
@@ -1413,13 +1416,13 @@ let SCMInputWidget = class SCMInputWidget {
|
|
|
1413
1416
|
const kbLabel = this.keybindingService.lookupKeybinding(AccessibilityCommandId.OpenAccessibilityHelp)?.getLabel();
|
|
1414
1417
|
return kbLabel
|
|
1415
1418
|
? ( localize(
|
|
1416
|
-
|
|
1419
|
+
9905,
|
|
1417
1420
|
"{0}, Use {1} to open Source Control Accessibility Help.",
|
|
1418
1421
|
placeholder,
|
|
1419
1422
|
kbLabel
|
|
1420
1423
|
))
|
|
1421
1424
|
: ( localize(
|
|
1422
|
-
|
|
1425
|
+
9906,
|
|
1423
1426
|
"{0}, Run the Open Accessibility Help command for more information.",
|
|
1424
1427
|
placeholder
|
|
1425
1428
|
));
|
|
@@ -1679,7 +1682,7 @@ let SCMInputWidget = class SCMInputWidget {
|
|
|
1679
1682
|
}
|
|
1680
1683
|
const actionsContainer = append(validationContainer, $('.scm-editor-validation-actions'));
|
|
1681
1684
|
const actionbar = ( new ActionBar(actionsContainer));
|
|
1682
|
-
const action = ( new Action('scmInputWidget.validationMessage.close', ( localize(
|
|
1685
|
+
const action = ( new Action('scmInputWidget.validationMessage.close', ( localize(9907, "Close")), ThemeIcon.asClassName(Codicon.close), true, () => {
|
|
1683
1686
|
this.contextViewService.hideContextView();
|
|
1684
1687
|
this.element.style.borderBottomLeftRadius = '2px';
|
|
1685
1688
|
this.element.style.borderBottomRightRadius = '2px';
|
|
@@ -2094,7 +2097,7 @@ let SCMViewPane = class SCMViewPane extends ViewPane {
|
|
|
2094
2097
|
disposables.add(actionRunner);
|
|
2095
2098
|
if (isSCMRepository(element)) {
|
|
2096
2099
|
const menus = this.scmViewService.menus.getRepositoryMenus(element.provider);
|
|
2097
|
-
const menu = menus.
|
|
2100
|
+
const menu = menus.getRepositoryContextMenu(element);
|
|
2098
2101
|
context = element.provider;
|
|
2099
2102
|
actionRunner = ( new RepositoryActionRunner(() => this.getSelectedRepositories()));
|
|
2100
2103
|
disposables.add(actionRunner);
|
|
@@ -2215,7 +2218,7 @@ let SCMViewPane = class SCMViewPane extends ViewPane {
|
|
|
2215
2218
|
const alwaysShowRepositories = this.configurationService.getValue('scm.alwaysShowRepositories');
|
|
2216
2219
|
if (!alwaysShowRepositories && this.items.size === 1) {
|
|
2217
2220
|
const provider = Iterable.first(( this.items.keys())).provider;
|
|
2218
|
-
this.scmProviderContextKey.set(provider.
|
|
2221
|
+
this.scmProviderContextKey.set(provider.providerId);
|
|
2219
2222
|
this.scmProviderRootUriContextKey.set(provider.rootUri?.toString());
|
|
2220
2223
|
this.scmProviderHasRootUriContextKey.set(!!provider.rootUri);
|
|
2221
2224
|
}
|
|
@@ -32,7 +32,7 @@ import { observableValue } from '@codingame/monaco-vscode-api/vscode/vs/base/com
|
|
|
32
32
|
import { derivedOpts } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/derived';
|
|
33
33
|
|
|
34
34
|
function getProviderStorageKey(provider) {
|
|
35
|
-
return `${provider.
|
|
35
|
+
return `${provider.providerId}:${provider.label}${provider.rootUri ? `:${( provider.rootUri.toString())}` : ''}`;
|
|
36
36
|
}
|
|
37
37
|
function getRepositoryName(workspaceContextService, repository) {
|
|
38
38
|
if (!repository.provider.rootUri) {
|
|
@@ -51,7 +51,7 @@ let RepositoryPicker = class RepositoryPicker {
|
|
|
51
51
|
this._quickInputService = _quickInputService;
|
|
52
52
|
this._scmViewService = _scmViewService;
|
|
53
53
|
this._autoQuickPickItem = {
|
|
54
|
-
label: ( localize(
|
|
54
|
+
label: ( localize(9908, "Auto")),
|
|
55
55
|
description: this._autoQuickItemDescription,
|
|
56
56
|
repository: 'auto'
|
|
57
57
|
};
|
|
@@ -64,7 +64,9 @@ let RepositoryPicker = class RepositoryPicker {
|
|
|
64
64
|
picks.push(...( this._scmViewService.repositories.map(r => ({
|
|
65
65
|
label: r.provider.name,
|
|
66
66
|
description: r.provider.rootUri?.fsPath,
|
|
67
|
-
iconClass: ThemeIcon.
|
|
67
|
+
iconClass: ThemeIcon.isThemeIcon(r.provider.iconPath)
|
|
68
|
+
? ThemeIcon.asClassName(r.provider.iconPath)
|
|
69
|
+
: ThemeIcon.asClassName(Codicon.repo),
|
|
68
70
|
repository: r
|
|
69
71
|
}))));
|
|
70
72
|
return this._quickInputService.pick(picks, { placeHolder: this._placeHolder });
|
|
@@ -6,7 +6,7 @@ import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/pl
|
|
|
6
6
|
import { observableConfigValue } from '@codingame/monaco-vscode-api/vscode/vs/platform/observable/common/platformObservableUtils';
|
|
7
7
|
import { StorageScope, StorageTarget } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage';
|
|
8
8
|
import { IStorageService } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service';
|
|
9
|
-
import { getProviderKey } from '@codingame/monaco-vscode-
|
|
9
|
+
import { getProviderKey } from '@codingame/monaco-vscode-d0569cfb-4706-5ad6-b0b0-5115ad8685db-common/vscode/vs/workbench/contrib/scm/browser/util';
|
|
10
10
|
import { ISCMService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/scm/common/scm.service';
|
|
11
11
|
import { IEditorGroupsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorGroupsService.service';
|
|
12
12
|
import { Parts } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/layout/browser/layoutService';
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
|
-
import { ITextModelService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/resolverService.service";
|
|
3
|
-
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
4
|
-
import { IWorkbenchContribution } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/contributions";
|
|
5
|
-
import { IChatContextPickService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatContextPickService.service";
|
|
6
|
-
export declare class SCMHistoryItemContextContribution extends Disposable implements IWorkbenchContribution {
|
|
7
|
-
static readonly ID = "workbench.contrib.chat.scmHistoryItemContextContribution";
|
|
8
|
-
constructor(contextPickService: IChatContextPickService, instantiationService: IInstantiationService, textModelResolverService: ITextModelService);
|
|
9
|
-
}
|