@codingame/monaco-vscode-quickaccess-service-override 11.1.2 → 12.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.d.ts +8 -1
- package/index.js +117 -1
- package/package.json +22 -7
- package/vscode/src/vs/editor/contrib/quickAccess/browser/commandsQuickAccess.d.ts +12 -0
- package/vscode/src/vs/editor/contrib/quickAccess/browser/commandsQuickAccess.js +1 -0
- package/vscode/src/vs/platform/quickinput/browser/commandsQuickAccess.d.ts +67 -0
- package/vscode/src/vs/platform/quickinput/browser/commandsQuickAccess.js +37 -36
- package/vscode/src/vs/platform/quickinput/browser/helpQuickAccess.d.ts +21 -0
- package/vscode/src/vs/platform/quickinput/browser/helpQuickAccess.js +19 -20
- package/vscode/src/vs/workbench/browser/actions/quickAccessActions.d.ts +1 -0
- package/vscode/src/vs/workbench/browser/actions/quickAccessActions.js +33 -31
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/quickaccess/gotoLineQuickAccess.d.ts +22 -0
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/quickaccess/gotoLineQuickAccess.js +17 -14
- package/vscode/src/vs/workbench/contrib/quickaccess/browser/commandsQuickAccess.d.ts +55 -0
- package/vscode/src/vs/workbench/contrib/quickaccess/browser/commandsQuickAccess.js +53 -52
- package/vscode/src/vs/workbench/contrib/quickaccess/browser/quickAccess.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/quickaccess/browser/quickAccess.contribution.js +24 -25
- package/vscode/src/vs/workbench/contrib/quickaccess/browser/viewQuickAccess.d.ts +50 -0
- package/vscode/src/vs/workbench/contrib/quickaccess/browser/viewQuickAccess.js +35 -31
- package/vscode/src/vs/workbench/contrib/url/browser/externalUriResolver.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/url/browser/externalUriResolver.js +2 -1
- package/vscode/src/vs/workbench/contrib/url/browser/trustedDomainsFileSystemProvider.d.ts +29 -0
- package/vscode/src/vs/workbench/contrib/url/browser/trustedDomainsFileSystemProvider.js +9 -7
- package/vscode/src/vs/workbench/contrib/url/browser/trustedDomainsValidator.d.ts +31 -0
- package/vscode/src/vs/workbench/contrib/url/browser/trustedDomainsValidator.js +26 -25
- package/vscode/src/vs/workbench/contrib/url/browser/url.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/url/browser/url.contribution.js +18 -13
- package/vscode/src/vs/workbench/services/quickinput/browser/quickInputService.d.ts +15 -0
- package/vscode/src/vs/workbench/services/quickinput/browser/quickInputService.js +4 -2
- package/quickaccess.js +0 -115
|
@@ -1,23 +1,25 @@
|
|
|
1
|
+
|
|
1
2
|
import { localize2, localize } from 'vscode/vscode/vs/nls';
|
|
2
3
|
import { registerAction2, Action2, MenuId } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
3
|
-
import {
|
|
4
|
+
import { KeyMod, KeyCode } from 'vscode/vscode/vs/base/common/keyCodes';
|
|
5
|
+
import { KeybindingsRegistry, KeybindingWeight } from 'vscode/vscode/vs/platform/keybinding/common/keybindingsRegistry';
|
|
4
6
|
import { ItemActivation } from 'vscode/vscode/vs/platform/quickinput/common/quickInput';
|
|
5
7
|
import { IQuickInputService } from 'vscode/vscode/vs/platform/quickinput/common/quickInput.service';
|
|
6
8
|
import { IKeybindingService } from 'vscode/vscode/vs/platform/keybinding/common/keybinding.service';
|
|
7
9
|
import { CommandsRegistry } from 'vscode/vscode/vs/platform/commands/common/commands';
|
|
8
|
-
import { inQuickPickContext, getQuickNavigateHandler, defaultQuickAccessContext } from 'vscode/vscode/vs/workbench/browser/quickaccess';
|
|
10
|
+
import { inQuickPickContext, getQuickNavigateHandler, defaultQuickAccessContext } from '@codingame/monaco-vscode-56402b83-4a60-5b15-86f9-71fe99c32744-common/vscode/vs/workbench/browser/quickaccess';
|
|
9
11
|
import { Codicon } from 'vscode/vscode/vs/base/common/codicons';
|
|
10
12
|
|
|
11
13
|
const globalQuickAccessKeybinding = {
|
|
12
|
-
primary:
|
|
13
|
-
secondary: [
|
|
14
|
-
mac: { primary:
|
|
14
|
+
primary: KeyMod.CtrlCmd | KeyCode.KeyP,
|
|
15
|
+
secondary: [KeyMod.CtrlCmd | KeyCode.KeyE],
|
|
16
|
+
mac: { primary: KeyMod.CtrlCmd | KeyCode.KeyP, secondary: undefined }
|
|
15
17
|
};
|
|
16
18
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
17
19
|
id: 'workbench.action.closeQuickOpen',
|
|
18
|
-
weight:
|
|
20
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
19
21
|
when: inQuickPickContext,
|
|
20
|
-
primary:
|
|
22
|
+
primary: KeyCode.Escape, secondary: [KeyMod.Shift | KeyCode.Escape],
|
|
21
23
|
handler: accessor => {
|
|
22
24
|
const quickInputService = accessor.get(IQuickInputService);
|
|
23
25
|
return quickInputService.cancel();
|
|
@@ -25,7 +27,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
25
27
|
});
|
|
26
28
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
27
29
|
id: 'workbench.action.acceptSelectedQuickOpenItem',
|
|
28
|
-
weight:
|
|
30
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
29
31
|
when: inQuickPickContext,
|
|
30
32
|
primary: 0,
|
|
31
33
|
handler: accessor => {
|
|
@@ -35,7 +37,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
35
37
|
});
|
|
36
38
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
37
39
|
id: 'workbench.action.alternativeAcceptSelectedQuickOpenItem',
|
|
38
|
-
weight:
|
|
40
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
39
41
|
when: inQuickPickContext,
|
|
40
42
|
primary: 0,
|
|
41
43
|
handler: accessor => {
|
|
@@ -45,7 +47,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
45
47
|
});
|
|
46
48
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
47
49
|
id: 'workbench.action.focusQuickOpen',
|
|
48
|
-
weight:
|
|
50
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
49
51
|
when: inQuickPickContext,
|
|
50
52
|
primary: 0,
|
|
51
53
|
handler: accessor => {
|
|
@@ -56,7 +58,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
56
58
|
const quickAccessNavigateNextInFilePickerId = 'workbench.action.quickOpenNavigateNextInFilePicker';
|
|
57
59
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
58
60
|
id: quickAccessNavigateNextInFilePickerId,
|
|
59
|
-
weight:
|
|
61
|
+
weight: KeybindingWeight.WorkbenchContrib + 50,
|
|
60
62
|
handler: getQuickNavigateHandler(quickAccessNavigateNextInFilePickerId, true),
|
|
61
63
|
when: defaultQuickAccessContext,
|
|
62
64
|
primary: globalQuickAccessKeybinding.primary,
|
|
@@ -66,19 +68,19 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
66
68
|
const quickAccessNavigatePreviousInFilePickerId = 'workbench.action.quickOpenNavigatePreviousInFilePicker';
|
|
67
69
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
68
70
|
id: quickAccessNavigatePreviousInFilePickerId,
|
|
69
|
-
weight:
|
|
71
|
+
weight: KeybindingWeight.WorkbenchContrib + 50,
|
|
70
72
|
handler: getQuickNavigateHandler(quickAccessNavigatePreviousInFilePickerId, false),
|
|
71
73
|
when: defaultQuickAccessContext,
|
|
72
|
-
primary: globalQuickAccessKeybinding.primary |
|
|
73
|
-
secondary: [globalQuickAccessKeybinding.secondary[0] |
|
|
74
|
+
primary: globalQuickAccessKeybinding.primary | KeyMod.Shift,
|
|
75
|
+
secondary: [globalQuickAccessKeybinding.secondary[0] | KeyMod.Shift],
|
|
74
76
|
mac: {
|
|
75
|
-
primary: globalQuickAccessKeybinding.mac.primary |
|
|
77
|
+
primary: globalQuickAccessKeybinding.mac.primary | KeyMod.Shift,
|
|
76
78
|
secondary: undefined
|
|
77
79
|
}
|
|
78
80
|
});
|
|
79
81
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
80
82
|
id: 'workbench.action.quickPickManyToggle',
|
|
81
|
-
weight:
|
|
83
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
82
84
|
when: inQuickPickContext,
|
|
83
85
|
primary: 0,
|
|
84
86
|
handler: accessor => {
|
|
@@ -88,12 +90,12 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
88
90
|
});
|
|
89
91
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
90
92
|
id: 'workbench.action.quickInputBack',
|
|
91
|
-
weight:
|
|
93
|
+
weight: KeybindingWeight.WorkbenchContrib + 50,
|
|
92
94
|
when: inQuickPickContext,
|
|
93
95
|
primary: 0,
|
|
94
|
-
win: { primary:
|
|
95
|
-
mac: { primary:
|
|
96
|
-
linux: { primary:
|
|
96
|
+
win: { primary: KeyMod.Alt | KeyCode.LeftArrow },
|
|
97
|
+
mac: { primary: KeyMod.WinCtrl | KeyCode.Minus },
|
|
98
|
+
linux: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.Minus },
|
|
97
99
|
handler: accessor => {
|
|
98
100
|
const quickInputService = accessor.get(IQuickInputService);
|
|
99
101
|
quickInputService.back();
|
|
@@ -103,7 +105,7 @@ registerAction2(class QuickAccessAction extends Action2 {
|
|
|
103
105
|
constructor() {
|
|
104
106
|
super({
|
|
105
107
|
id: 'workbench.action.quickOpen',
|
|
106
|
-
title: ( localize2(
|
|
108
|
+
title: ( localize2(2611, "Go to File...")),
|
|
107
109
|
metadata: {
|
|
108
110
|
description: `Quick access`,
|
|
109
111
|
args: [{
|
|
@@ -114,7 +116,7 @@ registerAction2(class QuickAccessAction extends Action2 {
|
|
|
114
116
|
}]
|
|
115
117
|
},
|
|
116
118
|
keybinding: {
|
|
117
|
-
weight:
|
|
119
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
118
120
|
primary: globalQuickAccessKeybinding.primary,
|
|
119
121
|
secondary: globalQuickAccessKeybinding.secondary,
|
|
120
122
|
mac: globalQuickAccessKeybinding.mac
|
|
@@ -131,7 +133,7 @@ registerAction2(class QuickAccessAction extends Action2 {
|
|
|
131
133
|
constructor() {
|
|
132
134
|
super({
|
|
133
135
|
id: 'workbench.action.quickOpenWithModes',
|
|
134
|
-
title: ( localize(
|
|
136
|
+
title: ( localize(2612, "Quick Open")),
|
|
135
137
|
icon: Codicon.search,
|
|
136
138
|
menu: {
|
|
137
139
|
id: MenuId.CommandCenterCenter,
|
|
@@ -172,31 +174,31 @@ class BaseQuickAccessNavigateAction extends Action2 {
|
|
|
172
174
|
}
|
|
173
175
|
class QuickAccessNavigateNextAction extends BaseQuickAccessNavigateAction {
|
|
174
176
|
constructor() {
|
|
175
|
-
super('workbench.action.quickOpenNavigateNext', ( localize2(
|
|
177
|
+
super('workbench.action.quickOpenNavigateNext', ( localize2(2613, 'Navigate Next in Quick Open')), true, true);
|
|
176
178
|
}
|
|
177
179
|
}
|
|
178
180
|
class QuickAccessNavigatePreviousAction extends BaseQuickAccessNavigateAction {
|
|
179
181
|
constructor() {
|
|
180
|
-
super('workbench.action.quickOpenNavigatePrevious', ( localize2(
|
|
182
|
+
super('workbench.action.quickOpenNavigatePrevious', ( localize2(2614, 'Navigate Previous in Quick Open')), false, true);
|
|
181
183
|
}
|
|
182
184
|
}
|
|
183
185
|
class QuickAccessSelectNextAction extends BaseQuickAccessNavigateAction {
|
|
184
186
|
constructor() {
|
|
185
|
-
super('workbench.action.quickOpenSelectNext', ( localize2(
|
|
186
|
-
weight:
|
|
187
|
+
super('workbench.action.quickOpenSelectNext', ( localize2(2615, 'Select Next in Quick Open')), true, false, {
|
|
188
|
+
weight: KeybindingWeight.WorkbenchContrib + 50,
|
|
187
189
|
when: inQuickPickContext,
|
|
188
190
|
primary: 0,
|
|
189
|
-
mac: { primary:
|
|
191
|
+
mac: { primary: KeyMod.WinCtrl | KeyCode.KeyN }
|
|
190
192
|
});
|
|
191
193
|
}
|
|
192
194
|
}
|
|
193
195
|
class QuickAccessSelectPreviousAction extends BaseQuickAccessNavigateAction {
|
|
194
196
|
constructor() {
|
|
195
|
-
super('workbench.action.quickOpenSelectPrevious', ( localize2(
|
|
196
|
-
weight:
|
|
197
|
+
super('workbench.action.quickOpenSelectPrevious', ( localize2(2616, 'Select Previous in Quick Open')), false, false, {
|
|
198
|
+
weight: KeybindingWeight.WorkbenchContrib + 50,
|
|
197
199
|
when: inQuickPickContext,
|
|
198
200
|
primary: 0,
|
|
199
|
-
mac: { primary:
|
|
201
|
+
mac: { primary: KeyMod.WinCtrl | KeyCode.KeyP }
|
|
200
202
|
});
|
|
201
203
|
}
|
|
202
204
|
}
|
package/vscode/src/vs/workbench/contrib/codeEditor/browser/quickaccess/gotoLineQuickAccess.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { IKeyMods } from "vscode/vscode/vs/platform/quickinput/common/quickInput";
|
|
2
|
+
import { IEditorService } from "vscode/vscode/vs/workbench/services/editor/common/editorService.service";
|
|
3
|
+
import { IRange } from "vscode/vscode/vs/editor/common/core/range";
|
|
4
|
+
import { AbstractGotoLineQuickAccessProvider } from "@codingame/monaco-vscode-4ead9d5f-54da-5c5a-b093-32be4a84d711-common/vscode/vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess";
|
|
5
|
+
import { IConfigurationService } from "vscode/vscode/vs/platform/configuration/common/configuration.service";
|
|
6
|
+
import { IQuickAccessTextEditorContext } from "@codingame/monaco-vscode-ea14e352-8f1c-5569-b79a-8a96a53e8abe-common/vscode/vs/editor/contrib/quickAccess/browser/editorNavigationQuickAccess";
|
|
7
|
+
import { IEditorGroupsService } from "vscode/vscode/vs/workbench/services/editor/common/editorGroupsService.service";
|
|
8
|
+
export declare class GotoLineQuickAccessProvider extends AbstractGotoLineQuickAccessProvider {
|
|
9
|
+
private readonly editorService;
|
|
10
|
+
private readonly editorGroupService;
|
|
11
|
+
private readonly configurationService;
|
|
12
|
+
protected readonly onDidActiveTextEditorControlChange: import("vscode/vscode/vs/base/common/event").Event<void>;
|
|
13
|
+
constructor(editorService: IEditorService, editorGroupService: IEditorGroupsService, configurationService: IConfigurationService);
|
|
14
|
+
private get configuration();
|
|
15
|
+
protected get activeTextEditorControl(): import("vscode/vscode/vs/editor/common/editorCommon").IEditor | import("vscode/vscode/vs/editor/common/editorCommon").IDiffEditor | undefined;
|
|
16
|
+
protected gotoLocation(context: IQuickAccessTextEditorContext, options: {
|
|
17
|
+
range: IRange;
|
|
18
|
+
keyMods: IKeyMods;
|
|
19
|
+
forceSideBySide?: boolean;
|
|
20
|
+
preserveFocus?: boolean;
|
|
21
|
+
}): void;
|
|
22
|
+
}
|
package/vscode/src/vs/workbench/contrib/codeEditor/browser/quickaccess/gotoLineQuickAccess.js
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6';
|
|
2
3
|
import { localize2, localize } from 'vscode/vscode/vs/nls';
|
|
3
4
|
import { IQuickInputService } from 'vscode/vscode/vs/platform/quickinput/common/quickInput.service';
|
|
4
5
|
import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
5
|
-
import { AbstractGotoLineQuickAccessProvider } from 'vscode/vscode/vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess';
|
|
6
|
+
import { AbstractGotoLineQuickAccessProvider } from '@codingame/monaco-vscode-4ead9d5f-54da-5c5a-b093-32be4a84d711-common/vscode/vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess';
|
|
6
7
|
import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
|
|
7
8
|
import { Extensions } from 'vscode/vscode/vs/platform/quickinput/common/quickAccess';
|
|
8
9
|
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
|
|
9
10
|
import { Action2, registerAction2 } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
11
|
+
import { KeyMod, KeyCode } from 'vscode/vscode/vs/base/common/keyCodes';
|
|
12
|
+
import { KeybindingWeight } from 'vscode/vscode/vs/platform/keybinding/common/keybindingsRegistry';
|
|
10
13
|
import { IEditorGroupsService } from 'vscode/vscode/vs/workbench/services/editor/common/editorGroupsService.service';
|
|
11
14
|
|
|
12
15
|
let GotoLineQuickAccessProvider = class GotoLineQuickAccessProvider extends AbstractGotoLineQuickAccessProvider {
|
|
@@ -41,23 +44,23 @@ let GotoLineQuickAccessProvider = class GotoLineQuickAccessProvider extends Abst
|
|
|
41
44
|
}
|
|
42
45
|
}
|
|
43
46
|
};
|
|
44
|
-
GotoLineQuickAccessProvider = (
|
|
45
|
-
(
|
|
46
|
-
(
|
|
47
|
-
(
|
|
48
|
-
], GotoLineQuickAccessProvider))
|
|
47
|
+
GotoLineQuickAccessProvider = ( __decorate([
|
|
48
|
+
( __param(0, IEditorService)),
|
|
49
|
+
( __param(1, IEditorGroupsService)),
|
|
50
|
+
( __param(2, IConfigurationService))
|
|
51
|
+
], GotoLineQuickAccessProvider));
|
|
49
52
|
class GotoLineAction extends Action2 {
|
|
50
53
|
static { this.ID = 'workbench.action.gotoLine'; }
|
|
51
54
|
constructor() {
|
|
52
55
|
super({
|
|
53
56
|
id: GotoLineAction.ID,
|
|
54
|
-
title: ( localize2(
|
|
57
|
+
title: ( localize2(4696, 'Go to Line/Column...')),
|
|
55
58
|
f1: true,
|
|
56
59
|
keybinding: {
|
|
57
|
-
weight:
|
|
60
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
58
61
|
when: null,
|
|
59
|
-
primary:
|
|
60
|
-
mac: { primary:
|
|
62
|
+
primary: KeyMod.CtrlCmd | KeyCode.KeyG,
|
|
63
|
+
mac: { primary: KeyMod.WinCtrl | KeyCode.KeyG }
|
|
61
64
|
}
|
|
62
65
|
});
|
|
63
66
|
}
|
|
@@ -66,14 +69,14 @@ class GotoLineAction extends Action2 {
|
|
|
66
69
|
}
|
|
67
70
|
}
|
|
68
71
|
registerAction2(GotoLineAction);
|
|
69
|
-
(
|
|
72
|
+
( Registry.as(Extensions.Quickaccess)).registerQuickAccessProvider({
|
|
70
73
|
ctor: GotoLineQuickAccessProvider,
|
|
71
74
|
prefix: AbstractGotoLineQuickAccessProvider.PREFIX,
|
|
72
75
|
placeholder: ( localize(
|
|
73
|
-
|
|
76
|
+
4697,
|
|
74
77
|
"Type the line number and optional column to go to (e.g. 42:5 for line 42 and column 5)."
|
|
75
78
|
)),
|
|
76
|
-
helpEntries: [{ description: ( localize(
|
|
79
|
+
helpEntries: [{ description: ( localize(4698, "Go to Line/Column")), commandId: GotoLineAction.ID }]
|
|
77
80
|
});
|
|
78
81
|
|
|
79
82
|
export { GotoLineQuickAccessProvider };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { CancellationToken } from "vscode/vscode/vs/base/common/cancellation";
|
|
2
|
+
import { IEditor } from "vscode/vscode/vs/editor/common/editorCommon";
|
|
3
|
+
import { AbstractEditorCommandsQuickAccessProvider } from "../../../../editor/contrib/quickAccess/browser/commandsQuickAccess.js";
|
|
4
|
+
import { Action2 } from "vscode/vscode/vs/platform/actions/common/actions";
|
|
5
|
+
import { IMenuService } from "vscode/vscode/vs/platform/actions/common/actions.service";
|
|
6
|
+
import { ICommandService } from "vscode/vscode/vs/platform/commands/common/commands.service";
|
|
7
|
+
import { IConfigurationService } from "vscode/vscode/vs/platform/configuration/common/configuration.service";
|
|
8
|
+
import { IDialogService } from "vscode/vscode/vs/platform/dialogs/common/dialogs.service";
|
|
9
|
+
import { IInstantiationService, ServicesAccessor } from "vscode/vscode/vs/platform/instantiation/common/instantiation";
|
|
10
|
+
import { IKeybindingService } from "vscode/vscode/vs/platform/keybinding/common/keybinding.service";
|
|
11
|
+
import { IProductService } from "vscode/vscode/vs/platform/product/common/productService.service";
|
|
12
|
+
import { ICommandQuickPick } from "../../../../platform/quickinput/browser/commandsQuickAccess.js";
|
|
13
|
+
import { DefaultQuickAccessFilterValue } from "vscode/vscode/vs/platform/quickinput/common/quickAccess";
|
|
14
|
+
import { IQuickPickSeparator } from "vscode/vscode/vs/platform/quickinput/common/quickInput";
|
|
15
|
+
import { ITelemetryService } from "vscode/vscode/vs/platform/telemetry/common/telemetry.service";
|
|
16
|
+
import { IChatAgentService } from "vscode/vscode/vs/workbench/contrib/chat/common/chatAgents.service";
|
|
17
|
+
import { IAiRelatedInformationService } from "vscode/vscode/vs/workbench/services/aiRelatedInformation/common/aiRelatedInformation.service";
|
|
18
|
+
import { IEditorGroupsService } from "vscode/vscode/vs/workbench/services/editor/common/editorGroupsService.service";
|
|
19
|
+
import { IEditorService } from "vscode/vscode/vs/workbench/services/editor/common/editorService.service";
|
|
20
|
+
import { IExtensionService } from "vscode/vscode/vs/workbench/services/extensions/common/extensions.service";
|
|
21
|
+
import { IPreferencesService } from "vscode/vscode/vs/workbench/services/preferences/common/preferences.service";
|
|
22
|
+
export declare class CommandsQuickAccessProvider extends AbstractEditorCommandsQuickAccessProvider {
|
|
23
|
+
private readonly editorService;
|
|
24
|
+
private readonly menuService;
|
|
25
|
+
private readonly extensionService;
|
|
26
|
+
private readonly configurationService;
|
|
27
|
+
private readonly editorGroupService;
|
|
28
|
+
private readonly preferencesService;
|
|
29
|
+
private readonly productService;
|
|
30
|
+
private readonly aiRelatedInformationService;
|
|
31
|
+
private readonly chatAgentService;
|
|
32
|
+
private static AI_RELATED_INFORMATION_MAX_PICKS;
|
|
33
|
+
private static AI_RELATED_INFORMATION_DEBOUNCE;
|
|
34
|
+
private readonly extensionRegistrationRace;
|
|
35
|
+
private useAiRelatedInfo;
|
|
36
|
+
protected get activeTextEditorControl(): IEditor | undefined;
|
|
37
|
+
get defaultFilterValue(): DefaultQuickAccessFilterValue | undefined;
|
|
38
|
+
constructor(editorService: IEditorService, menuService: IMenuService, extensionService: IExtensionService, instantiationService: IInstantiationService, keybindingService: IKeybindingService, commandService: ICommandService, telemetryService: ITelemetryService, dialogService: IDialogService, configurationService: IConfigurationService, editorGroupService: IEditorGroupsService, preferencesService: IPreferencesService, productService: IProductService, aiRelatedInformationService: IAiRelatedInformationService, chatAgentService: IChatAgentService);
|
|
39
|
+
private get configuration();
|
|
40
|
+
private updateOptions;
|
|
41
|
+
protected getCommandPicks(token: CancellationToken): Promise<Array<ICommandQuickPick>>;
|
|
42
|
+
protected hasAdditionalCommandPicks(filter: string, token: CancellationToken): boolean;
|
|
43
|
+
protected getAdditionalCommandPicks(allPicks: ICommandQuickPick[], picksSoFar: ICommandQuickPick[], filter: string, token: CancellationToken): Promise<Array<ICommandQuickPick | IQuickPickSeparator>>;
|
|
44
|
+
private getRelatedInformationPicks;
|
|
45
|
+
private getGlobalCommandPicks;
|
|
46
|
+
}
|
|
47
|
+
export declare class ShowAllCommandsAction extends Action2 {
|
|
48
|
+
static readonly ID = "workbench.action.showCommands";
|
|
49
|
+
constructor();
|
|
50
|
+
run(accessor: ServicesAccessor): Promise<void>;
|
|
51
|
+
}
|
|
52
|
+
export declare class ClearCommandHistoryAction extends Action2 {
|
|
53
|
+
constructor();
|
|
54
|
+
run(accessor: ServicesAccessor): Promise<void>;
|
|
55
|
+
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6';
|
|
2
3
|
import { isFirefox } from 'vscode/vscode/vs/base/browser/browser';
|
|
3
4
|
import { raceTimeout, timeout } from 'vscode/vscode/vs/base/common/async';
|
|
4
5
|
import { Codicon } from 'vscode/vscode/vs/base/common/codicons';
|
|
5
6
|
import { stripIcons } from 'vscode/vscode/vs/base/common/iconLabels';
|
|
7
|
+
import { KeyMod, KeyCode } from 'vscode/vscode/vs/base/common/keyCodes';
|
|
6
8
|
import { Language } from 'vscode/vscode/vs/base/common/platform';
|
|
7
9
|
import { ThemeIcon } from 'vscode/vscode/vs/base/common/themables';
|
|
8
10
|
import { AbstractEditorCommandsQuickAccessProvider } from '../../../../editor/contrib/quickAccess/browser/commandsQuickAccess.js';
|
|
@@ -15,22 +17,23 @@ import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/c
|
|
|
15
17
|
import { IDialogService } from 'vscode/vscode/vs/platform/dialogs/common/dialogs.service';
|
|
16
18
|
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
17
19
|
import { IKeybindingService } from 'vscode/vscode/vs/platform/keybinding/common/keybinding.service';
|
|
20
|
+
import { KeybindingWeight } from 'vscode/vscode/vs/platform/keybinding/common/keybindingsRegistry';
|
|
18
21
|
import { IProductService } from 'vscode/vscode/vs/platform/product/common/productService.service';
|
|
19
22
|
import { CommandsHistory } from '../../../../platform/quickinput/browser/commandsQuickAccess.js';
|
|
20
|
-
import { TriggerAction } from 'vscode/vscode/vs/platform/quickinput/browser/pickerQuickAccess';
|
|
23
|
+
import { TriggerAction } from '@codingame/monaco-vscode-219d9a5f-b446-507b-a188-1178a0867c75-common/vscode/vs/platform/quickinput/browser/pickerQuickAccess';
|
|
21
24
|
import { DefaultQuickAccessFilterValue } from 'vscode/vscode/vs/platform/quickinput/common/quickAccess';
|
|
22
25
|
import { IQuickInputService } from 'vscode/vscode/vs/platform/quickinput/common/quickInput.service';
|
|
23
26
|
import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
|
|
24
27
|
import { ITelemetryService } from 'vscode/vscode/vs/platform/telemetry/common/telemetry.service';
|
|
25
|
-
import { ASK_QUICK_QUESTION_ACTION_ID, CHAT_OPEN_ACTION_ID } from 'vscode/vscode/vs/workbench/contrib/chat/browser/actions/chatConstants';
|
|
28
|
+
import { ASK_QUICK_QUESTION_ACTION_ID, CHAT_OPEN_ACTION_ID } from '@codingame/monaco-vscode-ea14e352-8f1c-5569-b79a-8a96a53e8abe-common/vscode/vs/workbench/contrib/chat/browser/actions/chatConstants';
|
|
26
29
|
import { ChatAgentLocation } from 'vscode/vscode/vs/workbench/contrib/chat/common/chatAgents';
|
|
27
30
|
import { IChatAgentService } from 'vscode/vscode/vs/workbench/contrib/chat/common/chatAgents.service';
|
|
28
|
-
import { RelatedInformationType } from 'vscode/vscode/vs/workbench/services/aiRelatedInformation/common/aiRelatedInformation';
|
|
31
|
+
import { RelatedInformationType } from '@codingame/monaco-vscode-fc985c90-0334-5b62-88bc-73e2efa0b80b-common/vscode/vs/workbench/services/aiRelatedInformation/common/aiRelatedInformation';
|
|
29
32
|
import { IAiRelatedInformationService } from 'vscode/vscode/vs/workbench/services/aiRelatedInformation/common/aiRelatedInformation.service';
|
|
30
33
|
import { IEditorGroupsService } from 'vscode/vscode/vs/workbench/services/editor/common/editorGroupsService.service';
|
|
31
34
|
import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
32
35
|
import { IExtensionService } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions.service';
|
|
33
|
-
import { createKeybindingCommandQuery } from 'vscode/vscode/vs/workbench/services/preferences/browser/keybindingsEditorModel';
|
|
36
|
+
import { createKeybindingCommandQuery } from '@codingame/monaco-vscode-d609a7d3-bf87-551a-884f-550a8b327ec5-common/vscode/vs/workbench/services/preferences/browser/keybindingsEditorModel';
|
|
34
37
|
import { IPreferencesService } from 'vscode/vscode/vs/workbench/services/preferences/common/preferences.service';
|
|
35
38
|
|
|
36
39
|
var CommandsQuickAccessProvider_1;
|
|
@@ -49,7 +52,7 @@ let CommandsQuickAccessProvider = class CommandsQuickAccessProvider extends Abst
|
|
|
49
52
|
super({
|
|
50
53
|
showAlias: !Language.isDefaultVariant(),
|
|
51
54
|
noResultsPick: () => ({
|
|
52
|
-
label: ( localize(
|
|
55
|
+
label: ( localize(8188, "No matching commands")),
|
|
53
56
|
commandId: ''
|
|
54
57
|
}),
|
|
55
58
|
}, instantiationService, keybindingService, commandService, telemetryService, dialogService);
|
|
@@ -80,7 +83,7 @@ let CommandsQuickAccessProvider = class CommandsQuickAccessProvider extends Abst
|
|
|
80
83
|
}
|
|
81
84
|
const config = this.configuration;
|
|
82
85
|
const suggestedCommandIds = config.experimental.suggestCommands && this.productService.commandPaletteSuggestedCommandIds?.length
|
|
83
|
-
? (
|
|
86
|
+
? ( new Set(this.productService.commandPaletteSuggestedCommandIds))
|
|
84
87
|
: undefined;
|
|
85
88
|
this.options.suggestedCommandIds = suggestedCommandIds;
|
|
86
89
|
this.useAiRelatedInfo = config.experimental.enableNaturalLanguageSearch;
|
|
@@ -90,22 +93,20 @@ let CommandsQuickAccessProvider = class CommandsQuickAccessProvider extends Abst
|
|
|
90
93
|
if (token.isCancellationRequested) {
|
|
91
94
|
return [];
|
|
92
95
|
}
|
|
93
|
-
return (
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
})))
|
|
108
|
-
);
|
|
96
|
+
return ([
|
|
97
|
+
...this.getCodeEditorCommandPicks(),
|
|
98
|
+
...this.getGlobalCommandPicks()
|
|
99
|
+
].map(picks => ({
|
|
100
|
+
...picks,
|
|
101
|
+
buttons: [{
|
|
102
|
+
iconClass: ThemeIcon.asClassName(Codicon.gear),
|
|
103
|
+
tooltip: ( localize(8189, "Configure Keybinding")),
|
|
104
|
+
}],
|
|
105
|
+
trigger: () => {
|
|
106
|
+
this.preferencesService.openGlobalKeybindingSettings(false, { query: createKeybindingCommandQuery(picks.commandId, picks.commandWhen) });
|
|
107
|
+
return TriggerAction.CLOSE_PICKER;
|
|
108
|
+
},
|
|
109
|
+
})));
|
|
109
110
|
}
|
|
110
111
|
hasAdditionalCommandPicks(filter, token) {
|
|
111
112
|
if (!this.useAiRelatedInfo
|
|
@@ -136,7 +137,7 @@ let CommandsQuickAccessProvider = class CommandsQuickAccessProvider extends Abst
|
|
|
136
137
|
const defaultAgent = this.chatAgentService.getDefaultAgent(ChatAgentLocation.Panel);
|
|
137
138
|
if (defaultAgent) {
|
|
138
139
|
additionalPicks.push({
|
|
139
|
-
label: ( localize(
|
|
140
|
+
label: ( localize(8190, "Ask {0}: {1}", defaultAgent.fullName, filter)),
|
|
140
141
|
commandId: this.configuration.experimental.askChatLocation === 'quickChat' ? ASK_QUICK_QUESTION_ACTION_ID : CHAT_OPEN_ACTION_ID,
|
|
141
142
|
args: [filter]
|
|
142
143
|
});
|
|
@@ -146,13 +147,13 @@ let CommandsQuickAccessProvider = class CommandsQuickAccessProvider extends Abst
|
|
|
146
147
|
async getRelatedInformationPicks(allPicks, picksSoFar, filter, token) {
|
|
147
148
|
const relatedInformation = await this.aiRelatedInformationService.getRelatedInformation(filter, [RelatedInformationType.CommandInformation], token);
|
|
148
149
|
relatedInformation.sort((a, b) => b.weight - a.weight);
|
|
149
|
-
const setOfPicksSoFar = (
|
|
150
|
-
const additionalPicks = (
|
|
150
|
+
const setOfPicksSoFar = ( new Set(( picksSoFar.map(p => p.commandId))));
|
|
151
|
+
const additionalPicks = ( new Array());
|
|
151
152
|
for (const info of relatedInformation) {
|
|
152
153
|
if (additionalPicks.length === CommandsQuickAccessProvider_1.AI_RELATED_INFORMATION_MAX_PICKS) {
|
|
153
154
|
break;
|
|
154
155
|
}
|
|
155
|
-
const pick = allPicks.find(p => p.commandId === info.command && !(
|
|
156
|
+
const pick = allPicks.find(p => p.commandId === info.command && !( setOfPicksSoFar.has(p.commandId)));
|
|
156
157
|
if (pick) {
|
|
157
158
|
additionalPicks.push(pick);
|
|
158
159
|
}
|
|
@@ -170,7 +171,7 @@ let CommandsQuickAccessProvider = class CommandsQuickAccessProvider extends Abst
|
|
|
170
171
|
let label = (typeof action.item.title === 'string' ? action.item.title : action.item.title.value) || action.item.id;
|
|
171
172
|
const category = typeof action.item.category === 'string' ? action.item.category : action.item.category?.value;
|
|
172
173
|
if (category) {
|
|
173
|
-
label = ( localize(
|
|
174
|
+
label = ( localize(8191, "{0}: {1}", category, label));
|
|
174
175
|
}
|
|
175
176
|
const aliasLabel = typeof action.item.title !== 'string' ? action.item.title.original : undefined;
|
|
176
177
|
const aliasCategory = (category && action.item.category && typeof action.item.category !== 'string') ? action.item.category.original : undefined;
|
|
@@ -192,33 +193,33 @@ let CommandsQuickAccessProvider = class CommandsQuickAccessProvider extends Abst
|
|
|
192
193
|
return globalCommandPicks;
|
|
193
194
|
}
|
|
194
195
|
};
|
|
195
|
-
CommandsQuickAccessProvider = CommandsQuickAccessProvider_1 = (
|
|
196
|
-
(
|
|
197
|
-
(
|
|
198
|
-
(
|
|
199
|
-
(
|
|
200
|
-
(
|
|
201
|
-
(
|
|
202
|
-
(
|
|
203
|
-
(
|
|
204
|
-
(
|
|
205
|
-
(
|
|
206
|
-
(
|
|
207
|
-
(
|
|
208
|
-
(
|
|
209
|
-
(
|
|
210
|
-
], CommandsQuickAccessProvider))
|
|
196
|
+
CommandsQuickAccessProvider = CommandsQuickAccessProvider_1 = ( __decorate([
|
|
197
|
+
( __param(0, IEditorService)),
|
|
198
|
+
( __param(1, IMenuService)),
|
|
199
|
+
( __param(2, IExtensionService)),
|
|
200
|
+
( __param(3, IInstantiationService)),
|
|
201
|
+
( __param(4, IKeybindingService)),
|
|
202
|
+
( __param(5, ICommandService)),
|
|
203
|
+
( __param(6, ITelemetryService)),
|
|
204
|
+
( __param(7, IDialogService)),
|
|
205
|
+
( __param(8, IConfigurationService)),
|
|
206
|
+
( __param(9, IEditorGroupsService)),
|
|
207
|
+
( __param(10, IPreferencesService)),
|
|
208
|
+
( __param(11, IProductService)),
|
|
209
|
+
( __param(12, IAiRelatedInformationService)),
|
|
210
|
+
( __param(13, IChatAgentService))
|
|
211
|
+
], CommandsQuickAccessProvider));
|
|
211
212
|
class ShowAllCommandsAction extends Action2 {
|
|
212
213
|
static { this.ID = 'workbench.action.showCommands'; }
|
|
213
214
|
constructor() {
|
|
214
215
|
super({
|
|
215
216
|
id: ShowAllCommandsAction.ID,
|
|
216
|
-
title: ( localize2(
|
|
217
|
+
title: ( localize2(8192, 'Show All Commands')),
|
|
217
218
|
keybinding: {
|
|
218
|
-
weight:
|
|
219
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
219
220
|
when: undefined,
|
|
220
|
-
primary: !isFirefox ? (
|
|
221
|
-
secondary: [
|
|
221
|
+
primary: !isFirefox ? (KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyP) : undefined,
|
|
222
|
+
secondary: [KeyCode.F1]
|
|
222
223
|
},
|
|
223
224
|
f1: true
|
|
224
225
|
});
|
|
@@ -231,7 +232,7 @@ class ClearCommandHistoryAction extends Action2 {
|
|
|
231
232
|
constructor() {
|
|
232
233
|
super({
|
|
233
234
|
id: 'workbench.action.clearCommandHistory',
|
|
234
|
-
title: ( localize2(
|
|
235
|
+
title: ( localize2(8193, 'Clear Command History')),
|
|
235
236
|
f1: true
|
|
236
237
|
});
|
|
237
238
|
}
|
|
@@ -243,9 +244,9 @@ class ClearCommandHistoryAction extends Action2 {
|
|
|
243
244
|
if (commandHistoryLength > 0) {
|
|
244
245
|
const { confirmed } = await dialogService.confirm({
|
|
245
246
|
type: 'warning',
|
|
246
|
-
message: ( localize(
|
|
247
|
-
detail: ( localize(
|
|
248
|
-
primaryButton: ( localize(
|
|
247
|
+
message: ( localize(8194, "Do you want to clear the history of recently used commands?")),
|
|
248
|
+
detail: ( localize(8195, "This action is irreversible!")),
|
|
249
|
+
primaryButton: ( localize(8196, "&&Clear"))
|
|
249
250
|
});
|
|
250
251
|
if (!confirmed) {
|
|
251
252
|
return;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|