@codingame/monaco-vscode-extensions-service-override 37.6.0 → 38.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 +3 -3
- package/service-override/tools/missingMainThreadCustomers.js +4 -0
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagementCLI.js +29 -29
- package/vscode/src/vs/workbench/api/browser/mainThreadAuthentication.d.ts +3 -19
- package/vscode/src/vs/workbench/api/browser/mainThreadAuthentication.js +133 -75
- package/vscode/src/vs/workbench/api/browser/mainThreadCLICommands.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadComments.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadCustomEditors.d.ts +13 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadCustomEditors.js +108 -14
- package/vscode/src/vs/workbench/api/browser/mainThreadCustomTextEditorNavigation.d.ts +29 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadCustomTextEditorNavigation.js +94 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDataChannels.js +6 -6
- package/vscode/src/vs/workbench/api/browser/mainThreadDebugService.js +8 -16
- package/vscode/src/vs/workbench/api/browser/mainThreadDocumentsAndEditors.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadDocumentsAndEditors.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadEditSessionIdentityParticipant.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadEditorTabs.js +3 -5
- package/vscode/src/vs/workbench/api/browser/mainThreadExtensionService.js +11 -11
- package/vscode/src/vs/workbench/api/browser/mainThreadFileSystemEventService.js +22 -20
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageFeatures.js +10 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadMessageService.js +13 -7
- package/vscode/src/vs/workbench/api/browser/mainThreadOutputService.js +3 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadProgress.d.ts +3 -4
- package/vscode/src/vs/workbench/api/browser/mainThreadProgress.js +13 -6
- package/vscode/src/vs/workbench/api/browser/mainThreadSCM.js +7 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadSaveParticipant.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadShare.d.ts +0 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadShare.js +4 -9
- package/vscode/src/vs/workbench/api/browser/mainThreadTask.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadTerminalService.js +6 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadTerminalShellIntegration.js +13 -18
- package/vscode/src/vs/workbench/api/browser/mainThreadTunnelService.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadUriOpeners.js +4 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviews.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadWorkspace.js +5 -5
- package/vscode/src/vs/workbench/contrib/customEditor/common/customTextEditorModel.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/customEditor/common/customTextEditorModel.js +4 -1
- package/vscode/src/vs/workbench/services/extensionManagement/browser/extensionBisect.js +23 -23
- package/vscode/src/vs/workbench/services/extensionManagement/browser/webExtensionsScannerService.js +2 -2
- package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.js +19 -13
- package/vscode/src/vs/workbench/services/extensions/common/extensionHostManager.js +1 -1
- package/vscode/src/vs/workbench/services/extensions/common/extensionsProposedApi.js +1 -1
- package/vscode/src/vs/workbench/services/extensions/common/extensionsUtil.js +4 -4
- package/vscode/src/vs/workbench/services/themes/browser/cssExtensionPoint.js +5 -5
|
@@ -10,6 +10,7 @@ import { IWorkingCopyFileService } from '@codingame/monaco-vscode-api/vscode/vs/
|
|
|
10
10
|
import { IBulkEditService } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/services/bulkEditService.service';
|
|
11
11
|
import { ProgressLocation } from '@codingame/monaco-vscode-api/vscode/vs/platform/progress/common/progress';
|
|
12
12
|
import { IProgressService } from '@codingame/monaco-vscode-api/vscode/vs/platform/progress/common/progress.service';
|
|
13
|
+
import { NotificationTelemetryId } from '@codingame/monaco-vscode-api/vscode/vs/platform/notification/common/notificationTelemetry';
|
|
13
14
|
import { raceCancellation } from '@codingame/monaco-vscode-api/vscode/vs/base/common/async';
|
|
14
15
|
import { CancellationTokenSource } from '@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation';
|
|
15
16
|
import { IDialogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service';
|
|
@@ -65,6 +66,7 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
|
|
|
65
66
|
const cts = ( new CancellationTokenSource(token));
|
|
66
67
|
const timer = setTimeout(() => cts.cancel(), timeout);
|
|
67
68
|
const data = await progressService.withProgress({
|
|
69
|
+
telemetry: NotificationTelemetryId.FileOperationParticipants,
|
|
68
70
|
location: ProgressLocation.Notification,
|
|
69
71
|
title: this._progressLabel(operation),
|
|
70
72
|
cancellable: true,
|
|
@@ -94,25 +96,25 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
|
|
|
94
96
|
if (data.extensionNames.length === 1) {
|
|
95
97
|
if (operation === FileOperation.CREATE) {
|
|
96
98
|
message = ( localize(
|
|
97
|
-
|
|
99
|
+
6407,
|
|
98
100
|
"Extension '{0}' wants to make refactoring changes with this file creation",
|
|
99
101
|
data.extensionNames[0]
|
|
100
102
|
));
|
|
101
103
|
} else if (operation === FileOperation.COPY) {
|
|
102
104
|
message = ( localize(
|
|
103
|
-
|
|
105
|
+
6408,
|
|
104
106
|
"Extension '{0}' wants to make refactoring changes with this file copy",
|
|
105
107
|
data.extensionNames[0]
|
|
106
108
|
));
|
|
107
109
|
} else if (operation === FileOperation.MOVE) {
|
|
108
110
|
message = ( localize(
|
|
109
|
-
|
|
111
|
+
6409,
|
|
110
112
|
"Extension '{0}' wants to make refactoring changes with this file move",
|
|
111
113
|
data.extensionNames[0]
|
|
112
114
|
));
|
|
113
115
|
} else {
|
|
114
116
|
message = ( localize(
|
|
115
|
-
|
|
117
|
+
6410,
|
|
116
118
|
"Extension '{0}' wants to make refactoring changes with this file deletion",
|
|
117
119
|
data.extensionNames[0]
|
|
118
120
|
));
|
|
@@ -120,25 +122,25 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
|
|
|
120
122
|
} else {
|
|
121
123
|
if (operation === FileOperation.CREATE) {
|
|
122
124
|
message = ( localize(
|
|
123
|
-
|
|
125
|
+
6411,
|
|
124
126
|
"{0} extensions want to make refactoring changes with this file creation",
|
|
125
127
|
data.extensionNames.length
|
|
126
128
|
));
|
|
127
129
|
} else if (operation === FileOperation.COPY) {
|
|
128
130
|
message = ( localize(
|
|
129
|
-
|
|
131
|
+
6412,
|
|
130
132
|
"{0} extensions want to make refactoring changes with this file copy",
|
|
131
133
|
data.extensionNames.length
|
|
132
134
|
));
|
|
133
135
|
} else if (operation === FileOperation.MOVE) {
|
|
134
136
|
message = ( localize(
|
|
135
|
-
|
|
137
|
+
6413,
|
|
136
138
|
"{0} extensions want to make refactoring changes with this file move",
|
|
137
139
|
data.extensionNames.length
|
|
138
140
|
));
|
|
139
141
|
} else {
|
|
140
142
|
message = ( localize(
|
|
141
|
-
|
|
143
|
+
6414,
|
|
142
144
|
"{0} extensions want to make refactoring changes with this file deletion",
|
|
143
145
|
data.extensionNames.length
|
|
144
146
|
));
|
|
@@ -150,8 +152,8 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
|
|
|
150
152
|
} = await dialogService.confirm({
|
|
151
153
|
type: Severity.Info,
|
|
152
154
|
message,
|
|
153
|
-
primaryButton: ( localize(
|
|
154
|
-
cancelButton: ( localize(
|
|
155
|
+
primaryButton: ( localize(6415, "Show &&Preview")),
|
|
156
|
+
cancelButton: ( localize(6416, "Skip Changes"))
|
|
155
157
|
});
|
|
156
158
|
showPreview = true;
|
|
157
159
|
if (!confirmed) {
|
|
@@ -171,18 +173,18 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
|
|
|
171
173
|
type: Severity.Info,
|
|
172
174
|
message,
|
|
173
175
|
buttons: [{
|
|
174
|
-
label: ( localize(
|
|
176
|
+
label: ( localize(6417, "&&OK")),
|
|
175
177
|
run: () => Choice.OK
|
|
176
178
|
}, {
|
|
177
|
-
label: ( localize(
|
|
179
|
+
label: ( localize(6415, "Show &&Preview")),
|
|
178
180
|
run: () => Choice.Preview
|
|
179
181
|
}],
|
|
180
182
|
cancelButton: {
|
|
181
|
-
label: ( localize(
|
|
183
|
+
label: ( localize(6416, "Skip Changes")),
|
|
182
184
|
run: () => Choice.Cancel
|
|
183
185
|
},
|
|
184
186
|
checkbox: {
|
|
185
|
-
label: ( localize(
|
|
187
|
+
label: ( localize(6418, "Do not ask me again"))
|
|
186
188
|
}
|
|
187
189
|
});
|
|
188
190
|
if (result === Choice.Cancel) {
|
|
@@ -211,15 +213,15 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
|
|
|
211
213
|
_progressLabel(operation) {
|
|
212
214
|
switch (operation) {
|
|
213
215
|
case FileOperation.CREATE:
|
|
214
|
-
return localize(
|
|
216
|
+
return localize(6419, "Running 'File Create' participants...");
|
|
215
217
|
case FileOperation.MOVE:
|
|
216
|
-
return localize(
|
|
218
|
+
return localize(6420, "Running 'File Rename' participants...");
|
|
217
219
|
case FileOperation.COPY:
|
|
218
|
-
return localize(
|
|
220
|
+
return localize(6421, "Running 'File Copy' participants...");
|
|
219
221
|
case FileOperation.DELETE:
|
|
220
|
-
return localize(
|
|
222
|
+
return localize(6422, "Running 'File Delete' participants...");
|
|
221
223
|
case FileOperation.WRITE:
|
|
222
|
-
return localize(
|
|
224
|
+
return localize(6423, "Running 'File Write' participants...");
|
|
223
225
|
}
|
|
224
226
|
}
|
|
225
227
|
})();
|
|
@@ -307,7 +309,7 @@ registerAction2(class ResetMemento extends Action2 {
|
|
|
307
309
|
super({
|
|
308
310
|
id: "files.participants.resetChoice",
|
|
309
311
|
title: {
|
|
310
|
-
value: ( localize(
|
|
312
|
+
value: ( localize(6424, "Reset choice for 'File operation needs preview'")),
|
|
311
313
|
original: `Reset choice for 'File operation needs preview'`
|
|
312
314
|
},
|
|
313
315
|
f1: true
|
|
@@ -1025,7 +1025,10 @@ let MainThreadPasteEditProvider = class MainThreadPasteEditProvider {
|
|
|
1025
1025
|
};
|
|
1026
1026
|
}),
|
|
1027
1027
|
dispose: () => {
|
|
1028
|
-
|
|
1028
|
+
const cacheId = edits[0]?._cacheId?.[0];
|
|
1029
|
+
if (typeof cacheId === "number") {
|
|
1030
|
+
this._proxy.$releasePasteEdits(this._handle, cacheId);
|
|
1031
|
+
}
|
|
1029
1032
|
}
|
|
1030
1033
|
};
|
|
1031
1034
|
} finally {
|
|
@@ -1096,7 +1099,10 @@ let MainThreadDocumentOnDropEditProvider = class MainThreadDocumentOnDropEditPro
|
|
|
1096
1099
|
};
|
|
1097
1100
|
}),
|
|
1098
1101
|
dispose: () => {
|
|
1099
|
-
|
|
1102
|
+
const cacheId = edits[0]?._cacheId?.[0];
|
|
1103
|
+
if (typeof cacheId === "number") {
|
|
1104
|
+
this._proxy.$releaseDocumentOnDropEdits(this._handle, cacheId);
|
|
1105
|
+
}
|
|
1100
1106
|
}
|
|
1101
1107
|
};
|
|
1102
1108
|
} finally {
|
|
@@ -1129,10 +1135,11 @@ class MainThreadDocumentSemanticTokensProvider {
|
|
|
1129
1135
|
if (!encodedDto) {
|
|
1130
1136
|
return null;
|
|
1131
1137
|
}
|
|
1138
|
+
const dto = decodeSemanticTokensDto(encodedDto);
|
|
1132
1139
|
if (token.isCancellationRequested) {
|
|
1140
|
+
this._proxy.$releaseDocumentSemanticTokens(this._handle, dto.id);
|
|
1133
1141
|
return null;
|
|
1134
1142
|
}
|
|
1135
|
-
const dto = decodeSemanticTokensDto(encodedDto);
|
|
1136
1143
|
if (dto.type === "full") {
|
|
1137
1144
|
return {
|
|
1138
1145
|
resultId: String(dto.id),
|
|
@@ -10,6 +10,8 @@ import { INotificationService } from '@codingame/monaco-vscode-api/vscode/vs/pla
|
|
|
10
10
|
import { Event } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
11
11
|
import { ICommandService } from '@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service';
|
|
12
12
|
import { IExtensionService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions.service';
|
|
13
|
+
import { legacyExtensionLinkParsing } from '@codingame/monaco-vscode-api/vscode/vs/platform/notification/common/notificationLegacy';
|
|
14
|
+
import { withNotificationActionTelemetry, NotificationActionTelemetryId, extensionNotificationTelemetry } from '@codingame/monaco-vscode-api/vscode/vs/platform/notification/common/notificationTelemetry';
|
|
13
15
|
|
|
14
16
|
var MainThreadMessageService_1;
|
|
15
17
|
let MainThreadMessageService = class MainThreadMessageService {
|
|
@@ -47,7 +49,7 @@ let MainThreadMessageService = class MainThreadMessageService {
|
|
|
47
49
|
}
|
|
48
50
|
_showMessage(severity, message, commands, options) {
|
|
49
51
|
return (new Promise(resolve => {
|
|
50
|
-
const primaryActions = commands.map(command => toAction({
|
|
52
|
+
const primaryActions = commands.map(command => withNotificationActionTelemetry(toAction({
|
|
51
53
|
id: `_extension_message_handle_${command.handle}`,
|
|
52
54
|
label: command.title,
|
|
53
55
|
enabled: true,
|
|
@@ -55,6 +57,8 @@ let MainThreadMessageService = class MainThreadMessageService {
|
|
|
55
57
|
resolve(command.handle);
|
|
56
58
|
return Promise.resolve();
|
|
57
59
|
}
|
|
60
|
+
}), {
|
|
61
|
+
extensionButtonIndex: command.handle
|
|
58
62
|
}));
|
|
59
63
|
let source;
|
|
60
64
|
let sourceIsUrgent = false;
|
|
@@ -66,21 +70,23 @@ let MainThreadMessageService = class MainThreadMessageService {
|
|
|
66
70
|
sourceIsUrgent = MainThreadMessageService_1.URGENT_NOTIFICATION_SOURCES.includes(source.id);
|
|
67
71
|
}
|
|
68
72
|
if (!source) {
|
|
69
|
-
source = ( localize(
|
|
73
|
+
source = ( localize(6441, "Extension"));
|
|
70
74
|
}
|
|
71
75
|
const secondaryActions = [];
|
|
72
76
|
if (options.source) {
|
|
73
|
-
secondaryActions.push(toAction({
|
|
77
|
+
secondaryActions.push(withNotificationActionTelemetry(toAction({
|
|
74
78
|
id: options.source.identifier.value,
|
|
75
|
-
label: ( localize(
|
|
79
|
+
label: ( localize(6442, "Manage Extension")),
|
|
76
80
|
run: () => {
|
|
77
81
|
return this._commandService.executeCommand("_extensions.manage", options.source.identifier.value);
|
|
78
82
|
}
|
|
79
|
-
}));
|
|
83
|
+
}), NotificationActionTelemetryId.ManageExtension));
|
|
80
84
|
}
|
|
81
85
|
const messageHandle = this._notificationService.notify({
|
|
86
|
+
telemetry: extensionNotificationTelemetry(options.source?.identifier.value, "message"),
|
|
82
87
|
severity,
|
|
83
88
|
message,
|
|
89
|
+
legacyExtensionLinkParsing,
|
|
84
90
|
actions: {
|
|
85
91
|
primary: primaryActions,
|
|
86
92
|
secondary: secondaryActions
|
|
@@ -111,12 +117,12 @@ let MainThreadMessageService = class MainThreadMessageService {
|
|
|
111
117
|
if (!cancelButton) {
|
|
112
118
|
if (buttons.length > 0) {
|
|
113
119
|
cancelButton = {
|
|
114
|
-
label: ( localize(
|
|
120
|
+
label: ( localize(6443, "Cancel")),
|
|
115
121
|
run: () => undefined
|
|
116
122
|
};
|
|
117
123
|
} else {
|
|
118
124
|
cancelButton = {
|
|
119
|
-
label: ( localize(
|
|
125
|
+
label: ( localize(6444, "&&OK")),
|
|
120
126
|
run: () => undefined
|
|
121
127
|
};
|
|
122
128
|
}
|
|
@@ -94,11 +94,11 @@ let MainThreadOutputService = class MainThreadOutputService extends Disposable {
|
|
|
94
94
|
}
|
|
95
95
|
_showChannelQuietly(channel) {
|
|
96
96
|
const statusProperties = {
|
|
97
|
-
name: ( localize(
|
|
97
|
+
name: ( localize(6446, "Show Output")),
|
|
98
98
|
text: "$(output)",
|
|
99
|
-
ariaLabel: ( localize(
|
|
99
|
+
ariaLabel: ( localize(6447, "Show {0} Output Channel", channel.label)),
|
|
100
100
|
command: `workbench.action.output.show.${channel.id}`,
|
|
101
|
-
tooltip: ( localize(
|
|
101
|
+
tooltip: ( localize(6448, "Show {0} Output Channel", channel.label)),
|
|
102
102
|
kind: "prominent"
|
|
103
103
|
};
|
|
104
104
|
if (!this._outputStatusItem.value) {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { IProgressStep, IProgressOptions } from "@codingame/monaco-vscode-api/vscode/vs/platform/progress/common/progress";
|
|
2
1
|
import { IProgressService } from "@codingame/monaco-vscode-api/vscode/vs/platform/progress/common/progress.service";
|
|
3
|
-
import { MainThreadProgressShape } from "@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol";
|
|
2
|
+
import { MainThreadProgressShape, IProgressOptionsDto, IProgressStepDto } from "@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol";
|
|
4
3
|
import { IExtHostContext } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extHostCustomers";
|
|
5
4
|
import { ICommandService } from "@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service";
|
|
6
5
|
export declare class MainThreadProgress implements MainThreadProgressShape {
|
|
@@ -11,8 +10,8 @@ export declare class MainThreadProgress implements MainThreadProgressShape {
|
|
|
11
10
|
private readonly _proxy;
|
|
12
11
|
constructor(extHostContext: IExtHostContext, progressService: IProgressService, _commandService: ICommandService);
|
|
13
12
|
dispose(): void;
|
|
14
|
-
$startProgress(handle: number, options:
|
|
15
|
-
$progressReport(handle: number, message:
|
|
13
|
+
$startProgress(handle: number, options: IProgressOptionsDto, extensionId?: string): Promise<void>;
|
|
14
|
+
$progressReport(handle: number, message: IProgressStepDto): void;
|
|
16
15
|
$progressEnd(handle: number): void;
|
|
17
16
|
private _createTask;
|
|
18
17
|
}
|
|
@@ -9,6 +9,8 @@ import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
|
9
9
|
import { onUnexpectedExternalError } from '@codingame/monaco-vscode-api/vscode/vs/base/common/errors';
|
|
10
10
|
import { toAction } from '@codingame/monaco-vscode-api/vscode/vs/base/common/actions';
|
|
11
11
|
import { NotificationPriority } from '@codingame/monaco-vscode-api/vscode/vs/platform/notification/common/notification';
|
|
12
|
+
import { legacyExtensionLinkParsing } from '@codingame/monaco-vscode-api/vscode/vs/platform/notification/common/notificationLegacy';
|
|
13
|
+
import { extensionNotificationTelemetry, withNotificationActionTelemetry, NotificationActionTelemetryId } from '@codingame/monaco-vscode-api/vscode/vs/platform/notification/common/notificationTelemetry';
|
|
12
14
|
|
|
13
15
|
var MainThreadProgress_1;
|
|
14
16
|
let MainThreadProgress = class MainThreadProgress {
|
|
@@ -30,22 +32,27 @@ let MainThreadProgress = class MainThreadProgress {
|
|
|
30
32
|
}
|
|
31
33
|
async $startProgress(handle, options, extensionId) {
|
|
32
34
|
const task = this._createTask(handle);
|
|
35
|
+
let progressOptions = {
|
|
36
|
+
...options,
|
|
37
|
+
legacyExtensionLinkParsing,
|
|
38
|
+
telemetry: options.telemetryId ?? extensionNotificationTelemetry(extensionId, "progress")
|
|
39
|
+
};
|
|
33
40
|
if (options.location === ProgressLocation.Notification && extensionId) {
|
|
34
41
|
const sourceIsUrgent = MainThreadProgress_1.URGENT_PROGRESS_SOURCES.includes(extensionId);
|
|
35
42
|
const notificationOptions = {
|
|
36
|
-
...
|
|
43
|
+
...progressOptions,
|
|
37
44
|
priority: sourceIsUrgent ? NotificationPriority.URGENT : NotificationPriority.DEFAULT,
|
|
38
45
|
location: ProgressLocation.Notification,
|
|
39
|
-
secondaryActions: [toAction({
|
|
46
|
+
secondaryActions: [withNotificationActionTelemetry(toAction({
|
|
40
47
|
id: extensionId,
|
|
41
|
-
label: ( localize(
|
|
48
|
+
label: ( localize(6449, "Manage Extension")),
|
|
42
49
|
run: () => this._commandService.executeCommand("_extensions.manage", extensionId)
|
|
43
|
-
})]
|
|
50
|
+
}), NotificationActionTelemetryId.ManageExtension)]
|
|
44
51
|
};
|
|
45
|
-
|
|
52
|
+
progressOptions = notificationOptions;
|
|
46
53
|
}
|
|
47
54
|
try {
|
|
48
|
-
this._progressService.withProgress(
|
|
55
|
+
this._progressService.withProgress(progressOptions, task, () => this._proxy.$acceptProgressCanceled(handle));
|
|
49
56
|
} catch (err) {
|
|
50
57
|
onUnexpectedExternalError(err);
|
|
51
58
|
}
|
|
@@ -338,6 +338,9 @@ class MainThreadSCMProvider {
|
|
|
338
338
|
get contextValue() {
|
|
339
339
|
return this._contextValue;
|
|
340
340
|
}
|
|
341
|
+
get activeRepositoryName() {
|
|
342
|
+
return this._activeRepositoryName;
|
|
343
|
+
}
|
|
341
344
|
get acceptInputCommand() {
|
|
342
345
|
return this.features.acceptInputCommand;
|
|
343
346
|
}
|
|
@@ -396,6 +399,7 @@ class MainThreadSCMProvider {
|
|
|
396
399
|
this._groupsByHandle = Object.create(null);
|
|
397
400
|
this.features = {};
|
|
398
401
|
this._contextValue = observableValue(this, undefined);
|
|
402
|
+
this._activeRepositoryName = observableValue(this, undefined);
|
|
399
403
|
this._count = observableValue(this, undefined);
|
|
400
404
|
this._statusBarCommands = observableValue(this, undefined);
|
|
401
405
|
this._commitTemplate = observableValue(this, "");
|
|
@@ -425,6 +429,9 @@ class MainThreadSCMProvider {
|
|
|
425
429
|
if (typeof features.contextValue !== "undefined") {
|
|
426
430
|
this._contextValue.set(features.contextValue, undefined);
|
|
427
431
|
}
|
|
432
|
+
if (typeof features.activeRepositoryName !== "undefined") {
|
|
433
|
+
this._activeRepositoryName.set(features.activeRepositoryName ?? undefined, undefined);
|
|
434
|
+
}
|
|
428
435
|
if (typeof features.count !== "undefined") {
|
|
429
436
|
this._count.set(features.count, undefined);
|
|
430
437
|
}
|
|
@@ -17,7 +17,7 @@ class ExtHostSaveParticipant {
|
|
|
17
17
|
return undefined;
|
|
18
18
|
}
|
|
19
19
|
const p = ( new Promise((resolve, reject) => {
|
|
20
|
-
setTimeout(() => reject(( new Error(( localize(
|
|
20
|
+
setTimeout(() => reject(( new Error(( localize(6450, "Aborted onWillSaveTextDocument-event after 1750ms"))))), 1750);
|
|
21
21
|
this._proxy.$participateInSave(editorModel.resource, context.reason).then(values => {
|
|
22
22
|
if (!values.every(success => success)) {
|
|
23
23
|
return Promise.reject(( new Error("listener failed")));
|
|
@@ -4,7 +4,6 @@ import { IExtHostContext } from "@codingame/monaco-vscode-api/vscode/vs/workbenc
|
|
|
4
4
|
export declare class MainThreadShare implements MainThreadShareShape {
|
|
5
5
|
private readonly shareService;
|
|
6
6
|
private readonly proxy;
|
|
7
|
-
private providers;
|
|
8
7
|
private providerDisposables;
|
|
9
8
|
constructor(extHostContext: IExtHostContext, shareService: IShareService);
|
|
10
9
|
$registerShareProvider(handle: number, selector: IDocumentFilterDto[], id: string, label: string, priority: number): void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
3
|
import { CancellationToken } from '@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation';
|
|
4
|
-
import {
|
|
4
|
+
import { DisposableMap } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
5
5
|
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
6
6
|
import { ExtHostContext, MainContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol';
|
|
7
7
|
import { IShareService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/share/common/share.service';
|
|
@@ -10,8 +10,7 @@ import { extHostNamedCustomer } from '@codingame/monaco-vscode-api/vscode/vs/wor
|
|
|
10
10
|
let MainThreadShare = class MainThreadShare {
|
|
11
11
|
constructor(extHostContext, shareService) {
|
|
12
12
|
this.shareService = shareService;
|
|
13
|
-
this.
|
|
14
|
-
this.providerDisposables = ( new Map());
|
|
13
|
+
this.providerDisposables = ( new DisposableMap());
|
|
15
14
|
this.proxy = ( extHostContext.getProxy(ExtHostContext.ExtHostShare));
|
|
16
15
|
}
|
|
17
16
|
$registerShareProvider(handle, selector, id, label, priority) {
|
|
@@ -25,18 +24,14 @@ let MainThreadShare = class MainThreadShare {
|
|
|
25
24
|
return typeof result === "string" ? result : URI.revive(result);
|
|
26
25
|
}
|
|
27
26
|
};
|
|
28
|
-
this.providers.set(handle, provider);
|
|
29
27
|
const disposable = this.shareService.registerShareProvider(provider);
|
|
30
28
|
this.providerDisposables.set(handle, disposable);
|
|
31
29
|
}
|
|
32
30
|
$unregisterShareProvider(handle) {
|
|
33
|
-
this.
|
|
34
|
-
this.providerDisposables.delete(handle);
|
|
31
|
+
this.providerDisposables.deleteAndDispose(handle);
|
|
35
32
|
}
|
|
36
33
|
dispose() {
|
|
37
|
-
this.
|
|
38
|
-
dispose(( this.providerDisposables.values()));
|
|
39
|
-
this.providerDisposables.clear();
|
|
34
|
+
this.providerDisposables.dispose();
|
|
40
35
|
}
|
|
41
36
|
};
|
|
42
37
|
MainThreadShare = __decorate([extHostNamedCustomer(MainContext.MainThreadShare), ( __param(1, IShareService))], MainThreadShare);
|
|
@@ -397,7 +397,7 @@ var TaskDTO;
|
|
|
397
397
|
}
|
|
398
398
|
command.presentation = TaskPresentationOptionsDTO.to(task.presentationOptions);
|
|
399
399
|
const source = TaskSourceDTO.to(task.source, workspace);
|
|
400
|
-
const label = ( localize(
|
|
400
|
+
const label = ( localize(6451, "{0}: {1}", source.label, task.name));
|
|
401
401
|
const definition = TaskDefinitionDTO.to(task.definition, executeOnly);
|
|
402
402
|
const id = (CustomExecutionDTO.is(task.execution) && task._id) ? task._id : `${task.source.extensionId}.${definition._key}`;
|
|
403
403
|
const result = ( new ContributedTask(
|
|
@@ -178,8 +178,13 @@ let MainThreadTerminalService = class MainThreadTerminalService extends Disposab
|
|
|
178
178
|
});
|
|
179
179
|
this._extHostTerminals.set(extHostTerminalId, terminal);
|
|
180
180
|
const terminalInstance = await terminal;
|
|
181
|
-
|
|
181
|
+
if (terminalInstance.isDisposed) {
|
|
182
182
|
this._extHostTerminals.delete(extHostTerminalId);
|
|
183
|
+
return;
|
|
184
|
+
}
|
|
185
|
+
const disposeListener = this._register(terminalInstance.onDisposed(() => {
|
|
186
|
+
this._extHostTerminals.delete(extHostTerminalId);
|
|
187
|
+
this._store.delete(disposeListener);
|
|
183
188
|
}));
|
|
184
189
|
}
|
|
185
190
|
async _deserializeParentTerminal(location) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
3
|
import { Event } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
4
|
-
import { Disposable,
|
|
4
|
+
import { Disposable, DisposableMap, DisposableStore, combinedDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
5
5
|
import { TerminalCapability } from '@codingame/monaco-vscode-api/vscode/vs/platform/terminal/common/capabilities/capabilities';
|
|
6
6
|
import { ExtHostContext, MainContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol';
|
|
7
7
|
import { ITerminalService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/browser/terminal.service';
|
|
@@ -21,12 +21,7 @@ let MainThreadTerminalShellIntegration = class MainThreadTerminalShellIntegratio
|
|
|
21
21
|
this._terminalService = _terminalService;
|
|
22
22
|
this._extensionService = _extensionService;
|
|
23
23
|
this._proxy = ( extHostContext.getProxy(ExtHostContext.ExtHostTerminalShellIntegration));
|
|
24
|
-
const instanceDataListeners = ( new
|
|
25
|
-
this._register(toDisposable(() => {
|
|
26
|
-
for (const listener of ( instanceDataListeners.values())) {
|
|
27
|
-
listener.dispose();
|
|
28
|
-
}
|
|
29
|
-
}));
|
|
24
|
+
const instanceDataListeners = this._register(( new DisposableMap()));
|
|
30
25
|
for (const terminal of this._terminalService.instances) {
|
|
31
26
|
const cmdDetection = terminal.capabilities.get(TerminalCapability.CommandDetection);
|
|
32
27
|
if (cmdDetection) {
|
|
@@ -72,13 +67,12 @@ let MainThreadTerminalShellIntegration = class MainThreadTerminalShellIntegratio
|
|
|
72
67
|
e.data.isTrusted,
|
|
73
68
|
e.data.cwd
|
|
74
69
|
);
|
|
75
|
-
instanceDataListeners.
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
);
|
|
70
|
+
instanceDataListeners.deleteAndDispose(instanceId);
|
|
71
|
+
const dataDisposables = ( new DisposableStore());
|
|
72
|
+
const listener = Event.accumulate(e.instance.onData, 50, true, dataDisposables)(events => {
|
|
73
|
+
this._proxy.$shellExecutionData(instanceId, events.join(""));
|
|
74
|
+
});
|
|
75
|
+
instanceDataListeners.set(instanceId, combinedDisposable(listener, dataDisposables));
|
|
82
76
|
}));
|
|
83
77
|
const commandDetectionEndEvent = this._store.add(
|
|
84
78
|
this._terminalService.createOnInstanceCapabilityEvent(TerminalCapability.CommandDetection, e => e.onCommandFinished)
|
|
@@ -86,7 +80,7 @@ let MainThreadTerminalShellIntegration = class MainThreadTerminalShellIntegratio
|
|
|
86
80
|
this._store.add(commandDetectionEndEvent.event(e => {
|
|
87
81
|
currentCommand = undefined;
|
|
88
82
|
const instanceId = e.instance.instanceId;
|
|
89
|
-
instanceDataListeners.
|
|
83
|
+
instanceDataListeners.deleteAndDispose(instanceId);
|
|
90
84
|
this._proxy.$shellExecutionEnd(
|
|
91
85
|
instanceId,
|
|
92
86
|
e.data.command,
|
|
@@ -95,9 +89,10 @@ let MainThreadTerminalShellIntegration = class MainThreadTerminalShellIntegratio
|
|
|
95
89
|
e.data.exitCode
|
|
96
90
|
);
|
|
97
91
|
}));
|
|
98
|
-
this._store.add(
|
|
99
|
-
|
|
100
|
-
|
|
92
|
+
this._store.add(this._terminalService.onDidDisposeInstance(e => {
|
|
93
|
+
instanceDataListeners.deleteAndDispose(e.instanceId);
|
|
94
|
+
this._proxy.$closeTerminal(e.instanceId);
|
|
95
|
+
}));
|
|
101
96
|
}
|
|
102
97
|
$executeCommand(terminalId, commandLine) {
|
|
103
98
|
this._terminalService.getInstanceFromId(terminalId)?.runCommand(commandLine, true);
|
|
@@ -116,13 +116,13 @@ let MainThreadTunnelService = class MainThreadTunnelService extends Disposable {
|
|
|
116
116
|
}
|
|
117
117
|
async elevationPrompt(tunnelOptions, tunnel, source) {
|
|
118
118
|
return this.notificationService.prompt(Severity.Info, ( localize(
|
|
119
|
-
|
|
119
|
+
6452,
|
|
120
120
|
"The extension {0} has forwarded port {1}. You'll need to run as superuser to use port {2} locally.",
|
|
121
121
|
source,
|
|
122
122
|
tunnelOptions.remoteAddress.port,
|
|
123
123
|
tunnelOptions.localAddressPort
|
|
124
124
|
)), [{
|
|
125
|
-
label: ( localize(
|
|
125
|
+
label: ( localize(6453, "Use Port {0} as Sudo...", tunnel.tunnelRemotePort)),
|
|
126
126
|
run: async () => {
|
|
127
127
|
this.elevateionRetry = true;
|
|
128
128
|
await this.remoteExplorerService.close({
|
|
@@ -59,11 +59,12 @@ let MainThreadUriOpeners = class MainThreadUriOpeners extends Disposable {
|
|
|
59
59
|
try {
|
|
60
60
|
await this.proxy.$openUri(id, {
|
|
61
61
|
resolvedUri: uri,
|
|
62
|
-
sourceUri: ctx.sourceUri
|
|
62
|
+
sourceUri: ctx.sourceUri,
|
|
63
|
+
viewColumn: ctx.viewColumn
|
|
63
64
|
}, token);
|
|
64
65
|
} catch (e) {
|
|
65
66
|
if (!isCancellationError(e)) {
|
|
66
|
-
const openDefaultAction = ( new Action("default", ( localize(
|
|
67
|
+
const openDefaultAction = ( new Action("default", ( localize(6454, "Open using default opener")), undefined, undefined, async () => {
|
|
67
68
|
await this.openerService.open(uri, {
|
|
68
69
|
allowTunneling: false,
|
|
69
70
|
allowContributedOpeners: defaultExternalUriOpenerId
|
|
@@ -72,7 +73,7 @@ let MainThreadUriOpeners = class MainThreadUriOpeners extends Disposable {
|
|
|
72
73
|
openDefaultAction.tooltip = ( uri.toString());
|
|
73
74
|
this.notificationService.notify({
|
|
74
75
|
severity: Severity.Error,
|
|
75
|
-
message: ( localize(
|
|
76
|
+
message: ( localize(6455, "Could not open uri with '{0}': {1}", id, (e.toString()))),
|
|
76
77
|
actions: {
|
|
77
78
|
primary: [openDefaultAction]
|
|
78
79
|
}
|
|
@@ -118,7 +118,7 @@ let MainThreadWebviews = class MainThreadWebviews extends Disposable {
|
|
|
118
118
|
<meta http-equiv="Content-type" content="text/html;charset=UTF-8">
|
|
119
119
|
<meta http-equiv="Content-Security-Policy" content="default-src 'none';">
|
|
120
120
|
</head>
|
|
121
|
-
<body>${( localize(
|
|
121
|
+
<body>${( localize(6456, "An error occurred while loading view: {0}", escape(viewType)))}</body>
|
|
122
122
|
</html>`;
|
|
123
123
|
}
|
|
124
124
|
};
|
|
@@ -114,10 +114,10 @@ let MainThreadWorkspace = class MainThreadWorkspace extends Disposable {
|
|
|
114
114
|
const wantsToDelete = removeCount > 0;
|
|
115
115
|
if (wantsToAdd && !wantsToDelete) {
|
|
116
116
|
if (addCount === 1) {
|
|
117
|
-
message = ( localize(
|
|
117
|
+
message = ( localize(6457, "Extension '{0}' added 1 folder to the workspace", extensionName));
|
|
118
118
|
} else {
|
|
119
119
|
message = ( localize(
|
|
120
|
-
|
|
120
|
+
6458,
|
|
121
121
|
"Extension '{0}' added {1} folders to the workspace",
|
|
122
122
|
extensionName,
|
|
123
123
|
addCount
|
|
@@ -126,10 +126,10 @@ let MainThreadWorkspace = class MainThreadWorkspace extends Disposable {
|
|
|
126
126
|
}
|
|
127
127
|
else if (wantsToDelete && !wantsToAdd) {
|
|
128
128
|
if (removeCount === 1) {
|
|
129
|
-
message = ( localize(
|
|
129
|
+
message = ( localize(6459, "Extension '{0}' removed 1 folder from the workspace", extensionName));
|
|
130
130
|
} else {
|
|
131
131
|
message = ( localize(
|
|
132
|
-
|
|
132
|
+
6460,
|
|
133
133
|
"Extension '{0}' removed {1} folders from the workspace",
|
|
134
134
|
extensionName,
|
|
135
135
|
removeCount
|
|
@@ -137,7 +137,7 @@ let MainThreadWorkspace = class MainThreadWorkspace extends Disposable {
|
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
139
|
else {
|
|
140
|
-
message = ( localize(
|
|
140
|
+
message = ( localize(6461, "Extension '{0}' changed folders of the workspace", extensionName));
|
|
141
141
|
}
|
|
142
142
|
return message;
|
|
143
143
|
}
|
|
@@ -23,6 +23,7 @@ export declare class CustomTextEditorModel extends Disposable implements ICustom
|
|
|
23
23
|
readonly onDidChangeReadonly: Event<void>;
|
|
24
24
|
constructor(viewType: string, _resource: URI, _model: IReference<IResolvedTextEditorModel>, textFileService: ITextFileService, _labelService: ILabelService, extensionService: IExtensionService);
|
|
25
25
|
get resource(): URI;
|
|
26
|
+
get textEditorModel(): import("@codingame/monaco-vscode-api/vscode/vs/editor/common/model").ITextModel;
|
|
26
27
|
get name(): string;
|
|
27
28
|
isReadonly(): boolean | IMarkdownString;
|
|
28
29
|
get backupId(): undefined;
|
|
@@ -60,7 +60,7 @@ let CustomTextEditorModel = CustomTextEditorModel_1 = class CustomTextEditorMode
|
|
|
60
60
|
}));
|
|
61
61
|
this._register(extensionService.onWillStop(e => {
|
|
62
62
|
e.veto(true, ( localize(
|
|
63
|
-
|
|
63
|
+
15911,
|
|
64
64
|
"An extension provided text editor for '{0}' is still open that would close otherwise.",
|
|
65
65
|
this.name
|
|
66
66
|
)));
|
|
@@ -69,6 +69,9 @@ let CustomTextEditorModel = CustomTextEditorModel_1 = class CustomTextEditorMode
|
|
|
69
69
|
get resource() {
|
|
70
70
|
return this._resource;
|
|
71
71
|
}
|
|
72
|
+
get textEditorModel() {
|
|
73
|
+
return this._model.object.textEditorModel;
|
|
74
|
+
}
|
|
72
75
|
get name() {
|
|
73
76
|
return basename(this._labelService.getUriLabel(this._resource));
|
|
74
77
|
}
|