@codingame/monaco-vscode-quickaccess-service-override 25.1.2 → 26.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 +2 -2
- package/vscode/src/vs/platform/quickinput/browser/commandsQuickAccess.js +121 -73
- package/vscode/src/vs/platform/quickinput/browser/helpQuickAccess.d.ts +3 -1
- package/vscode/src/vs/platform/quickinput/browser/helpQuickAccess.js +24 -17
- package/vscode/src/vs/workbench/browser/actions/quickAccessActions.js +63 -35
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/quickaccess/gotoLineQuickAccess.js +22 -15
- package/vscode/src/vs/workbench/contrib/quickaccess/browser/commandsQuickAccess.js +82 -77
- package/vscode/src/vs/workbench/contrib/quickaccess/browser/quickAccess.contribution.js +34 -27
- package/vscode/src/vs/workbench/contrib/quickaccess/browser/viewQuickAccess.js +63 -38
- package/vscode/src/vs/workbench/contrib/url/browser/externalUriResolver.js +6 -8
- package/vscode/src/vs/workbench/contrib/url/browser/trustedDomainsFileSystemProvider.js +27 -23
- package/vscode/src/vs/workbench/contrib/url/browser/trustedDomainsValidator.js +67 -56
- package/vscode/src/vs/workbench/contrib/url/browser/url.contribution.js +30 -12
- package/vscode/src/vs/workbench/services/quickinput/browser/quickInputService.js +18 -12
|
@@ -22,11 +22,13 @@ import { StorageScope, StorageTarget } from '@codingame/monaco-vscode-api/vscode
|
|
|
22
22
|
import { IStorageService } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service';
|
|
23
23
|
|
|
24
24
|
class OpenUrlAction extends Action2 {
|
|
25
|
-
static {
|
|
25
|
+
static {
|
|
26
|
+
this.STORAGE_KEY = "workbench.action.url.openUrl.lastInput";
|
|
27
|
+
}
|
|
26
28
|
constructor() {
|
|
27
29
|
super({
|
|
28
|
-
id:
|
|
29
|
-
title: ( localize2(
|
|
30
|
+
id: "workbench.action.url.openUrl",
|
|
31
|
+
title: ( localize2(13282, "Open URL")),
|
|
30
32
|
category: Categories.Developer,
|
|
31
33
|
f1: true
|
|
32
34
|
});
|
|
@@ -35,12 +37,22 @@ class OpenUrlAction extends Action2 {
|
|
|
35
37
|
const quickInputService = accessor.get(IQuickInputService);
|
|
36
38
|
const urlService = accessor.get(IURLService);
|
|
37
39
|
const storageService = accessor.get(IStorageService);
|
|
38
|
-
const value = storageService.get(OpenUrlAction.STORAGE_KEY, StorageScope.WORKSPACE,
|
|
39
|
-
return quickInputService.input({
|
|
40
|
+
const value = storageService.get(OpenUrlAction.STORAGE_KEY, StorageScope.WORKSPACE, "");
|
|
41
|
+
return quickInputService.input({
|
|
42
|
+
prompt: ( localize(13283, "URL to open")),
|
|
43
|
+
value
|
|
44
|
+
}).then(input => {
|
|
40
45
|
if (input) {
|
|
41
46
|
const uri = ( URI.parse(input));
|
|
42
|
-
urlService.open(uri, {
|
|
43
|
-
|
|
47
|
+
urlService.open(uri, {
|
|
48
|
+
originalUrl: input
|
|
49
|
+
});
|
|
50
|
+
storageService.store(
|
|
51
|
+
OpenUrlAction.STORAGE_KEY,
|
|
52
|
+
input,
|
|
53
|
+
StorageScope.WORKSPACE,
|
|
54
|
+
StorageTarget.MACHINE
|
|
55
|
+
);
|
|
44
56
|
}
|
|
45
57
|
});
|
|
46
58
|
}
|
|
@@ -54,20 +66,26 @@ MenuRegistry.appendMenuItem(MenuId.CommandPalette, {
|
|
|
54
66
|
}
|
|
55
67
|
});
|
|
56
68
|
( Registry.as(Extensions.Workbench)).registerWorkbenchContribution(OpenerValidatorContributions, LifecyclePhase.Restored);
|
|
57
|
-
registerWorkbenchContribution2(
|
|
69
|
+
registerWorkbenchContribution2(
|
|
70
|
+
TrustedDomainsFileSystemProvider.ID,
|
|
71
|
+
TrustedDomainsFileSystemProvider,
|
|
72
|
+
WorkbenchPhase.BlockRestore
|
|
58
73
|
);
|
|
59
|
-
registerWorkbenchContribution2(
|
|
74
|
+
registerWorkbenchContribution2(
|
|
75
|
+
ExternalUriResolverContribution.ID,
|
|
76
|
+
ExternalUriResolverContribution,
|
|
77
|
+
WorkbenchPhase.BlockRestore
|
|
60
78
|
);
|
|
61
79
|
const configurationRegistry = ( Registry.as(Extensions$1.Configuration));
|
|
62
80
|
configurationRegistry.registerConfiguration({
|
|
63
81
|
...workbenchConfigurationNodeBase,
|
|
64
82
|
properties: {
|
|
65
|
-
|
|
83
|
+
"workbench.trustedDomains.promptInTrustedWorkspace": {
|
|
66
84
|
scope: ConfigurationScope.APPLICATION,
|
|
67
|
-
type:
|
|
85
|
+
type: "boolean",
|
|
68
86
|
default: false,
|
|
69
87
|
description: ( localize(
|
|
70
|
-
|
|
88
|
+
13284,
|
|
71
89
|
"When enabled, trusted domain prompts will appear when opening links in trusted workspaces."
|
|
72
90
|
))
|
|
73
91
|
}
|
|
@@ -11,8 +11,21 @@ import '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/ext
|
|
|
11
11
|
import { InQuickPickContextKey } from '@codingame/monaco-vscode-api/vscode/vs/workbench/browser/quickaccess';
|
|
12
12
|
|
|
13
13
|
let QuickInputService = class QuickInputService extends QuickInputService$1 {
|
|
14
|
-
constructor(
|
|
15
|
-
|
|
14
|
+
constructor(
|
|
15
|
+
configurationService,
|
|
16
|
+
instantiationService,
|
|
17
|
+
keybindingService,
|
|
18
|
+
contextKeyService,
|
|
19
|
+
themeService,
|
|
20
|
+
layoutService
|
|
21
|
+
) {
|
|
22
|
+
super(
|
|
23
|
+
instantiationService,
|
|
24
|
+
contextKeyService,
|
|
25
|
+
themeService,
|
|
26
|
+
layoutService,
|
|
27
|
+
configurationService
|
|
28
|
+
);
|
|
16
29
|
this.keybindingService = keybindingService;
|
|
17
30
|
this.inQuickInputContext = InQuickPickContextKey.bindTo(this.contextKeyService);
|
|
18
31
|
this.registerListeners();
|
|
@@ -23,18 +36,11 @@ let QuickInputService = class QuickInputService extends QuickInputService$1 {
|
|
|
23
36
|
}
|
|
24
37
|
createController() {
|
|
25
38
|
return super.createController(this.layoutService, {
|
|
26
|
-
ignoreFocusOut: () => !this.configurationService.getValue(
|
|
27
|
-
backKeybindingLabel: () => this.keybindingService.lookupKeybinding(
|
|
39
|
+
ignoreFocusOut: () => !this.configurationService.getValue("workbench.quickOpen.closeOnFocusLost"),
|
|
40
|
+
backKeybindingLabel: () => this.keybindingService.lookupKeybinding("workbench.action.quickInputBack")?.getLabel() || undefined
|
|
28
41
|
});
|
|
29
42
|
}
|
|
30
43
|
};
|
|
31
|
-
QuickInputService = ( __decorate([
|
|
32
|
-
( __param(0, IConfigurationService)),
|
|
33
|
-
( __param(1, IInstantiationService)),
|
|
34
|
-
( __param(2, IKeybindingService)),
|
|
35
|
-
( __param(3, IContextKeyService)),
|
|
36
|
-
( __param(4, IThemeService)),
|
|
37
|
-
( __param(5, ILayoutService))
|
|
38
|
-
], QuickInputService));
|
|
44
|
+
QuickInputService = ( __decorate([( __param(0, IConfigurationService)), ( __param(1, IInstantiationService)), ( __param(2, IKeybindingService)), ( __param(3, IContextKeyService)), ( __param(4, IThemeService)), ( __param(5, ILayoutService))], QuickInputService));
|
|
39
45
|
|
|
40
46
|
export { QuickInputService };
|