@codingame/monaco-vscode-base-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/index.js +4 -1
- 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.d.ts +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 +18 -2
- package/vscode/src/vs/workbench/services/inlineCompletions/common/inlineCompletionsUnification.js +84 -8
- package/vscode/src/vs/workbench/services/label/common/labelService.js +15 -16
- package/vscode/src/vs/workbench/services/request/browser/requestService.js +1 -1
- package/vscode/src/vs/workbench/services/userActivity/common/userActivityService.d.ts +1 -1
- package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopySaveParticipant.d.ts +1 -1
- package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopySaveParticipant.js +2 -2
- package/vscode/src/vs/workbench/services/workingCopy/common/workingCopyFileService.d.ts +2 -2
package/index.js
CHANGED
|
@@ -35,6 +35,8 @@ import { WorkbenchEditorWorkerService } from './vscode/src/vs/workbench/contrib/
|
|
|
35
35
|
import { getEnvironmentOverride } from '@codingame/monaco-vscode-api/workbench';
|
|
36
36
|
import { IInlineCompletionsUnificationService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/inlineCompletions/common/inlineCompletionsUnification.service';
|
|
37
37
|
import { InlineCompletionsUnificationImpl } from './vscode/src/vs/workbench/services/inlineCompletions/common/inlineCompletionsUnification.js';
|
|
38
|
+
import { IMarkdownRendererService } from '@codingame/monaco-vscode-api/vscode/vs/platform/markdown/browser/markdownRenderer.service';
|
|
39
|
+
import { MarkdownRendererService } from '@codingame/monaco-vscode-api/vscode/vs/platform/markdown/browser/markdownRenderer';
|
|
38
40
|
|
|
39
41
|
let BrowserPathServiceOverride = class BrowserPathServiceOverride extends AbstractPathService {
|
|
40
42
|
constructor(remoteAgentService, environmentService, contextService) {
|
|
@@ -61,7 +63,8 @@ function getServiceOverride() {
|
|
|
61
63
|
[ITrustedDomainService.toString()]: new SyncDescriptor(TrustedDomainService, [], true),
|
|
62
64
|
[ILabelService.toString()]: new SyncDescriptor(LabelService, [], true),
|
|
63
65
|
[IEditorWorkerService.toString()]: new SyncDescriptor(WorkbenchEditorWorkerService, [], true),
|
|
64
|
-
[IInlineCompletionsUnificationService.toString()]: new SyncDescriptor(InlineCompletionsUnificationImpl, [], true)
|
|
66
|
+
[IInlineCompletionsUnificationService.toString()]: new SyncDescriptor(InlineCompletionsUnificationImpl, [], true),
|
|
67
|
+
[IMarkdownRendererService.toString()]: new SyncDescriptor(MarkdownRendererService, [], true)
|
|
65
68
|
};
|
|
66
69
|
}
|
|
67
70
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-base-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "23.0.1",
|
|
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-4bf376c2-03c7-58cb-8303-c67aeefa3d3d-common": "
|
|
21
|
-
"@codingame/monaco-vscode-60014c9d-b815-501d-83a9-4b08725c2ec2-common": "
|
|
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": "23.0.1",
|
|
19
|
+
"@codingame/monaco-vscode-23aade48-f094-5c08-9555-97fc9cca96c9-common": "23.0.1",
|
|
20
|
+
"@codingame/monaco-vscode-4bf376c2-03c7-58cb-8303-c67aeefa3d3d-common": "23.0.1",
|
|
21
|
+
"@codingame/monaco-vscode-60014c9d-b815-501d-83a9-4b08725c2ec2-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-d987325e-3e05-53aa-b9ff-6f97476f64db-common": "23.0.1"
|
|
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
|
+
13580,
|
|
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
|
}
|
|
@@ -10,7 +10,7 @@ export declare class DecorationsService implements IDecorationsService {
|
|
|
10
10
|
private readonly _store;
|
|
11
11
|
private readonly _onDidChangeDecorationsDelayed;
|
|
12
12
|
private readonly _onDidChangeDecorations;
|
|
13
|
-
onDidChangeDecorations: Event<IResourceDecorationChangeEvent>;
|
|
13
|
+
readonly onDidChangeDecorations: Event<IResourceDecorationChangeEvent>;
|
|
14
14
|
private readonly _provider;
|
|
15
15
|
private readonly _decorationStyles;
|
|
16
16
|
private readonly _data;
|
|
@@ -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(13619, "Contains emphasized items"));
|
|
165
165
|
}
|
|
166
166
|
return {
|
|
167
167
|
labelClassName,
|
package/vscode/src/vs/workbench/services/inlineCompletions/common/inlineCompletionsUnification.d.ts
CHANGED
|
@@ -1,23 +1,39 @@
|
|
|
1
|
+
import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
|
|
1
2
|
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
3
|
+
import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
2
4
|
import { RawContextKey } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey";
|
|
3
5
|
import { IContextKeyService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service";
|
|
6
|
+
import { IExtensionManagementService } from "@codingame/monaco-vscode-api/vscode/vs/platform/extensionManagement/common/extensionManagement.service";
|
|
7
|
+
import { IProductService } from "@codingame/monaco-vscode-api/vscode/vs/platform/product/common/productService.service";
|
|
4
8
|
import { IWorkbenchAssignmentService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/assignment/common/assignmentService.service";
|
|
9
|
+
import { IWorkbenchExtensionEnablementService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensionManagement/common/extensionManagement.service";
|
|
10
|
+
import { IExtensionService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions.service";
|
|
5
11
|
import { IInlineCompletionsUnificationService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/inlineCompletions/common/inlineCompletionsUnification.service";
|
|
6
12
|
export interface IInlineCompletionsUnificationState {
|
|
7
13
|
codeUnification: boolean;
|
|
8
14
|
modelUnification: boolean;
|
|
15
|
+
extensionUnification: boolean;
|
|
9
16
|
expAssignments: string[];
|
|
10
17
|
}
|
|
11
18
|
export declare const isRunningUnificationExperiment: RawContextKey<boolean>;
|
|
12
19
|
export declare class InlineCompletionsUnificationImpl extends Disposable implements IInlineCompletionsUnificationService {
|
|
13
20
|
private readonly _assignmentService;
|
|
14
21
|
private readonly _contextKeyService;
|
|
22
|
+
private readonly _configurationService;
|
|
23
|
+
private readonly _extensionEnablementService;
|
|
24
|
+
private readonly _extensionManagementService;
|
|
25
|
+
private readonly _extensionService;
|
|
15
26
|
readonly _serviceBrand: undefined;
|
|
16
27
|
private _state;
|
|
17
28
|
get state(): IInlineCompletionsUnificationState;
|
|
18
29
|
private isRunningUnificationExperiment;
|
|
19
30
|
private readonly _onDidStateChange;
|
|
20
|
-
readonly onDidStateChange:
|
|
21
|
-
|
|
31
|
+
readonly onDidStateChange: Event<void>;
|
|
32
|
+
private readonly _onDidChangeExtensionUnificationState;
|
|
33
|
+
private readonly _onDidChangeExtensionUnificationSetting;
|
|
34
|
+
private readonly _completionsExtensionId;
|
|
35
|
+
private readonly _chatExtensionId;
|
|
36
|
+
constructor(_assignmentService: IWorkbenchAssignmentService, _contextKeyService: IContextKeyService, _configurationService: IConfigurationService, _extensionEnablementService: IWorkbenchExtensionEnablementService, _extensionManagementService: IExtensionManagementService, _extensionService: IExtensionService, productService: IProductService);
|
|
22
37
|
private _update;
|
|
38
|
+
private _isExtensionUnificationActive;
|
|
23
39
|
}
|
package/vscode/src/vs/workbench/services/inlineCompletions/common/inlineCompletionsUnification.js
CHANGED
|
@@ -1,63 +1,139 @@
|
|
|
1
1
|
|
|
2
2
|
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
3
|
import { equals } from '@codingame/monaco-vscode-api/vscode/vs/base/common/arrays';
|
|
4
|
-
import { Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
4
|
+
import { Emitter, Event } 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 { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
6
7
|
import { RawContextKey } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey';
|
|
7
8
|
import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
9
|
+
import { IExtensionManagementService } from '@codingame/monaco-vscode-api/vscode/vs/platform/extensionManagement/common/extensionManagement.service';
|
|
10
|
+
import { ExtensionType } from '@codingame/monaco-vscode-api/vscode/vs/platform/extensions/common/extensions';
|
|
8
11
|
import '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/extensions';
|
|
12
|
+
import { IProductService } from '@codingame/monaco-vscode-api/vscode/vs/platform/product/common/productService.service';
|
|
9
13
|
import { IWorkbenchAssignmentService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/assignment/common/assignmentService.service';
|
|
14
|
+
import { EnablementState } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensionManagement/common/extensionManagement';
|
|
15
|
+
import { IWorkbenchExtensionEnablementService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensionManagement/common/extensionManagement.service';
|
|
16
|
+
import { IExtensionService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions.service';
|
|
10
17
|
import '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
11
18
|
|
|
12
19
|
const CODE_UNIFICATION_PREFIX = 'cmp-cht-';
|
|
20
|
+
const EXTENSION_UNIFICATION_PREFIX = 'cmp-ext-';
|
|
13
21
|
const CODE_UNIFICATION_FF = 'inlineCompletionsUnificationCode';
|
|
14
22
|
const MODEL_UNIFICATION_FF = 'inlineCompletionsUnificationModel';
|
|
15
23
|
const isRunningUnificationExperiment = ( new RawContextKey('isRunningUnificationExperiment', false));
|
|
24
|
+
const ExtensionUnificationSetting = 'chat.extensionUnification.enabled';
|
|
16
25
|
let InlineCompletionsUnificationImpl = class InlineCompletionsUnificationImpl extends Disposable {
|
|
17
26
|
get state() { return this._state; }
|
|
18
|
-
constructor(_assignmentService, _contextKeyService) {
|
|
27
|
+
constructor(_assignmentService, _contextKeyService, _configurationService, _extensionEnablementService, _extensionManagementService, _extensionService, productService) {
|
|
19
28
|
super();
|
|
20
29
|
this._assignmentService = _assignmentService;
|
|
21
30
|
this._contextKeyService = _contextKeyService;
|
|
22
|
-
this.
|
|
31
|
+
this._configurationService = _configurationService;
|
|
32
|
+
this._extensionEnablementService = _extensionEnablementService;
|
|
33
|
+
this._extensionManagementService = _extensionManagementService;
|
|
34
|
+
this._extensionService = _extensionService;
|
|
35
|
+
this._state = ( new InlineCompletionsUnificationState(false, false, false, []));
|
|
23
36
|
this._onDidStateChange = this._register(( new Emitter()));
|
|
24
37
|
this.onDidStateChange = this._onDidStateChange.event;
|
|
38
|
+
this._onDidChangeExtensionUnificationState = this._register(( new Emitter()));
|
|
39
|
+
this._onDidChangeExtensionUnificationSetting = this._register(( new Emitter()));
|
|
40
|
+
this._completionsExtensionId = productService.defaultChatAgent?.extensionId.toLowerCase();
|
|
41
|
+
this._chatExtensionId = productService.defaultChatAgent?.chatExtensionId.toLowerCase();
|
|
42
|
+
const relevantExtensions = [this._completionsExtensionId, this._chatExtensionId].filter((id) => !!id);
|
|
25
43
|
this.isRunningUnificationExperiment = isRunningUnificationExperiment.bindTo(this._contextKeyService);
|
|
44
|
+
this._assignmentService.addTelemetryAssignmentFilter({
|
|
45
|
+
exclude: (assignment) => assignment.startsWith(EXTENSION_UNIFICATION_PREFIX) && this._state.extensionUnification !== this._configurationService.getValue(ExtensionUnificationSetting),
|
|
46
|
+
onDidChange: Event.any(this._onDidChangeExtensionUnificationState.event, this._onDidChangeExtensionUnificationSetting.event)
|
|
47
|
+
});
|
|
48
|
+
this._register(this._extensionEnablementService.onEnablementChanged((extensions) => {
|
|
49
|
+
if (( extensions.some(ext => relevantExtensions.includes(ext.identifier.id.toLowerCase())))) {
|
|
50
|
+
this._update();
|
|
51
|
+
}
|
|
52
|
+
}));
|
|
53
|
+
this._register(this._configurationService.onDidChangeConfiguration(e => {
|
|
54
|
+
if (e.affectsConfiguration(ExtensionUnificationSetting)) {
|
|
55
|
+
this._update();
|
|
56
|
+
this._onDidChangeExtensionUnificationSetting.fire();
|
|
57
|
+
}
|
|
58
|
+
}));
|
|
59
|
+
this._register(this._extensionService.onDidChangeExtensions(({ added }) => {
|
|
60
|
+
if (( added.some(ext => relevantExtensions.includes(ext.identifier.value.toLowerCase())))) {
|
|
61
|
+
this._update();
|
|
62
|
+
}
|
|
63
|
+
}));
|
|
26
64
|
this._register(this._assignmentService.onDidRefetchAssignments(() => this._update()));
|
|
27
65
|
this._update();
|
|
28
66
|
}
|
|
29
67
|
async _update() {
|
|
30
|
-
const [codeUnificationFF, modelUnificationFF] = await Promise.all([
|
|
68
|
+
const [codeUnificationFF, modelUnificationFF, extensionUnificationEnabled] = await Promise.all([
|
|
31
69
|
this._assignmentService.getTreatment(CODE_UNIFICATION_FF),
|
|
32
70
|
this._assignmentService.getTreatment(MODEL_UNIFICATION_FF),
|
|
71
|
+
this._isExtensionUnificationActive()
|
|
33
72
|
]);
|
|
73
|
+
const extensionStatesMatchUnificationSetting = this._configurationService.getValue(ExtensionUnificationSetting) === extensionUnificationEnabled;
|
|
34
74
|
const currentExperiments = await this._assignmentService.getCurrentExperiments();
|
|
35
75
|
const newState = ( new InlineCompletionsUnificationState(
|
|
36
76
|
codeUnificationFF === true,
|
|
37
77
|
modelUnificationFF === true,
|
|
38
|
-
|
|
78
|
+
extensionUnificationEnabled,
|
|
79
|
+
currentExperiments?.filter(exp => exp.startsWith(CODE_UNIFICATION_PREFIX) || (extensionStatesMatchUnificationSetting && exp.startsWith(EXTENSION_UNIFICATION_PREFIX))) ?? []
|
|
39
80
|
));
|
|
40
81
|
if (this._state.equals(newState)) {
|
|
41
82
|
return;
|
|
42
83
|
}
|
|
84
|
+
const previousState = this._state;
|
|
43
85
|
this._state = newState;
|
|
44
|
-
this.isRunningUnificationExperiment.set(this._state.codeUnification || this._state.modelUnification);
|
|
86
|
+
this.isRunningUnificationExperiment.set(this._state.codeUnification || this._state.modelUnification || this._state.extensionUnification);
|
|
45
87
|
this._onDidStateChange.fire();
|
|
88
|
+
if (previousState.extensionUnification !== this._state.extensionUnification) {
|
|
89
|
+
this._onDidChangeExtensionUnificationState.fire();
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
async _isExtensionUnificationActive() {
|
|
93
|
+
if (!this._configurationService.getValue(ExtensionUnificationSetting)) {
|
|
94
|
+
return false;
|
|
95
|
+
}
|
|
96
|
+
if (!this._completionsExtensionId || !this._chatExtensionId) {
|
|
97
|
+
return false;
|
|
98
|
+
}
|
|
99
|
+
const [completionsExtension, chatExtension, installedExtensions] = await Promise.all([
|
|
100
|
+
this._extensionService.getExtension(this._completionsExtensionId),
|
|
101
|
+
this._extensionService.getExtension(this._chatExtensionId),
|
|
102
|
+
this._extensionManagementService.getInstalled(ExtensionType.User)
|
|
103
|
+
]);
|
|
104
|
+
if (!chatExtension || completionsExtension) {
|
|
105
|
+
return false;
|
|
106
|
+
}
|
|
107
|
+
const completionExtensionInstalled = installedExtensions.filter(ext => ext.identifier.id.toLowerCase() === this._completionsExtensionId);
|
|
108
|
+
if (completionExtensionInstalled.length === 0) {
|
|
109
|
+
return false;
|
|
110
|
+
}
|
|
111
|
+
const completionsExtensionDisabledByUnification = ( completionExtensionInstalled.some(
|
|
112
|
+
ext => this._extensionEnablementService.getEnablementState(ext) === EnablementState.DisabledByUnification
|
|
113
|
+
));
|
|
114
|
+
return !!chatExtension && completionsExtensionDisabledByUnification;
|
|
46
115
|
}
|
|
47
116
|
};
|
|
48
117
|
InlineCompletionsUnificationImpl = ( __decorate([
|
|
49
118
|
( __param(0, IWorkbenchAssignmentService)),
|
|
50
|
-
( __param(1, IContextKeyService))
|
|
119
|
+
( __param(1, IContextKeyService)),
|
|
120
|
+
( __param(2, IConfigurationService)),
|
|
121
|
+
( __param(3, IWorkbenchExtensionEnablementService)),
|
|
122
|
+
( __param(4, IExtensionManagementService)),
|
|
123
|
+
( __param(5, IExtensionService)),
|
|
124
|
+
( __param(6, IProductService))
|
|
51
125
|
], InlineCompletionsUnificationImpl));
|
|
52
126
|
class InlineCompletionsUnificationState {
|
|
53
|
-
constructor(codeUnification, modelUnification, expAssignments) {
|
|
127
|
+
constructor(codeUnification, modelUnification, extensionUnification, expAssignments) {
|
|
54
128
|
this.codeUnification = codeUnification;
|
|
55
129
|
this.modelUnification = modelUnification;
|
|
130
|
+
this.extensionUnification = extensionUnification;
|
|
56
131
|
this.expAssignments = expAssignments;
|
|
57
132
|
}
|
|
58
133
|
equals(other) {
|
|
59
134
|
return this.codeUnification === other.codeUnification
|
|
60
135
|
&& this.modelUnification === other.modelUnification
|
|
136
|
+
&& this.extensionUnification === other.extensionUnification
|
|
61
137
|
&& equals(this.expAssignments, other.expAssignments);
|
|
62
138
|
}
|
|
63
139
|
}
|
|
@@ -31,7 +31,7 @@ import { Memento } from '@codingame/monaco-vscode-60014c9d-b815-501d-83a9-4b0872
|
|
|
31
31
|
const resourceLabelFormattersExtPoint = ExtensionsRegistry.registerExtensionPoint({
|
|
32
32
|
extensionPoint: 'resourceLabelFormatters',
|
|
33
33
|
jsonSchema: {
|
|
34
|
-
description: ( localize(
|
|
34
|
+
description: ( localize(13923, '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
|
+
13924,
|
|
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
|
+
13925,
|
|
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(13926, "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
|
+
13927,
|
|
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
|
+
13928,
|
|
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
|
+
13929,
|
|
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
|
+
13930,
|
|
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(13931, "Suffix appended to the workspace label."))
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
}
|
|
@@ -163,9 +163,8 @@ let LabelService = class LabelService extends Disposable {
|
|
|
163
163
|
if (!formatter.authority) {
|
|
164
164
|
continue;
|
|
165
165
|
}
|
|
166
|
-
if (match(formatter.authority
|
|
167
|
-
(!bestResult ||
|
|
168
|
-
!bestResult.authority ||
|
|
166
|
+
if (match(formatter.authority, resource.authority, { ignoreCase: true }) &&
|
|
167
|
+
(!bestResult?.authority ||
|
|
169
168
|
formatter.authority.length > bestResult.authority.length ||
|
|
170
169
|
((formatter.authority.length === bestResult.authority.length) && formatter.priority))) {
|
|
171
170
|
bestResult = formatter;
|
|
@@ -268,10 +267,10 @@ let LabelService = class LabelService extends Disposable {
|
|
|
268
267
|
}
|
|
269
268
|
doGetWorkspaceLabel(workspaceUri, options) {
|
|
270
269
|
if (isUntitledWorkspace(workspaceUri, this.environmentService)) {
|
|
271
|
-
return localize(
|
|
270
|
+
return localize(13932, "Untitled (Workspace)");
|
|
272
271
|
}
|
|
273
272
|
if (isTemporaryWorkspace(workspaceUri)) {
|
|
274
|
-
return localize(
|
|
273
|
+
return localize(13933, "Workspace");
|
|
275
274
|
}
|
|
276
275
|
let filename = basename(workspaceUri);
|
|
277
276
|
if (filename.endsWith(WORKSPACE_EXTENSION)) {
|
|
@@ -284,14 +283,14 @@ let LabelService = class LabelService extends Disposable {
|
|
|
284
283
|
break;
|
|
285
284
|
case Verbosity.LONG:
|
|
286
285
|
label = ( localize(
|
|
287
|
-
|
|
286
|
+
13934,
|
|
288
287
|
"{0} (Workspace)",
|
|
289
288
|
this.getUriLabel(joinPath(dirname(workspaceUri), filename))
|
|
290
289
|
));
|
|
291
290
|
break;
|
|
292
291
|
case Verbosity.MEDIUM:
|
|
293
292
|
default:
|
|
294
|
-
label = ( localize(
|
|
293
|
+
label = ( localize(13935, "{0} (Workspace)", filename));
|
|
295
294
|
break;
|
|
296
295
|
}
|
|
297
296
|
if (options?.verbose === Verbosity.SHORT) {
|
|
@@ -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(14041, "Network")), group: windowLogGroup });
|
|
17
17
|
const logService = ( new LogService(logger));
|
|
18
18
|
super(logService);
|
|
19
19
|
this.remoteAgentService = remoteAgentService;
|
|
@@ -24,7 +24,7 @@ export declare class UserActivityService extends Disposable implements IUserActi
|
|
|
24
24
|
*/
|
|
25
25
|
isActive: boolean;
|
|
26
26
|
/** @inheritdoc */
|
|
27
|
-
onDidChangeIsActive: Event<boolean>;
|
|
27
|
+
readonly onDidChangeIsActive: Event<boolean>;
|
|
28
28
|
constructor(instantiationService: IInstantiationService);
|
|
29
29
|
/** @inheritdoc */
|
|
30
30
|
markActive(opts?: IMarkActiveOptions): IDisposable;
|
|
@@ -4,7 +4,7 @@ import { IProgress, IProgressStep } from "@codingame/monaco-vscode-api/vscode/vs
|
|
|
4
4
|
import { IProgressService } from "@codingame/monaco-vscode-api/vscode/vs/platform/progress/common/progress.service";
|
|
5
5
|
import { IDisposable, Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
6
6
|
import { IStoredFileWorkingCopySaveParticipant, IStoredFileWorkingCopySaveParticipantContext } from "./workingCopyFileService.js";
|
|
7
|
-
import { IStoredFileWorkingCopy, IStoredFileWorkingCopyModel } from "@codingame/monaco-vscode-
|
|
7
|
+
import { IStoredFileWorkingCopy, IStoredFileWorkingCopyModel } from "@codingame/monaco-vscode-6f931a91-88ea-5232-897f-a17ec3929ba5-common/vscode/vs/workbench/services/workingCopy/common/storedFileWorkingCopy";
|
|
8
8
|
export declare class StoredFileWorkingCopySaveParticipant extends Disposable {
|
|
9
9
|
private readonly logService;
|
|
10
10
|
private readonly progressService;
|
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(14431, "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(14432, "Skip")),
|
|
37
37
|
delay: workingCopy.isDirty() ? 5000 : 3000
|
|
38
38
|
}, async (progress) => {
|
|
39
39
|
const participants = Array.from(this.saveParticipants).sort((a, b) => {
|
|
@@ -6,12 +6,12 @@ import { FileOperation, IFileStatWithMetadata } from "@codingame/monaco-vscode-a
|
|
|
6
6
|
import { IFileService } from "@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service";
|
|
7
7
|
import { CancellationToken } from "@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation";
|
|
8
8
|
import { IWorkingCopyService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/workingCopy/common/workingCopyService.service";
|
|
9
|
-
import { IWorkingCopy } from "@codingame/monaco-vscode-
|
|
9
|
+
import { IWorkingCopy } from "@codingame/monaco-vscode-d392702e-4ad7-5904-a915-f6063284cf14-common/vscode/vs/workbench/services/workingCopy/common/workingCopy";
|
|
10
10
|
import { IUriIdentityService } from "@codingame/monaco-vscode-api/vscode/vs/platform/uriIdentity/common/uriIdentity.service";
|
|
11
11
|
import { VSBuffer, VSBufferReadable, VSBufferReadableStream } from "@codingame/monaco-vscode-api/vscode/vs/base/common/buffer";
|
|
12
12
|
import { SaveReason } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor";
|
|
13
13
|
import { IProgress, IProgressStep } from "@codingame/monaco-vscode-api/vscode/vs/platform/progress/common/progress";
|
|
14
|
-
import { IStoredFileWorkingCopy, IStoredFileWorkingCopyModel } from "@codingame/monaco-vscode-
|
|
14
|
+
import { IStoredFileWorkingCopy, IStoredFileWorkingCopyModel } from "@codingame/monaco-vscode-6f931a91-88ea-5232-897f-a17ec3929ba5-common/vscode/vs/workbench/services/workingCopy/common/storedFileWorkingCopy";
|
|
15
15
|
import { IWorkingCopyFileService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/workingCopy/common/workingCopyFileService.service";
|
|
16
16
|
export interface SourceTargetPair {
|
|
17
17
|
/**
|