@codingame/monaco-vscode-base-service-override 21.6.0 → 22.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 +8 -8
- package/vscode/src/vs/workbench/services/configuration/common/jsonEditingService.js +1 -1
- package/vscode/src/vs/workbench/services/decorations/browser/decorationsService.js +1 -1
- package/vscode/src/vs/workbench/services/inlineCompletions/common/inlineCompletionsUnification.d.ts +6 -1
- package/vscode/src/vs/workbench/services/inlineCompletions/common/inlineCompletionsUnification.js +10 -3
- package/vscode/src/vs/workbench/services/label/common/labelService.d.ts +1 -0
- package/vscode/src/vs/workbench/services/label/common/labelService.js +21 -17
- package/vscode/src/vs/workbench/services/request/browser/requestService.js +1 -1
- package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopySaveParticipant.js +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-base-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "22.0.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor - base service-override",
|
|
6
6
|
"keywords": [],
|
|
@@ -15,13 +15,13 @@
|
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codingame/monaco-vscode-158b9837-fc78-5d9c-86f5-9134e4358643-common": "
|
|
19
|
-
"@codingame/monaco-vscode-23aade48-f094-5c08-9555-97fc9cca96c9-common": "
|
|
20
|
-
"@codingame/monaco-vscode-
|
|
21
|
-
"@codingame/monaco-vscode-
|
|
22
|
-
"@codingame/monaco-vscode-9a1a5840-af83-5d07-a156-ba32a36c5c4b-common": "
|
|
23
|
-
"@codingame/monaco-vscode-api": "
|
|
24
|
-
"@codingame/monaco-vscode-d987325e-3e05-53aa-b9ff-6f97476f64db-common": "
|
|
18
|
+
"@codingame/monaco-vscode-158b9837-fc78-5d9c-86f5-9134e4358643-common": "22.0.0",
|
|
19
|
+
"@codingame/monaco-vscode-23aade48-f094-5c08-9555-97fc9cca96c9-common": "22.0.0",
|
|
20
|
+
"@codingame/monaco-vscode-4bf376c2-03c7-58cb-8303-c67aeefa3d3d-common": "22.0.0",
|
|
21
|
+
"@codingame/monaco-vscode-60014c9d-b815-501d-83a9-4b08725c2ec2-common": "22.0.0",
|
|
22
|
+
"@codingame/monaco-vscode-9a1a5840-af83-5d07-a156-ba32a36c5c4b-common": "22.0.0",
|
|
23
|
+
"@codingame/monaco-vscode-api": "22.0.0",
|
|
24
|
+
"@codingame/monaco-vscode-d987325e-3e05-53aa-b9ff-6f97476f64db-common": "22.0.0"
|
|
25
25
|
},
|
|
26
26
|
"main": "index.js",
|
|
27
27
|
"module": "index.js",
|
|
@@ -117,7 +117,7 @@ let JSONEditingService = class JSONEditingService {
|
|
|
117
117
|
switch (error) {
|
|
118
118
|
case JSONEditingErrorCode.ERROR_INVALID_FILE: {
|
|
119
119
|
return localize(
|
|
120
|
-
|
|
120
|
+
13265,
|
|
121
121
|
"Unable to write into the file. Please open the file to correct errors/warnings in the file and try again."
|
|
122
122
|
);
|
|
123
123
|
}
|
|
@@ -161,7 +161,7 @@ class DecorationStyles {
|
|
|
161
161
|
const strikethrough = ( data.some(d => d.strikethrough));
|
|
162
162
|
if (onlyChildren) {
|
|
163
163
|
badgeClassName = rule.bubbleBadgeClassName;
|
|
164
|
-
tooltip = ( localize(
|
|
164
|
+
tooltip = ( localize(13304, "Contains emphasized items"));
|
|
165
165
|
}
|
|
166
166
|
return {
|
|
167
167
|
labelClassName,
|
package/vscode/src/vs/workbench/services/inlineCompletions/common/inlineCompletionsUnification.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
|
+
import { RawContextKey } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey";
|
|
3
|
+
import { IContextKeyService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service";
|
|
2
4
|
import { IWorkbenchAssignmentService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/assignment/common/assignmentService.service";
|
|
3
5
|
import { IInlineCompletionsUnificationService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/inlineCompletions/common/inlineCompletionsUnification.service";
|
|
4
6
|
export interface IInlineCompletionsUnificationState {
|
|
@@ -6,13 +8,16 @@ export interface IInlineCompletionsUnificationState {
|
|
|
6
8
|
modelUnification: boolean;
|
|
7
9
|
expAssignments: string[];
|
|
8
10
|
}
|
|
11
|
+
export declare const isRunningUnificationExperiment: RawContextKey<boolean>;
|
|
9
12
|
export declare class InlineCompletionsUnificationImpl extends Disposable implements IInlineCompletionsUnificationService {
|
|
10
13
|
private readonly _assignmentService;
|
|
14
|
+
private readonly _contextKeyService;
|
|
11
15
|
readonly _serviceBrand: undefined;
|
|
12
16
|
private _state;
|
|
13
17
|
get state(): IInlineCompletionsUnificationState;
|
|
18
|
+
private isRunningUnificationExperiment;
|
|
14
19
|
private readonly _onDidStateChange;
|
|
15
20
|
readonly onDidStateChange: import("@codingame/monaco-vscode-api/vscode/vs/base/common/event").Event<void>;
|
|
16
|
-
constructor(_assignmentService: IWorkbenchAssignmentService);
|
|
21
|
+
constructor(_assignmentService: IWorkbenchAssignmentService, _contextKeyService: IContextKeyService);
|
|
17
22
|
private _update;
|
|
18
23
|
}
|
package/vscode/src/vs/workbench/services/inlineCompletions/common/inlineCompletionsUnification.js
CHANGED
|
@@ -3,6 +3,8 @@ import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib
|
|
|
3
3
|
import { equals } from '@codingame/monaco-vscode-api/vscode/vs/base/common/arrays';
|
|
4
4
|
import { Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
5
5
|
import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
6
|
+
import { RawContextKey } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey';
|
|
7
|
+
import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
6
8
|
import '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/extensions';
|
|
7
9
|
import { IWorkbenchAssignmentService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/assignment/common/assignmentService.service';
|
|
8
10
|
import '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
@@ -10,14 +12,17 @@ import '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/ins
|
|
|
10
12
|
const CODE_UNIFICATION_PREFIX = 'cmp-cht-';
|
|
11
13
|
const CODE_UNIFICATION_FF = 'inlineCompletionsUnificationCode';
|
|
12
14
|
const MODEL_UNIFICATION_FF = 'inlineCompletionsUnificationModel';
|
|
15
|
+
const isRunningUnificationExperiment = ( new RawContextKey('isRunningUnificationExperiment', false));
|
|
13
16
|
let InlineCompletionsUnificationImpl = class InlineCompletionsUnificationImpl extends Disposable {
|
|
14
17
|
get state() { return this._state; }
|
|
15
|
-
constructor(_assignmentService) {
|
|
18
|
+
constructor(_assignmentService, _contextKeyService) {
|
|
16
19
|
super();
|
|
17
20
|
this._assignmentService = _assignmentService;
|
|
21
|
+
this._contextKeyService = _contextKeyService;
|
|
18
22
|
this._state = ( new InlineCompletionsUnificationState(false, false, []));
|
|
19
23
|
this._onDidStateChange = this._register(( new Emitter()));
|
|
20
24
|
this.onDidStateChange = this._onDidStateChange.event;
|
|
25
|
+
this.isRunningUnificationExperiment = isRunningUnificationExperiment.bindTo(this._contextKeyService);
|
|
21
26
|
this._register(this._assignmentService.onDidRefetchAssignments(() => this._update()));
|
|
22
27
|
this._update();
|
|
23
28
|
}
|
|
@@ -36,11 +41,13 @@ let InlineCompletionsUnificationImpl = class InlineCompletionsUnificationImpl ex
|
|
|
36
41
|
return;
|
|
37
42
|
}
|
|
38
43
|
this._state = newState;
|
|
44
|
+
this.isRunningUnificationExperiment.set(this._state.codeUnification || this._state.modelUnification);
|
|
39
45
|
this._onDidStateChange.fire();
|
|
40
46
|
}
|
|
41
47
|
};
|
|
42
48
|
InlineCompletionsUnificationImpl = ( __decorate([
|
|
43
|
-
( __param(0, IWorkbenchAssignmentService))
|
|
49
|
+
( __param(0, IWorkbenchAssignmentService)),
|
|
50
|
+
( __param(1, IContextKeyService))
|
|
44
51
|
], InlineCompletionsUnificationImpl));
|
|
45
52
|
class InlineCompletionsUnificationState {
|
|
46
53
|
constructor(codeUnification, modelUnification, expAssignments) {
|
|
@@ -55,4 +62,4 @@ class InlineCompletionsUnificationState {
|
|
|
55
62
|
}
|
|
56
63
|
}
|
|
57
64
|
|
|
58
|
-
export { InlineCompletionsUnificationImpl };
|
|
65
|
+
export { InlineCompletionsUnificationImpl, isRunningUnificationExperiment };
|
|
@@ -44,5 +44,6 @@ export declare class LabelService extends Disposable implements ILabelService {
|
|
|
44
44
|
registerCachedFormatter(formatter: ResourceLabelFormatter): IDisposable;
|
|
45
45
|
registerFormatter(formatter: ResourceLabelFormatter): IDisposable;
|
|
46
46
|
private formatUri;
|
|
47
|
+
private adjustPathSeparators;
|
|
47
48
|
private appendWorkspaceSuffix;
|
|
48
49
|
}
|
|
@@ -26,12 +26,12 @@ import { IRemoteAgentService } from '@codingame/monaco-vscode-api/vscode/vs/work
|
|
|
26
26
|
import { Schemas } from '@codingame/monaco-vscode-api/vscode/vs/base/common/network';
|
|
27
27
|
import { StorageScope, StorageTarget } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage';
|
|
28
28
|
import { IStorageService } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service';
|
|
29
|
-
import { Memento } from '@codingame/monaco-vscode-
|
|
29
|
+
import { Memento } from '@codingame/monaco-vscode-60014c9d-b815-501d-83a9-4b08725c2ec2-common/vscode/vs/workbench/common/memento';
|
|
30
30
|
|
|
31
31
|
const resourceLabelFormattersExtPoint = ExtensionsRegistry.registerExtensionPoint({
|
|
32
32
|
extensionPoint: 'resourceLabelFormatters',
|
|
33
33
|
jsonSchema: {
|
|
34
|
-
description: ( localize(
|
|
34
|
+
description: ( localize(13607, 'Contributes resource label formatting rules.')),
|
|
35
35
|
type: 'array',
|
|
36
36
|
items: {
|
|
37
37
|
type: 'object',
|
|
@@ -40,52 +40,52 @@ const resourceLabelFormattersExtPoint = ExtensionsRegistry.registerExtensionPoin
|
|
|
40
40
|
scheme: {
|
|
41
41
|
type: 'string',
|
|
42
42
|
description: ( localize(
|
|
43
|
-
|
|
43
|
+
13608,
|
|
44
44
|
'URI scheme on which to match the formatter on. For example "file". Simple glob patterns are supported.'
|
|
45
45
|
)),
|
|
46
46
|
},
|
|
47
47
|
authority: {
|
|
48
48
|
type: 'string',
|
|
49
49
|
description: ( localize(
|
|
50
|
-
|
|
50
|
+
13609,
|
|
51
51
|
'URI authority on which to match the formatter on. Simple glob patterns are supported.'
|
|
52
52
|
)),
|
|
53
53
|
},
|
|
54
54
|
formatting: {
|
|
55
|
-
description: ( localize(
|
|
55
|
+
description: ( localize(13610, "Rules for formatting uri resource labels.")),
|
|
56
56
|
type: 'object',
|
|
57
57
|
properties: {
|
|
58
58
|
label: {
|
|
59
59
|
type: 'string',
|
|
60
60
|
description: ( localize(
|
|
61
|
-
|
|
61
|
+
13611,
|
|
62
62
|
"Label rules to display. For example: myLabel:/${path}. ${path}, ${scheme}, ${authority} and ${authoritySuffix} are supported as variables."
|
|
63
63
|
))
|
|
64
64
|
},
|
|
65
65
|
separator: {
|
|
66
66
|
type: 'string',
|
|
67
67
|
description: ( localize(
|
|
68
|
-
|
|
68
|
+
13612,
|
|
69
69
|
"Separator to be used in the uri label display. '/' or '\' as an example."
|
|
70
70
|
))
|
|
71
71
|
},
|
|
72
72
|
stripPathStartingSeparator: {
|
|
73
73
|
type: 'boolean',
|
|
74
74
|
description: ( localize(
|
|
75
|
-
|
|
75
|
+
13613,
|
|
76
76
|
"Controls whether `${path}` substitutions should have starting separator characters stripped."
|
|
77
77
|
))
|
|
78
78
|
},
|
|
79
79
|
tildify: {
|
|
80
80
|
type: 'boolean',
|
|
81
81
|
description: ( localize(
|
|
82
|
-
|
|
82
|
+
13614,
|
|
83
83
|
"Controls if the start of the uri label should be tildified when possible."
|
|
84
84
|
))
|
|
85
85
|
},
|
|
86
86
|
workspaceSuffix: {
|
|
87
87
|
type: 'string',
|
|
88
|
-
description: ( localize(
|
|
88
|
+
description: ( localize(13615, "Suffix appended to the workspace label."))
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
}
|
|
@@ -93,7 +93,8 @@ const resourceLabelFormattersExtPoint = ExtensionsRegistry.registerExtensionPoin
|
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
95
|
});
|
|
96
|
-
const
|
|
96
|
+
const posixPathSeparatorRegexp = /\//g;
|
|
97
|
+
const winPathSeparatorRegexp = /[\\\/]/g;
|
|
97
98
|
const labelMatchingRegexp = /\$\{(scheme|authoritySuffix|authority|path|(query)\.(.+?))\}/g;
|
|
98
99
|
function hasDriveLetterIgnorePlatform(path) {
|
|
99
100
|
return !!(path && path[2] === ':');
|
|
@@ -180,7 +181,7 @@ let LabelService = class LabelService extends Disposable {
|
|
|
180
181
|
}
|
|
181
182
|
let label = this.doGetUriLabel(resource, formatting, options);
|
|
182
183
|
if (!formatting && options.separator) {
|
|
183
|
-
label =
|
|
184
|
+
label = this.adjustPathSeparators(label, options.separator);
|
|
184
185
|
}
|
|
185
186
|
if (options.appendWorkspaceSuffix && formatting?.workspaceSuffix) {
|
|
186
187
|
label = this.appendWorkspaceSuffix(label, resource);
|
|
@@ -267,10 +268,10 @@ let LabelService = class LabelService extends Disposable {
|
|
|
267
268
|
}
|
|
268
269
|
doGetWorkspaceLabel(workspaceUri, options) {
|
|
269
270
|
if (isUntitledWorkspace(workspaceUri, this.environmentService)) {
|
|
270
|
-
return localize(
|
|
271
|
+
return localize(13616, "Untitled (Workspace)");
|
|
271
272
|
}
|
|
272
273
|
if (isTemporaryWorkspace(workspaceUri)) {
|
|
273
|
-
return localize(
|
|
274
|
+
return localize(13617, "Workspace");
|
|
274
275
|
}
|
|
275
276
|
let filename = basename(workspaceUri);
|
|
276
277
|
if (filename.endsWith(WORKSPACE_EXTENSION)) {
|
|
@@ -283,14 +284,14 @@ let LabelService = class LabelService extends Disposable {
|
|
|
283
284
|
break;
|
|
284
285
|
case Verbosity.LONG:
|
|
285
286
|
label = ( localize(
|
|
286
|
-
|
|
287
|
+
13618,
|
|
287
288
|
"{0} (Workspace)",
|
|
288
289
|
this.getUriLabel(joinPath(dirname(workspaceUri), filename))
|
|
289
290
|
));
|
|
290
291
|
break;
|
|
291
292
|
case Verbosity.MEDIUM:
|
|
292
293
|
default:
|
|
293
|
-
label = ( localize(
|
|
294
|
+
label = ( localize(13619, "{0} (Workspace)", filename));
|
|
294
295
|
break;
|
|
295
296
|
}
|
|
296
297
|
if (options?.verbose === Verbosity.SHORT) {
|
|
@@ -393,7 +394,10 @@ let LabelService = class LabelService extends Disposable {
|
|
|
393
394
|
if (formatting.authorityPrefix && resource.authority) {
|
|
394
395
|
label = formatting.authorityPrefix + label;
|
|
395
396
|
}
|
|
396
|
-
return
|
|
397
|
+
return this.adjustPathSeparators(label, formatting.separator);
|
|
398
|
+
}
|
|
399
|
+
adjustPathSeparators(label, separator) {
|
|
400
|
+
return label.replace(this.os === OperatingSystem.Windows ? winPathSeparatorRegexp : posixPathSeparatorRegexp, separator);
|
|
397
401
|
}
|
|
398
402
|
appendWorkspaceSuffix(label, uri) {
|
|
399
403
|
const formatting = this.findFormatting(uri);
|
|
@@ -13,7 +13,7 @@ import { windowLogGroup } from '@codingame/monaco-vscode-api/vscode/vs/workbench
|
|
|
13
13
|
|
|
14
14
|
let BrowserRequestService = class BrowserRequestService extends AbstractRequestService {
|
|
15
15
|
constructor(remoteAgentService, configurationService, loggerService) {
|
|
16
|
-
const logger = loggerService.createLogger(`network`, { name: ( localize(
|
|
16
|
+
const logger = loggerService.createLogger(`network`, { name: ( localize(13725, "Network")), group: windowLogGroup });
|
|
17
17
|
const logService = ( new LogService(logger));
|
|
18
18
|
super(logService);
|
|
19
19
|
this.remoteAgentService = remoteAgentService;
|
package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopySaveParticipant.js
CHANGED
|
@@ -27,13 +27,13 @@ let StoredFileWorkingCopySaveParticipant = class StoredFileWorkingCopySavePartic
|
|
|
27
27
|
const cts = ( new CancellationTokenSource(token));
|
|
28
28
|
workingCopy.model?.pushStackElement();
|
|
29
29
|
progress.report({
|
|
30
|
-
message: ( localize(
|
|
30
|
+
message: ( localize(14115, "Running Code Actions and Formatters..."))
|
|
31
31
|
});
|
|
32
32
|
let bubbleCancel = false;
|
|
33
33
|
await this.progressService.withProgress({
|
|
34
34
|
priority: NotificationPriority.URGENT,
|
|
35
35
|
location: ProgressLocation.Notification,
|
|
36
|
-
cancellable: ( localize(
|
|
36
|
+
cancellable: ( localize(14116, "Skip")),
|
|
37
37
|
delay: workingCopy.isDirty() ? 5000 : 3000
|
|
38
38
|
}, async (progress) => {
|
|
39
39
|
const participants = Array.from(this.saveParticipants).sort((a, b) => {
|