@codingame/monaco-vscode-quickaccess-service-override 4.5.2 → 5.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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-quickaccess-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "CodinGame",
|
|
@@ -26,6 +26,6 @@
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"vscode": "npm:@codingame/monaco-vscode-api@
|
|
29
|
+
"vscode": "npm:@codingame/monaco-vscode-api@5.0.0"
|
|
30
30
|
}
|
|
31
31
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { stripIcons } from 'vscode/vscode/vs/base/common/iconLabels';
|
|
2
|
+
import { isLocalizedString } from 'vscode/vscode/vs/platform/action/common/action';
|
|
2
3
|
import { AbstractCommandsQuickAccessProvider } from '../../../../platform/quickinput/browser/commandsQuickAccess.js';
|
|
3
4
|
|
|
4
5
|
class AbstractEditorCommandsQuickAccessProvider extends AbstractCommandsQuickAccessProvider {
|
|
@@ -12,9 +13,19 @@ class AbstractEditorCommandsQuickAccessProvider extends AbstractCommandsQuickAcc
|
|
|
12
13
|
}
|
|
13
14
|
const editorCommandPicks = [];
|
|
14
15
|
for (const editorAction of activeTextEditorControl.getSupportedActions()) {
|
|
16
|
+
let commandDescription;
|
|
17
|
+
if (editorAction.metadata?.description) {
|
|
18
|
+
if (isLocalizedString(editorAction.metadata.description)) {
|
|
19
|
+
commandDescription = editorAction.metadata.description;
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
commandDescription = { original: editorAction.metadata.description, value: editorAction.metadata.description };
|
|
23
|
+
}
|
|
24
|
+
}
|
|
15
25
|
editorCommandPicks.push({
|
|
16
26
|
commandId: editorAction.id,
|
|
17
27
|
commandAlias: editorAction.alias,
|
|
28
|
+
commandDescription,
|
|
18
29
|
label: stripIcons(editorAction.label) || editorAction.id,
|
|
19
30
|
});
|
|
20
31
|
}
|
|
@@ -31,6 +31,7 @@ import { IAiRelatedInformationService } from 'vscode/vscode/vs/workbench/service
|
|
|
31
31
|
import { IEditorGroupsService } from 'vscode/vscode/vs/workbench/services/editor/common/editorGroupsService.service';
|
|
32
32
|
import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
33
33
|
import { IExtensionService } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions.service';
|
|
34
|
+
import { createKeybindingCommandQuery } from 'vscode/vscode/vs/workbench/services/preferences/browser/keybindingsEditorModel';
|
|
34
35
|
import { IPreferencesService } from 'vscode/vscode/vs/workbench/services/preferences/common/preferences.service';
|
|
35
36
|
|
|
36
37
|
var CommandsQuickAccessProvider_1;
|
|
@@ -103,7 +104,7 @@ let CommandsQuickAccessProvider = class CommandsQuickAccessProvider extends Abst
|
|
|
103
104
|
tooltip: ( localizeWithPath(_moduleId, 1, "Configure Keybinding")),
|
|
104
105
|
}],
|
|
105
106
|
trigger: () => {
|
|
106
|
-
this.preferencesService.openGlobalKeybindingSettings(false, { query:
|
|
107
|
+
this.preferencesService.openGlobalKeybindingSettings(false, { query: createKeybindingCommandQuery(picks.commandId, picks.commandWhen) });
|
|
107
108
|
return TriggerAction.CLOSE_PICKER;
|
|
108
109
|
},
|
|
109
110
|
})))
|
|
@@ -185,6 +186,7 @@ let CommandsQuickAccessProvider = class CommandsQuickAccessProvider extends Abst
|
|
|
185
186
|
: { value: metadataDescription, original: metadataDescription };
|
|
186
187
|
globalCommandPicks.push({
|
|
187
188
|
commandId: action.item.id,
|
|
189
|
+
commandWhen: action.item.precondition?.serialize(),
|
|
188
190
|
commandAlias,
|
|
189
191
|
label: stripIcons(label),
|
|
190
192
|
commandDescription,
|