@codingame/monaco-vscode-quickaccess-service-override 22.1.9 → 23.0.1
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 +9 -9
- package/vscode/src/vs/base/common/normalization.d.ts +3 -0
- package/vscode/src/vs/base/common/normalization.js +34 -0
- package/vscode/src/vs/platform/quickinput/browser/commandsQuickAccess.d.ts +10 -2
- package/vscode/src/vs/platform/quickinput/browser/commandsQuickAccess.js +39 -10
- package/vscode/src/vs/platform/quickinput/browser/helpQuickAccess.js +1 -1
- package/vscode/src/vs/workbench/browser/actions/quickAccessActions.js +6 -6
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/quickaccess/gotoLineQuickAccess.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/quickaccess/gotoLineQuickAccess.js +9 -6
- package/vscode/src/vs/workbench/contrib/quickaccess/browser/commandsQuickAccess.js +34 -23
- package/vscode/src/vs/workbench/contrib/quickaccess/browser/quickAccess.contribution.js +13 -13
- package/vscode/src/vs/workbench/contrib/quickaccess/browser/viewQuickAccess.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/quickaccess/browser/viewQuickAccess.js +16 -11
- package/vscode/src/vs/workbench/contrib/url/browser/trustedDomainsValidator.js +4 -4
- package/vscode/src/vs/workbench/contrib/url/browser/url.contribution.js +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-quickaccess-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "23.0.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor - quickaccess service-override",
|
|
6
6
|
"keywords": [],
|
|
@@ -15,14 +15,14 @@
|
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codingame/monaco-vscode-158b9837-fc78-5d9c-86f5-9134e4358643-common": "
|
|
19
|
-
"@codingame/monaco-vscode-
|
|
20
|
-
"@codingame/monaco-vscode-
|
|
21
|
-
"@codingame/monaco-vscode-
|
|
22
|
-
"@codingame/monaco-vscode-
|
|
23
|
-
"@codingame/monaco-vscode-api": "
|
|
24
|
-
"@codingame/monaco-vscode-d609a7d3-bf87-551a-884f-550a8b327ec5-common": "
|
|
25
|
-
"@codingame/monaco-vscode-eda30bac-0984-5b42-9362-c68996b85232-common": "
|
|
18
|
+
"@codingame/monaco-vscode-158b9837-fc78-5d9c-86f5-9134e4358643-common": "23.0.1",
|
|
19
|
+
"@codingame/monaco-vscode-3b5a5cd1-d4ff-500a-b609-57e0cd4afa0a-common": "23.0.1",
|
|
20
|
+
"@codingame/monaco-vscode-40cada32-7e9c-528a-81fc-766e4da54147-common": "23.0.1",
|
|
21
|
+
"@codingame/monaco-vscode-4bf376c2-03c7-58cb-8303-c67aeefa3d3d-common": "23.0.1",
|
|
22
|
+
"@codingame/monaco-vscode-9a1a5840-af83-5d07-a156-ba32a36c5c4b-common": "23.0.1",
|
|
23
|
+
"@codingame/monaco-vscode-api": "23.0.1",
|
|
24
|
+
"@codingame/monaco-vscode-d609a7d3-bf87-551a-884f-550a8b327ec5-common": "23.0.1",
|
|
25
|
+
"@codingame/monaco-vscode-eda30bac-0984-5b42-9362-c68996b85232-common": "23.0.1"
|
|
26
26
|
},
|
|
27
27
|
"main": "index.js",
|
|
28
28
|
"module": "index.js",
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
|
|
2
|
+
import { LRUCache } from '@codingame/monaco-vscode-api/vscode/vs/base/common/map';
|
|
3
|
+
|
|
4
|
+
const nfdCache = ( new LRUCache(10000));
|
|
5
|
+
function normalizeNFD(str) {
|
|
6
|
+
return normalize(str, 'NFD', nfdCache);
|
|
7
|
+
}
|
|
8
|
+
const nonAsciiCharactersPattern = /[^\u0000-\u0080]/;
|
|
9
|
+
function normalize(str, form, normalizedCache) {
|
|
10
|
+
if (!str) {
|
|
11
|
+
return str;
|
|
12
|
+
}
|
|
13
|
+
const cached = normalizedCache.get(str);
|
|
14
|
+
if (cached) {
|
|
15
|
+
return cached;
|
|
16
|
+
}
|
|
17
|
+
let res;
|
|
18
|
+
if (nonAsciiCharactersPattern.test(str)) {
|
|
19
|
+
res = str.normalize(form);
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
res = str;
|
|
23
|
+
}
|
|
24
|
+
normalizedCache.set(str, res);
|
|
25
|
+
return res;
|
|
26
|
+
}
|
|
27
|
+
const removeAccents = (function () {
|
|
28
|
+
const regex = /[\u0300-\u036f]/g;
|
|
29
|
+
return function (str) {
|
|
30
|
+
return normalizeNFD(str).replace(regex, '');
|
|
31
|
+
};
|
|
32
|
+
})();
|
|
33
|
+
|
|
34
|
+
export { normalizeNFD, removeAccents };
|
|
@@ -7,7 +7,7 @@ import { IDialogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/
|
|
|
7
7
|
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
8
8
|
import { IKeybindingService } from "@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service";
|
|
9
9
|
import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
|
|
10
|
-
import { FastAndSlowPicks, IPickerQuickAccessItem, IPickerQuickAccessProviderOptions, PickerQuickAccessProvider, Picks } from "@codingame/monaco-vscode-
|
|
10
|
+
import { FastAndSlowPicks, IPickerQuickAccessItem, IPickerQuickAccessProviderOptions, PickerQuickAccessProvider, Picks } from "@codingame/monaco-vscode-3b5a5cd1-d4ff-500a-b609-57e0cd4afa0a-common/vscode/vs/platform/quickinput/browser/pickerQuickAccess";
|
|
11
11
|
import { IQuickAccessProviderRunOptions } from "@codingame/monaco-vscode-api/vscode/vs/platform/quickinput/common/quickAccess";
|
|
12
12
|
import { IQuickPickSeparator } from "@codingame/monaco-vscode-api/vscode/vs/platform/quickinput/common/quickInput";
|
|
13
13
|
import { IStorageService } from "@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service";
|
|
@@ -17,8 +17,11 @@ export interface ICommandQuickPick extends IPickerQuickAccessItem {
|
|
|
17
17
|
readonly commandWhen?: string;
|
|
18
18
|
readonly commandAlias?: string;
|
|
19
19
|
readonly commandDescription?: ILocalizedString;
|
|
20
|
+
readonly commandCategory?: string;
|
|
21
|
+
readonly args?: unknown[];
|
|
20
22
|
tfIdfScore?: number;
|
|
21
|
-
|
|
23
|
+
labelNoAccents?: string;
|
|
24
|
+
aliasNoAccents?: string;
|
|
22
25
|
}
|
|
23
26
|
export interface ICommandsQuickAccessOptions extends IPickerQuickAccessProviderOptions<ICommandQuickPick> {
|
|
24
27
|
readonly showAlias: boolean;
|
|
@@ -39,6 +42,11 @@ export declare abstract class AbstractCommandsQuickAccessProvider extends Picker
|
|
|
39
42
|
protected _getPicks(filter: string, _disposables: DisposableStore, token: CancellationToken, runOptions?: IQuickAccessProviderRunOptions): Promise<Picks<ICommandQuickPick> | FastAndSlowPicks<ICommandQuickPick>>;
|
|
40
43
|
private toCommandPick;
|
|
41
44
|
private getTfIdfChunk;
|
|
45
|
+
/**
|
|
46
|
+
* Normalizes a string for filtering by removing accents, but only if
|
|
47
|
+
* the result has the same length, otherwise returns the original string.
|
|
48
|
+
*/
|
|
49
|
+
private normalizeForFiltering;
|
|
42
50
|
protected abstract getCommandPicks(token: CancellationToken): Promise<Array<ICommandQuickPick>>;
|
|
43
51
|
protected abstract hasAdditionalCommandPicks(filter: string, token: CancellationToken): boolean;
|
|
44
52
|
protected abstract getAdditionalCommandPicks(allPicks: ICommandQuickPick[], picksSoFar: ICommandQuickPick[], filter: string, token: CancellationToken): Promise<Array<ICommandQuickPick | IQuickPickSeparator>>;
|
|
@@ -14,10 +14,12 @@ import { IDialogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/
|
|
|
14
14
|
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
15
15
|
import { IKeybindingService } from '@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service';
|
|
16
16
|
import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
|
|
17
|
-
import { PickerQuickAccessProvider } from '@codingame/monaco-vscode-
|
|
17
|
+
import { PickerQuickAccessProvider } from '@codingame/monaco-vscode-3b5a5cd1-d4ff-500a-b609-57e0cd4afa0a-common/vscode/vs/platform/quickinput/browser/pickerQuickAccess';
|
|
18
18
|
import { WillSaveStateReason, StorageScope, StorageTarget } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage';
|
|
19
19
|
import { IStorageService } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service';
|
|
20
20
|
import { ITelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service';
|
|
21
|
+
import { removeAccents } from '../../../base/common/normalization.js';
|
|
22
|
+
import { Categories } from '@codingame/monaco-vscode-api/vscode/vs/platform/action/common/actionCommonCategories';
|
|
21
23
|
|
|
22
24
|
var AbstractCommandsQuickAccessProvider_1, CommandsHistory_1;
|
|
23
25
|
let AbstractCommandsQuickAccessProvider = class AbstractCommandsQuickAccessProvider extends PickerQuickAccessProvider {
|
|
@@ -51,10 +53,16 @@ let AbstractCommandsQuickAccessProvider = class AbstractCommandsQuickAccessProvi
|
|
|
51
53
|
.filter(score => score.score > AbstractCommandsQuickAccessProvider_1.TFIDF_THRESHOLD)
|
|
52
54
|
.slice(0, AbstractCommandsQuickAccessProvider_1.TFIDF_MAX_RESULTS);
|
|
53
55
|
});
|
|
56
|
+
const noAccentsFilter = this.normalizeForFiltering(filter);
|
|
54
57
|
const filteredCommandPicks = [];
|
|
55
58
|
for (const commandPick of allCommandPicks) {
|
|
56
|
-
|
|
57
|
-
const
|
|
59
|
+
commandPick.labelNoAccents ??= this.normalizeForFiltering(commandPick.label);
|
|
60
|
+
const labelHighlights = AbstractCommandsQuickAccessProvider_1.WORD_FILTER(noAccentsFilter, commandPick.labelNoAccents) ?? undefined;
|
|
61
|
+
let aliasHighlights;
|
|
62
|
+
if (commandPick.commandAlias) {
|
|
63
|
+
commandPick.aliasNoAccents ??= this.normalizeForFiltering(commandPick.commandAlias);
|
|
64
|
+
aliasHighlights = AbstractCommandsQuickAccessProvider_1.WORD_FILTER(noAccentsFilter, commandPick.aliasNoAccents) ?? undefined;
|
|
65
|
+
}
|
|
58
66
|
if (labelHighlights || aliasHighlights) {
|
|
59
67
|
commandPick.highlights = {
|
|
60
68
|
label: labelHighlights,
|
|
@@ -125,6 +133,14 @@ let AbstractCommandsQuickAccessProvider = class AbstractCommandsQuickAccessProvi
|
|
|
125
133
|
return 1;
|
|
126
134
|
}
|
|
127
135
|
}
|
|
136
|
+
const isDeveloperA = commandPickA.commandCategory === Categories.Developer.value;
|
|
137
|
+
const isDeveloperB = commandPickB.commandCategory === Categories.Developer.value;
|
|
138
|
+
if (isDeveloperA && !isDeveloperB) {
|
|
139
|
+
return 1;
|
|
140
|
+
}
|
|
141
|
+
if (!isDeveloperA && isDeveloperB) {
|
|
142
|
+
return -1;
|
|
143
|
+
}
|
|
128
144
|
return commandPickA.label.localeCompare(commandPickB.label);
|
|
129
145
|
});
|
|
130
146
|
const commandPicks = [];
|
|
@@ -134,20 +150,20 @@ let AbstractCommandsQuickAccessProvider = class AbstractCommandsQuickAccessProvi
|
|
|
134
150
|
for (let i = 0; i < filteredCommandPicks.length; i++) {
|
|
135
151
|
const commandPick = filteredCommandPicks[i];
|
|
136
152
|
if (i === 0 && this.commandsHistory.peek(commandPick.commandId)) {
|
|
137
|
-
commandPicks.push({ type: 'separator', label: ( localize(
|
|
153
|
+
commandPicks.push({ type: 'separator', label: ( localize(1988, "recently used")) });
|
|
138
154
|
addOtherSeparator = true;
|
|
139
155
|
}
|
|
140
156
|
if (addSuggestedSeparator && commandPick.tfIdfScore !== undefined) {
|
|
141
|
-
commandPicks.push({ type: 'separator', label: ( localize(
|
|
157
|
+
commandPicks.push({ type: 'separator', label: ( localize(1989, "similar commands")) });
|
|
142
158
|
addSuggestedSeparator = false;
|
|
143
159
|
}
|
|
144
160
|
if (addCommonlyUsedSeparator && commandPick.tfIdfScore === undefined && !this.commandsHistory.peek(commandPick.commandId) && this.options.suggestedCommandIds?.has(commandPick.commandId)) {
|
|
145
|
-
commandPicks.push({ type: 'separator', label: ( localize(
|
|
161
|
+
commandPicks.push({ type: 'separator', label: ( localize(1990, "commonly used")) });
|
|
146
162
|
addOtherSeparator = true;
|
|
147
163
|
addCommonlyUsedSeparator = false;
|
|
148
164
|
}
|
|
149
165
|
if (addOtherSeparator && commandPick.tfIdfScore === undefined && !this.commandsHistory.peek(commandPick.commandId) && !this.options.suggestedCommandIds?.has(commandPick.commandId)) {
|
|
150
|
-
commandPicks.push({ type: 'separator', label: ( localize(
|
|
166
|
+
commandPicks.push({ type: 'separator', label: ( localize(1991, "other commands")) });
|
|
151
167
|
addOtherSeparator = false;
|
|
152
168
|
}
|
|
153
169
|
commandPicks.push(this.toCommandPick(commandPick, runOptions));
|
|
@@ -164,7 +180,7 @@ let AbstractCommandsQuickAccessProvider = class AbstractCommandsQuickAccessProvi
|
|
|
164
180
|
}
|
|
165
181
|
const commandPicks = ( additionalCommandPicks.map(commandPick => this.toCommandPick(commandPick, runOptions)));
|
|
166
182
|
if (addSuggestedSeparator && commandPicks[0]?.type !== 'separator') {
|
|
167
|
-
commandPicks.unshift({ type: 'separator', label: ( localize(
|
|
183
|
+
commandPicks.unshift({ type: 'separator', label: ( localize(1989, "similar commands")) });
|
|
168
184
|
}
|
|
169
185
|
return commandPicks;
|
|
170
186
|
})()
|
|
@@ -176,7 +192,7 @@ let AbstractCommandsQuickAccessProvider = class AbstractCommandsQuickAccessProvi
|
|
|
176
192
|
}
|
|
177
193
|
const keybinding = this.keybindingService.lookupKeybinding(commandPick.commandId);
|
|
178
194
|
const ariaLabel = keybinding ?
|
|
179
|
-
( localize(
|
|
195
|
+
( localize(1992, "{0}, {1}", commandPick.label, keybinding.getAriaLabel())) :
|
|
180
196
|
commandPick.label;
|
|
181
197
|
return {
|
|
182
198
|
...commandPick,
|
|
@@ -196,7 +212,7 @@ let AbstractCommandsQuickAccessProvider = class AbstractCommandsQuickAccessProvi
|
|
|
196
212
|
}
|
|
197
213
|
catch (error) {
|
|
198
214
|
if (!isCancellationError(error)) {
|
|
199
|
-
this.dialogService.error(( localize(
|
|
215
|
+
this.dialogService.error(( localize(1993, "Command '{0}' resulted in an error", commandPick.label)), toErrorMessage(error));
|
|
200
216
|
}
|
|
201
217
|
}
|
|
202
218
|
}
|
|
@@ -212,6 +228,19 @@ let AbstractCommandsQuickAccessProvider = class AbstractCommandsQuickAccessProvi
|
|
|
212
228
|
}
|
|
213
229
|
return chunk;
|
|
214
230
|
}
|
|
231
|
+
normalizeForFiltering(value) {
|
|
232
|
+
const withoutAccents = removeAccents(value);
|
|
233
|
+
if (withoutAccents.length !== value.length) {
|
|
234
|
+
this.telemetryService.publicLog2('QuickAccess:FilterLengthMismatch', {
|
|
235
|
+
originalLength: value.length,
|
|
236
|
+
normalizedLength: withoutAccents.length
|
|
237
|
+
});
|
|
238
|
+
return value;
|
|
239
|
+
}
|
|
240
|
+
else {
|
|
241
|
+
return withoutAccents;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
215
244
|
};
|
|
216
245
|
AbstractCommandsQuickAccessProvider = AbstractCommandsQuickAccessProvider_1 = ( __decorate([
|
|
217
246
|
( __param(1, IInstantiationService)),
|
|
@@ -48,7 +48,7 @@ let HelpQuickAccessProvider = class HelpQuickAccessProvider {
|
|
|
48
48
|
prefix,
|
|
49
49
|
label,
|
|
50
50
|
keybinding: helpEntry.commandId ? this.keybindingService.lookupKeybinding(helpEntry.commandId) : undefined,
|
|
51
|
-
ariaLabel: ( localize(
|
|
51
|
+
ariaLabel: ( localize(1994, "{0}, {1}", label, helpEntry.description)),
|
|
52
52
|
description: helpEntry.description
|
|
53
53
|
};
|
|
54
54
|
}));
|
|
@@ -105,7 +105,7 @@ registerAction2(class QuickAccessAction extends Action2 {
|
|
|
105
105
|
constructor() {
|
|
106
106
|
super({
|
|
107
107
|
id: 'workbench.action.quickOpen',
|
|
108
|
-
title: ( localize2(
|
|
108
|
+
title: ( localize2(2857, "Go to File...")),
|
|
109
109
|
metadata: {
|
|
110
110
|
description: `Quick access`,
|
|
111
111
|
args: [{
|
|
@@ -133,7 +133,7 @@ registerAction2(class QuickAccessAction extends Action2 {
|
|
|
133
133
|
constructor() {
|
|
134
134
|
super({
|
|
135
135
|
id: 'workbench.action.quickOpenWithModes',
|
|
136
|
-
title: ( localize(
|
|
136
|
+
title: ( localize(2858, "Quick Open")),
|
|
137
137
|
icon: Codicon.search,
|
|
138
138
|
menu: {
|
|
139
139
|
id: MenuId.CommandCenterCenter,
|
|
@@ -174,17 +174,17 @@ class BaseQuickAccessNavigateAction extends Action2 {
|
|
|
174
174
|
}
|
|
175
175
|
class QuickAccessNavigateNextAction extends BaseQuickAccessNavigateAction {
|
|
176
176
|
constructor() {
|
|
177
|
-
super('workbench.action.quickOpenNavigateNext', ( localize2(
|
|
177
|
+
super('workbench.action.quickOpenNavigateNext', ( localize2(2859, 'Navigate Next in Quick Open')), true, true);
|
|
178
178
|
}
|
|
179
179
|
}
|
|
180
180
|
class QuickAccessNavigatePreviousAction extends BaseQuickAccessNavigateAction {
|
|
181
181
|
constructor() {
|
|
182
|
-
super('workbench.action.quickOpenNavigatePrevious', ( localize2(
|
|
182
|
+
super('workbench.action.quickOpenNavigatePrevious', ( localize2(2860, 'Navigate Previous in Quick Open')), false, true);
|
|
183
183
|
}
|
|
184
184
|
}
|
|
185
185
|
class QuickAccessSelectNextAction extends BaseQuickAccessNavigateAction {
|
|
186
186
|
constructor() {
|
|
187
|
-
super('workbench.action.quickOpenSelectNext', ( localize2(
|
|
187
|
+
super('workbench.action.quickOpenSelectNext', ( localize2(2861, 'Select Next in Quick Open')), true, false, {
|
|
188
188
|
weight: KeybindingWeight.WorkbenchContrib + 50,
|
|
189
189
|
when: inQuickPickContext,
|
|
190
190
|
primary: 0,
|
|
@@ -194,7 +194,7 @@ class QuickAccessSelectNextAction extends BaseQuickAccessNavigateAction {
|
|
|
194
194
|
}
|
|
195
195
|
class QuickAccessSelectPreviousAction extends BaseQuickAccessNavigateAction {
|
|
196
196
|
constructor() {
|
|
197
|
-
super('workbench.action.quickOpenSelectPrevious', ( localize2(
|
|
197
|
+
super('workbench.action.quickOpenSelectPrevious', ( localize2(2862, 'Select Previous in Quick Open')), false, false, {
|
|
198
198
|
weight: KeybindingWeight.WorkbenchContrib + 50,
|
|
199
199
|
when: inQuickPickContext,
|
|
200
200
|
primary: 0,
|
package/vscode/src/vs/workbench/contrib/codeEditor/browser/quickaccess/gotoLineQuickAccess.d.ts
CHANGED
|
@@ -6,12 +6,14 @@ import { AbstractGotoLineQuickAccessProvider } from "@codingame/monaco-vscode-ed
|
|
|
6
6
|
import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
7
7
|
import { IQuickAccessTextEditorContext } from "@codingame/monaco-vscode-eda30bac-0984-5b42-9362-c68996b85232-common/vscode/vs/editor/contrib/quickAccess/browser/editorNavigationQuickAccess";
|
|
8
8
|
import { IEditorGroupsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorGroupsService.service";
|
|
9
|
+
import { IStorageService } from "@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service";
|
|
9
10
|
export declare class GotoLineQuickAccessProvider extends AbstractGotoLineQuickAccessProvider {
|
|
10
11
|
private readonly editorService;
|
|
11
12
|
private readonly editorGroupService;
|
|
12
13
|
private readonly configurationService;
|
|
14
|
+
protected readonly storageService: IStorageService;
|
|
13
15
|
protected readonly onDidActiveTextEditorControlChange: Event<void>;
|
|
14
|
-
constructor(editorService: IEditorService, editorGroupService: IEditorGroupsService, configurationService: IConfigurationService);
|
|
16
|
+
constructor(editorService: IEditorService, editorGroupService: IEditorGroupsService, configurationService: IConfigurationService, storageService: IStorageService);
|
|
15
17
|
private get configuration();
|
|
16
18
|
protected get activeTextEditorControl(): import("@codingame/monaco-vscode-api/vscode/vs/editor/common/editorCommon").IEditor | import("@codingame/monaco-vscode-api/vscode/vs/editor/common/editorCommon").IDiffEditor | undefined;
|
|
17
19
|
protected gotoLocation(context: IQuickAccessTextEditorContext, options: {
|
package/vscode/src/vs/workbench/contrib/codeEditor/browser/quickaccess/gotoLineQuickAccess.js
CHANGED
|
@@ -11,13 +11,15 @@ import { Action2, registerAction2 } from '@codingame/monaco-vscode-api/vscode/vs
|
|
|
11
11
|
import { KeyMod, KeyCode } from '@codingame/monaco-vscode-api/vscode/vs/base/common/keyCodes';
|
|
12
12
|
import { KeybindingWeight } from '@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybindingsRegistry';
|
|
13
13
|
import { IEditorGroupsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorGroupsService.service';
|
|
14
|
+
import { IStorageService } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service';
|
|
14
15
|
|
|
15
16
|
let GotoLineQuickAccessProvider = class GotoLineQuickAccessProvider extends AbstractGotoLineQuickAccessProvider {
|
|
16
|
-
constructor(editorService, editorGroupService, configurationService) {
|
|
17
|
+
constructor(editorService, editorGroupService, configurationService, storageService) {
|
|
17
18
|
super();
|
|
18
19
|
this.editorService = editorService;
|
|
19
20
|
this.editorGroupService = editorGroupService;
|
|
20
21
|
this.configurationService = configurationService;
|
|
22
|
+
this.storageService = storageService;
|
|
21
23
|
this.onDidActiveTextEditorControlChange = this.editorService.onDidActiveEditorChange;
|
|
22
24
|
}
|
|
23
25
|
get configuration() {
|
|
@@ -47,14 +49,15 @@ let GotoLineQuickAccessProvider = class GotoLineQuickAccessProvider extends Abst
|
|
|
47
49
|
GotoLineQuickAccessProvider = ( __decorate([
|
|
48
50
|
( __param(0, IEditorService)),
|
|
49
51
|
( __param(1, IEditorGroupsService)),
|
|
50
|
-
( __param(2, IConfigurationService))
|
|
52
|
+
( __param(2, IConfigurationService)),
|
|
53
|
+
( __param(3, IStorageService))
|
|
51
54
|
], GotoLineQuickAccessProvider));
|
|
52
55
|
class GotoLineAction extends Action2 {
|
|
53
56
|
static { this.ID = 'workbench.action.gotoLine'; }
|
|
54
57
|
constructor() {
|
|
55
58
|
super({
|
|
56
59
|
id: GotoLineAction.ID,
|
|
57
|
-
title: ( localize2(
|
|
60
|
+
title: ( localize2(6019, 'Go to Line/Column...')),
|
|
58
61
|
f1: true,
|
|
59
62
|
keybinding: {
|
|
60
63
|
weight: KeybindingWeight.WorkbenchContrib,
|
|
@@ -73,10 +76,10 @@ registerAction2(GotoLineAction);
|
|
|
73
76
|
ctor: GotoLineQuickAccessProvider,
|
|
74
77
|
prefix: AbstractGotoLineQuickAccessProvider.PREFIX,
|
|
75
78
|
placeholder: ( localize(
|
|
76
|
-
|
|
77
|
-
"Type the line number and optional column to go to (e.g. 42:5 for line 42
|
|
79
|
+
6020,
|
|
80
|
+
"Type the line number and optional column to go to (e.g. :42:5 for line 42, column 5). Type :: to go to a character offset (e.g. ::1024 for character 1024 from the start of the file). Use negative values to navigate backwards."
|
|
78
81
|
)),
|
|
79
|
-
helpEntries: [{ description: ( localize(
|
|
82
|
+
helpEntries: [{ description: ( localize(6021, "Go to Line/Column")), commandId: GotoLineAction.ID }]
|
|
80
83
|
});
|
|
81
84
|
|
|
82
85
|
export { GotoLineQuickAccessProvider };
|
|
@@ -20,7 +20,7 @@ import { IKeybindingService } from '@codingame/monaco-vscode-api/vscode/vs/platf
|
|
|
20
20
|
import { KeybindingWeight } from '@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybindingsRegistry';
|
|
21
21
|
import { IProductService } from '@codingame/monaco-vscode-api/vscode/vs/platform/product/common/productService.service';
|
|
22
22
|
import { CommandsHistory } from '../../../../platform/quickinput/browser/commandsQuickAccess.js';
|
|
23
|
-
import { TriggerAction } from '@codingame/monaco-vscode-
|
|
23
|
+
import { TriggerAction } from '@codingame/monaco-vscode-3b5a5cd1-d4ff-500a-b609-57e0cd4afa0a-common/vscode/vs/platform/quickinput/browser/pickerQuickAccess';
|
|
24
24
|
import { DefaultQuickAccessFilterValue } from '@codingame/monaco-vscode-api/vscode/vs/platform/quickinput/common/quickAccess';
|
|
25
25
|
import { IQuickInputService } from '@codingame/monaco-vscode-api/vscode/vs/platform/quickinput/common/quickInput.service';
|
|
26
26
|
import { IStorageService } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service';
|
|
@@ -52,7 +52,7 @@ let CommandsQuickAccessProvider = class CommandsQuickAccessProvider extends Abst
|
|
|
52
52
|
super({
|
|
53
53
|
showAlias: !Language.isDefaultVariant(),
|
|
54
54
|
noResultsPick: () => ({
|
|
55
|
-
label: ( localize(
|
|
55
|
+
label: ( localize(10002, "No matching commands")),
|
|
56
56
|
commandId: ''
|
|
57
57
|
}),
|
|
58
58
|
}, instantiationService, keybindingService, commandService, telemetryService, dialogService);
|
|
@@ -73,6 +73,7 @@ let CommandsQuickAccessProvider = class CommandsQuickAccessProvider extends Abst
|
|
|
73
73
|
const commandPaletteConfig = this.configurationService.getValue().workbench.commandPalette;
|
|
74
74
|
return {
|
|
75
75
|
preserveInput: commandPaletteConfig.preserveInput,
|
|
76
|
+
showAskInChat: commandPaletteConfig.showAskInChat,
|
|
76
77
|
experimental: commandPaletteConfig.experimental
|
|
77
78
|
};
|
|
78
79
|
}
|
|
@@ -99,7 +100,7 @@ let CommandsQuickAccessProvider = class CommandsQuickAccessProvider extends Abst
|
|
|
99
100
|
...picks,
|
|
100
101
|
buttons: [{
|
|
101
102
|
iconClass: ThemeIcon.asClassName(Codicon.gear),
|
|
102
|
-
tooltip: ( localize(
|
|
103
|
+
tooltip: ( localize(10003, "Configure Keybinding")),
|
|
103
104
|
}],
|
|
104
105
|
trigger: () => {
|
|
105
106
|
this.preferencesService.openGlobalKeybindingSettings(false, { query: createKeybindingCommandQuery(picks.commandId, picks.commandWhen) });
|
|
@@ -120,26 +121,35 @@ let CommandsQuickAccessProvider = class CommandsQuickAccessProvider extends Abst
|
|
|
120
121
|
if (!this.hasAdditionalCommandPicks(filter, token)) {
|
|
121
122
|
return [];
|
|
122
123
|
}
|
|
123
|
-
let additionalPicks;
|
|
124
|
+
let additionalPicks = [];
|
|
124
125
|
try {
|
|
125
126
|
await timeout(CommandsQuickAccessProvider_1.AI_RELATED_INFORMATION_DEBOUNCE, token);
|
|
126
127
|
additionalPicks = await this.getRelatedInformationPicks(allPicks, picksSoFar, filter, token);
|
|
127
128
|
}
|
|
128
129
|
catch (e) {
|
|
129
|
-
return [];
|
|
130
|
-
}
|
|
131
|
-
if (picksSoFar.length || additionalPicks.length) {
|
|
132
|
-
additionalPicks.push({
|
|
133
|
-
type: 'separator'
|
|
134
|
-
});
|
|
135
130
|
}
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
131
|
+
if (this.configuration.showAskInChat) {
|
|
132
|
+
const defaultAgent = this.chatAgentService.getDefaultAgent(ChatAgentLocation.Chat);
|
|
133
|
+
if (defaultAgent) {
|
|
134
|
+
if (picksSoFar.length || additionalPicks.length) {
|
|
135
|
+
additionalPicks.push({
|
|
136
|
+
type: 'separator'
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
additionalPicks.push({
|
|
140
|
+
label: ( localize(10004, "Ask in Chat: {0}", filter)),
|
|
141
|
+
commandId: this.configuration.experimental.askChatLocation === 'quickChat' ? ASK_QUICK_QUESTION_ACTION_ID : CHAT_OPEN_ACTION_ID,
|
|
142
|
+
args: [filter],
|
|
143
|
+
buttons: [{
|
|
144
|
+
iconClass: ThemeIcon.asClassName(Codicon.gear),
|
|
145
|
+
tooltip: ( localize(10005, "Configure visibility")),
|
|
146
|
+
}],
|
|
147
|
+
trigger: () => {
|
|
148
|
+
void this.preferencesService.openSettings({ jsonEditor: false, query: 'workbench.commandPalette.showAskInChat' });
|
|
149
|
+
return TriggerAction.CLOSE_PICKER;
|
|
150
|
+
},
|
|
151
|
+
});
|
|
152
|
+
}
|
|
143
153
|
}
|
|
144
154
|
return additionalPicks;
|
|
145
155
|
}
|
|
@@ -170,7 +180,7 @@ let CommandsQuickAccessProvider = class CommandsQuickAccessProvider extends Abst
|
|
|
170
180
|
let label = (typeof action.item.title === 'string' ? action.item.title : action.item.title.value) || action.item.id;
|
|
171
181
|
const category = typeof action.item.category === 'string' ? action.item.category : action.item.category?.value;
|
|
172
182
|
if (category) {
|
|
173
|
-
label = ( localize(
|
|
183
|
+
label = ( localize(10006, "{0}: {1}", category, label));
|
|
174
184
|
}
|
|
175
185
|
const aliasLabel = typeof action.item.title !== 'string' ? action.item.title.original : undefined;
|
|
176
186
|
const aliasCategory = (category && action.item.category && typeof action.item.category !== 'string') ? action.item.category.original : undefined;
|
|
@@ -187,6 +197,7 @@ let CommandsQuickAccessProvider = class CommandsQuickAccessProvider extends Abst
|
|
|
187
197
|
commandAlias,
|
|
188
198
|
label: stripIcons(label),
|
|
189
199
|
commandDescription,
|
|
200
|
+
commandCategory: category,
|
|
190
201
|
});
|
|
191
202
|
}
|
|
192
203
|
return globalCommandPicks;
|
|
@@ -213,7 +224,7 @@ class ShowAllCommandsAction extends Action2 {
|
|
|
213
224
|
constructor() {
|
|
214
225
|
super({
|
|
215
226
|
id: ShowAllCommandsAction.ID,
|
|
216
|
-
title: ( localize2(
|
|
227
|
+
title: ( localize2(10007, 'Show All Commands')),
|
|
217
228
|
keybinding: {
|
|
218
229
|
weight: KeybindingWeight.WorkbenchContrib,
|
|
219
230
|
when: undefined,
|
|
@@ -231,7 +242,7 @@ class ClearCommandHistoryAction extends Action2 {
|
|
|
231
242
|
constructor() {
|
|
232
243
|
super({
|
|
233
244
|
id: 'workbench.action.clearCommandHistory',
|
|
234
|
-
title: ( localize2(
|
|
245
|
+
title: ( localize2(10008, 'Clear Command History')),
|
|
235
246
|
f1: true
|
|
236
247
|
});
|
|
237
248
|
}
|
|
@@ -243,9 +254,9 @@ class ClearCommandHistoryAction extends Action2 {
|
|
|
243
254
|
if (commandHistoryLength > 0) {
|
|
244
255
|
const { confirmed } = await dialogService.confirm({
|
|
245
256
|
type: 'warning',
|
|
246
|
-
message: ( localize(
|
|
247
|
-
detail: ( localize(
|
|
248
|
-
primaryButton: ( localize(
|
|
257
|
+
message: ( localize(10009, "Do you want to clear the history of recently used commands?")),
|
|
258
|
+
detail: ( localize(10010, "This action is irreversible!")),
|
|
259
|
+
primaryButton: ( localize(10011, "&&Clear"))
|
|
249
260
|
});
|
|
250
261
|
if (!confirmed) {
|
|
251
262
|
return;
|
|
@@ -17,35 +17,35 @@ quickAccessRegistry.registerQuickAccessProvider({
|
|
|
17
17
|
ctor: HelpQuickAccessProvider,
|
|
18
18
|
prefix: HelpQuickAccessProvider.PREFIX,
|
|
19
19
|
placeholder: ( localize(
|
|
20
|
-
|
|
20
|
+
10012,
|
|
21
21
|
"Type '{0}' to get help on the actions you can take from here.",
|
|
22
22
|
HelpQuickAccessProvider.PREFIX
|
|
23
23
|
)),
|
|
24
24
|
helpEntries: [{
|
|
25
|
-
description: ( localize(
|
|
25
|
+
description: ( localize(10013, "Show all Quick Access Providers")),
|
|
26
26
|
commandCenterOrder: 70,
|
|
27
|
-
commandCenterLabel: ( localize(
|
|
27
|
+
commandCenterLabel: ( localize(10014, 'More'))
|
|
28
28
|
}]
|
|
29
29
|
});
|
|
30
30
|
quickAccessRegistry.registerQuickAccessProvider({
|
|
31
31
|
ctor: ViewQuickAccessProvider,
|
|
32
32
|
prefix: ViewQuickAccessProvider.PREFIX,
|
|
33
33
|
contextKey: 'inViewsPicker',
|
|
34
|
-
placeholder: ( localize(
|
|
35
|
-
helpEntries: [{ description: ( localize(
|
|
34
|
+
placeholder: ( localize(10015, "Type the name of a view, output channel or terminal to open.")),
|
|
35
|
+
helpEntries: [{ description: ( localize(10016, "Open View")), commandId: OpenViewPickerAction.ID }]
|
|
36
36
|
});
|
|
37
37
|
quickAccessRegistry.registerQuickAccessProvider({
|
|
38
38
|
ctor: CommandsQuickAccessProvider,
|
|
39
39
|
prefix: CommandsQuickAccessProvider.PREFIX,
|
|
40
40
|
contextKey: 'inCommandsPicker',
|
|
41
|
-
placeholder: ( localize(
|
|
42
|
-
helpEntries: [{ description: ( localize(
|
|
41
|
+
placeholder: ( localize(10017, "Type the name of a command to run.")),
|
|
42
|
+
helpEntries: [{ description: ( localize(10018, "Show and Run Commands")), commandId: ShowAllCommandsAction.ID, commandCenterOrder: 20 }]
|
|
43
43
|
});
|
|
44
44
|
MenuRegistry.appendMenuItem(MenuId.MenubarViewMenu, {
|
|
45
45
|
group: '1_open',
|
|
46
46
|
command: {
|
|
47
47
|
id: ShowAllCommandsAction.ID,
|
|
48
|
-
title: ( localize(
|
|
48
|
+
title: ( localize(10019, "&&Command Palette..."))
|
|
49
49
|
},
|
|
50
50
|
order: 1
|
|
51
51
|
});
|
|
@@ -53,7 +53,7 @@ MenuRegistry.appendMenuItem(MenuId.MenubarHelpMenu, {
|
|
|
53
53
|
group: '1_welcome',
|
|
54
54
|
command: {
|
|
55
55
|
id: ShowAllCommandsAction.ID,
|
|
56
|
-
title: ( localize(
|
|
56
|
+
title: ( localize(10020, "Show All Commands"))
|
|
57
57
|
},
|
|
58
58
|
order: 2
|
|
59
59
|
});
|
|
@@ -61,7 +61,7 @@ MenuRegistry.appendMenuItem(MenuId.MenubarViewMenu, {
|
|
|
61
61
|
group: '1_open',
|
|
62
62
|
command: {
|
|
63
63
|
id: OpenViewPickerAction.ID,
|
|
64
|
-
title: ( localize(
|
|
64
|
+
title: ( localize(10021, "&&Open View..."))
|
|
65
65
|
},
|
|
66
66
|
order: 2
|
|
67
67
|
});
|
|
@@ -69,7 +69,7 @@ MenuRegistry.appendMenuItem(MenuId.MenubarGoMenu, {
|
|
|
69
69
|
group: '5_infile_nav',
|
|
70
70
|
command: {
|
|
71
71
|
id: 'workbench.action.gotoLine',
|
|
72
|
-
title: ( localize(
|
|
72
|
+
title: ( localize(10022, "Go to &&Line/Column..."))
|
|
73
73
|
},
|
|
74
74
|
order: 1
|
|
75
75
|
});
|
|
@@ -77,7 +77,7 @@ MenuRegistry.appendMenuItem(MenuId.GlobalActivity, {
|
|
|
77
77
|
group: '1_command',
|
|
78
78
|
command: {
|
|
79
79
|
id: ShowAllCommandsAction.ID,
|
|
80
|
-
title: ( localize(
|
|
80
|
+
title: ( localize(10023, "Command Palette..."))
|
|
81
81
|
},
|
|
82
82
|
order: 1
|
|
83
83
|
});
|
|
@@ -86,7 +86,7 @@ MenuRegistry.appendMenuItem(MenuId.EditorContext, {
|
|
|
86
86
|
when: ( EditorContextKeys.editorSimpleInput.toNegated()),
|
|
87
87
|
command: {
|
|
88
88
|
id: ShowAllCommandsAction.ID,
|
|
89
|
-
title: ( localize(
|
|
89
|
+
title: ( localize(10023, "Command Palette...")),
|
|
90
90
|
},
|
|
91
91
|
order: 1
|
|
92
92
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IQuickPickSeparator } from "@codingame/monaco-vscode-api/vscode/vs/platform/quickinput/common/quickInput";
|
|
2
|
-
import { IPickerQuickAccessItem, PickerQuickAccessProvider } from "@codingame/monaco-vscode-
|
|
2
|
+
import { IPickerQuickAccessItem, PickerQuickAccessProvider } from "@codingame/monaco-vscode-3b5a5cd1-d4ff-500a-b609-57e0cd4afa0a-common/vscode/vs/platform/quickinput/browser/pickerQuickAccess";
|
|
3
3
|
import { IViewDescriptorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/views.service";
|
|
4
4
|
import { IViewsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/views/common/viewsService.service";
|
|
5
5
|
import { IOutputService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/output/common/output.service";
|
|
@@ -3,7 +3,7 @@ import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib
|
|
|
3
3
|
import { localize, localize2 } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
4
4
|
import { ItemActivation } from '@codingame/monaco-vscode-api/vscode/vs/platform/quickinput/common/quickInput';
|
|
5
5
|
import { IQuickInputService } from '@codingame/monaco-vscode-api/vscode/vs/platform/quickinput/common/quickInput.service';
|
|
6
|
-
import { PickerQuickAccessProvider } from '@codingame/monaco-vscode-
|
|
6
|
+
import { PickerQuickAccessProvider } from '@codingame/monaco-vscode-3b5a5cd1-d4ff-500a-b609-57e0cd4afa0a-common/vscode/vs/platform/quickinput/browser/pickerQuickAccess';
|
|
7
7
|
import { ViewContainerLocation } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/views';
|
|
8
8
|
import { IViewDescriptorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/views.service';
|
|
9
9
|
import { IViewsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/views/common/viewsService.service';
|
|
@@ -28,7 +28,7 @@ let ViewQuickAccessProvider = class ViewQuickAccessProvider extends PickerQuickA
|
|
|
28
28
|
constructor(viewDescriptorService, viewsService, outputService, terminalService, terminalGroupService, debugService, paneCompositeService, contextKeyService) {
|
|
29
29
|
super(ViewQuickAccessProvider_1.PREFIX, {
|
|
30
30
|
noResultsPick: {
|
|
31
|
-
label: ( localize(
|
|
31
|
+
label: ( localize(10024, "No matching views")),
|
|
32
32
|
containerLabel: ''
|
|
33
33
|
}
|
|
34
34
|
});
|
|
@@ -116,9 +116,9 @@ let ViewQuickAccessProvider = class ViewQuickAccessProvider extends PickerQuickA
|
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
118
|
};
|
|
119
|
-
addPaneComposites(ViewContainerLocation.Sidebar, ( localize(
|
|
120
|
-
addPaneComposites(ViewContainerLocation.Panel, ( localize(
|
|
121
|
-
addPaneComposites(ViewContainerLocation.AuxiliaryBar, ( localize(
|
|
119
|
+
addPaneComposites(ViewContainerLocation.Sidebar, ( localize(10025, "Side Bar")));
|
|
120
|
+
addPaneComposites(ViewContainerLocation.Panel, ( localize(10026, "Panel")));
|
|
121
|
+
addPaneComposites(ViewContainerLocation.AuxiliaryBar, ( localize(10027, "Secondary Side Bar")));
|
|
122
122
|
const addPaneCompositeViews = (location) => {
|
|
123
123
|
const paneComposites = this.paneCompositeService.getPaneComposites(location);
|
|
124
124
|
for (const paneComposite of paneComposites) {
|
|
@@ -133,10 +133,15 @@ let ViewQuickAccessProvider = class ViewQuickAccessProvider extends PickerQuickA
|
|
|
133
133
|
addPaneCompositeViews(ViewContainerLocation.AuxiliaryBar);
|
|
134
134
|
this.terminalGroupService.groups.forEach((group, groupIndex) => {
|
|
135
135
|
group.terminalInstances.forEach((terminal, terminalIndex) => {
|
|
136
|
-
const label = ( localize(
|
|
136
|
+
const label = ( localize(
|
|
137
|
+
10028,
|
|
138
|
+
"{0}: {1}",
|
|
139
|
+
`${groupIndex + 1}.${terminalIndex + 1}`,
|
|
140
|
+
terminal.title
|
|
141
|
+
));
|
|
137
142
|
viewEntries.push({
|
|
138
143
|
label,
|
|
139
|
-
containerLabel: ( localize(
|
|
144
|
+
containerLabel: ( localize(10029, "Terminal")),
|
|
140
145
|
accept: async () => {
|
|
141
146
|
await this.terminalGroupService.showPanel(true);
|
|
142
147
|
this.terminalService.setActiveInstance(terminal);
|
|
@@ -148,7 +153,7 @@ let ViewQuickAccessProvider = class ViewQuickAccessProvider extends PickerQuickA
|
|
|
148
153
|
const label = session.name;
|
|
149
154
|
viewEntries.push({
|
|
150
155
|
label,
|
|
151
|
-
containerLabel: ( localize(
|
|
156
|
+
containerLabel: ( localize(10030, "Debug Console")),
|
|
152
157
|
accept: async () => {
|
|
153
158
|
await this.debugService.focusStackFrame(undefined, undefined, session, { explicit: true });
|
|
154
159
|
if (!this.viewsService.isViewVisible(REPL_VIEW_ID)) {
|
|
@@ -161,7 +166,7 @@ let ViewQuickAccessProvider = class ViewQuickAccessProvider extends PickerQuickA
|
|
|
161
166
|
for (const channel of channels) {
|
|
162
167
|
viewEntries.push({
|
|
163
168
|
label: channel.label,
|
|
164
|
-
containerLabel: ( localize(
|
|
169
|
+
containerLabel: ( localize(10031, "Output")),
|
|
165
170
|
accept: () => this.outputService.showChannel(channel.id)
|
|
166
171
|
});
|
|
167
172
|
}
|
|
@@ -190,7 +195,7 @@ class OpenViewPickerAction extends Action2 {
|
|
|
190
195
|
constructor() {
|
|
191
196
|
super({
|
|
192
197
|
id: OpenViewPickerAction.ID,
|
|
193
|
-
title: ( localize2(
|
|
198
|
+
title: ( localize2(10032, 'Open View')),
|
|
194
199
|
category: Categories.View,
|
|
195
200
|
f1: true
|
|
196
201
|
});
|
|
@@ -209,7 +214,7 @@ class QuickAccessViewPickerAction extends Action2 {
|
|
|
209
214
|
constructor() {
|
|
210
215
|
super({
|
|
211
216
|
id: QuickAccessViewPickerAction.ID,
|
|
212
|
-
title: ( localize2(
|
|
217
|
+
title: ( localize2(10033, 'Quick Open View')),
|
|
213
218
|
category: Categories.View,
|
|
214
219
|
f1: false,
|
|
215
220
|
keybinding: {
|
|
@@ -68,25 +68,25 @@ let OpenerValidatorContributions = class OpenerValidatorContributions {
|
|
|
68
68
|
const { result } = await this._dialogService.prompt({
|
|
69
69
|
type: Severity.Info,
|
|
70
70
|
message: ( localize(
|
|
71
|
-
|
|
71
|
+
12703,
|
|
72
72
|
'Do you want {0} to open the external website?',
|
|
73
73
|
this._productService.nameShort
|
|
74
74
|
)),
|
|
75
75
|
detail: typeof originalResource === 'string' ? originalResource : formattedLink,
|
|
76
76
|
buttons: [
|
|
77
77
|
{
|
|
78
|
-
label: ( localize(
|
|
78
|
+
label: ( localize(12704, '&&Open')),
|
|
79
79
|
run: () => true
|
|
80
80
|
},
|
|
81
81
|
{
|
|
82
|
-
label: ( localize(
|
|
82
|
+
label: ( localize(12705, '&&Copy')),
|
|
83
83
|
run: () => {
|
|
84
84
|
this._clipboardService.writeText(typeof originalResource === 'string' ? originalResource : ( resourceUri.toString(true)));
|
|
85
85
|
return false;
|
|
86
86
|
}
|
|
87
87
|
},
|
|
88
88
|
{
|
|
89
|
-
label: ( localize(
|
|
89
|
+
label: ( localize(12706, 'Configure &&Trusted Domains')),
|
|
90
90
|
run: async () => {
|
|
91
91
|
const { trustedDomains, } = this._instantiationService.invokeFunction(readStaticTrustedDomains);
|
|
92
92
|
const domainToOpen = `${scheme}://${authority}`;
|
|
@@ -26,7 +26,7 @@ class OpenUrlAction extends Action2 {
|
|
|
26
26
|
constructor() {
|
|
27
27
|
super({
|
|
28
28
|
id: 'workbench.action.url.openUrl',
|
|
29
|
-
title: ( localize2(
|
|
29
|
+
title: ( localize2(12707, 'Open URL')),
|
|
30
30
|
category: Categories.Developer,
|
|
31
31
|
f1: true
|
|
32
32
|
});
|
|
@@ -36,7 +36,7 @@ class OpenUrlAction extends Action2 {
|
|
|
36
36
|
const urlService = accessor.get(IURLService);
|
|
37
37
|
const storageService = accessor.get(IStorageService);
|
|
38
38
|
const value = storageService.get(OpenUrlAction.STORAGE_KEY, StorageScope.WORKSPACE, '');
|
|
39
|
-
return quickInputService.input({ prompt: ( localize(
|
|
39
|
+
return quickInputService.input({ prompt: ( localize(12708, "URL to open")), value }).then(input => {
|
|
40
40
|
if (input) {
|
|
41
41
|
const uri = ( URI.parse(input));
|
|
42
42
|
urlService.open(uri, { originalUrl: input });
|
|
@@ -67,7 +67,7 @@ configurationRegistry.registerConfiguration({
|
|
|
67
67
|
type: 'boolean',
|
|
68
68
|
default: false,
|
|
69
69
|
description: ( localize(
|
|
70
|
-
|
|
70
|
+
12709,
|
|
71
71
|
"When enabled, trusted domain prompts will appear when opening links in trusted workspaces."
|
|
72
72
|
))
|
|
73
73
|
}
|