@codingame/monaco-vscode-extensions-service-override 25.1.2 → 26.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +7 -0
- package/package.json +3 -3
- package/vscode/src/vs/base/common/console.js +24 -15
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagementCLI.d.ts +4 -1
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagementCLI.js +149 -84
- package/vscode/src/vs/platform/extensionResourceLoader/browser/extensionResourceLoaderService.js +20 -12
- package/vscode/src/vs/platform/extensionResourceLoader/common/extensionResourceLoader.js +38 -21
- package/vscode/src/vs/platform/remote/common/managedSocket.js +7 -10
- package/vscode/src/vs/workbench/api/browser/mainThreadAiEmbeddingVector.js +5 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadAiRelatedInformation.js +5 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadAiSettingsSearch.js +4 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadAuthentication.js +200 -143
- package/vscode/src/vs/workbench/api/browser/mainThreadBulkEdits.js +10 -14
- package/vscode/src/vs/workbench/api/browser/mainThreadCLICommands.js +41 -31
- package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents2.d.ts +9 -12
- package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents2.js +168 -115
- package/vscode/src/vs/workbench/api/browser/mainThreadChatCodeMapper.js +11 -13
- package/vscode/src/vs/workbench/api/browser/mainThreadChatContext.d.ts +5 -5
- package/vscode/src/vs/workbench/api/browser/mainThreadChatContext.js +42 -15
- package/vscode/src/vs/workbench/api/browser/mainThreadChatOutputRenderer.js +8 -7
- package/vscode/src/vs/workbench/api/browser/mainThreadChatSessions.d.ts +4 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadChatSessions.js +170 -99
- package/vscode/src/vs/workbench/api/browser/mainThreadChatStatus.js +2 -5
- package/vscode/src/vs/workbench/api/browser/mainThreadClipboard.js +4 -9
- package/vscode/src/vs/workbench/api/browser/mainThreadCodeInsets.js +13 -12
- package/vscode/src/vs/workbench/api/browser/mainThreadCommands.js +16 -19
- package/vscode/src/vs/workbench/api/browser/mainThreadComments.js +127 -70
- package/vscode/src/vs/workbench/api/browser/mainThreadConfiguration.js +80 -26
- package/vscode/src/vs/workbench/api/browser/mainThreadConsole.js +5 -11
- package/vscode/src/vs/workbench/api/browser/mainThreadCustomEditors.js +199 -97
- package/vscode/src/vs/workbench/api/browser/mainThreadDataChannels.js +1 -4
- package/vscode/src/vs/workbench/api/browser/mainThreadDebugService.js +88 -73
- package/vscode/src/vs/workbench/api/browser/mainThreadDecorations.js +5 -5
- package/vscode/src/vs/workbench/api/browser/mainThreadDiagnostics.js +16 -12
- package/vscode/src/vs/workbench/api/browser/mainThreadDialogs.js +10 -8
- package/vscode/src/vs/workbench/api/browser/mainThreadDocumentContentProviders.js +14 -6
- package/vscode/src/vs/workbench/api/browser/mainThreadDocuments.js +52 -37
- package/vscode/src/vs/workbench/api/browser/mainThreadDocumentsAndEditors.js +78 -58
- package/vscode/src/vs/workbench/api/browser/mainThreadEditSessionIdentityParticipant.js +5 -7
- package/vscode/src/vs/workbench/api/browser/mainThreadEditor.js +75 -63
- package/vscode/src/vs/workbench/api/browser/mainThreadEditorTabs.js +99 -91
- package/vscode/src/vs/workbench/api/browser/mainThreadEditors.js +93 -55
- package/vscode/src/vs/workbench/api/browser/mainThreadEmbeddings.js +3 -7
- package/vscode/src/vs/workbench/api/browser/mainThreadExtensionService.js +85 -60
- package/vscode/src/vs/workbench/api/browser/mainThreadFileSystem.js +49 -45
- package/vscode/src/vs/workbench/api/browser/mainThreadFileSystemEventService.js +114 -72
- package/vscode/src/vs/workbench/api/browser/mainThreadInteractive.js +4 -7
- package/vscode/src/vs/workbench/api/browser/mainThreadLabelService.js +1 -4
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageFeatures.d.ts +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageFeatures.js +381 -238
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModelTools.d.ts +7 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModelTools.js +90 -13
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModels.js +81 -58
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguages.js +9 -10
- package/vscode/src/vs/workbench/api/browser/mainThreadLocalization.js +2 -7
- package/vscode/src/vs/workbench/api/browser/mainThreadLogService.js +6 -10
- package/vscode/src/vs/workbench/api/browser/mainThreadManagedSockets.js +12 -10
- package/vscode/src/vs/workbench/api/browser/mainThreadMcp.d.ts +3 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadMcp.js +162 -97
- package/vscode/src/vs/workbench/api/browser/mainThreadMessageService.js +32 -26
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebook.js +38 -32
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDocuments.js +48 -46
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDocumentsAndEditors.js +22 -18
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDto.js +5 -8
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookEditors.js +35 -21
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookKernels.js +31 -28
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookSaveParticipant.js +5 -7
- package/vscode/src/vs/workbench/api/browser/mainThreadOutputService.js +47 -23
- package/vscode/src/vs/workbench/api/browser/mainThreadProfileContentHandlers.js +15 -12
- package/vscode/src/vs/workbench/api/browser/mainThreadProgress.js +17 -18
- package/vscode/src/vs/workbench/api/browser/mainThreadQuickDiff.js +6 -7
- package/vscode/src/vs/workbench/api/browser/mainThreadQuickOpen.js +83 -66
- package/vscode/src/vs/workbench/api/browser/mainThreadRemoteConnectionData.js +1 -5
- package/vscode/src/vs/workbench/api/browser/mainThreadSCM.js +250 -92
- package/vscode/src/vs/workbench/api/browser/mainThreadSaveParticipant.js +6 -8
- package/vscode/src/vs/workbench/api/browser/mainThreadSearch.js +37 -26
- package/vscode/src/vs/workbench/api/browser/mainThreadSecretState.js +34 -21
- package/vscode/src/vs/workbench/api/browser/mainThreadShare.js +3 -6
- package/vscode/src/vs/workbench/api/browser/mainThreadSpeech.js +19 -14
- package/vscode/src/vs/workbench/api/browser/mainThreadStatusBar.js +41 -16
- package/vscode/src/vs/workbench/api/browser/mainThreadStorage.js +18 -17
- package/vscode/src/vs/workbench/api/browser/mainThreadTask.js +145 -145
- package/vscode/src/vs/workbench/api/browser/mainThreadTelemetry.js +19 -11
- package/vscode/src/vs/workbench/api/browser/mainThreadTerminalService.js +176 -80
- package/vscode/src/vs/workbench/api/browser/mainThreadTerminalShellIntegration.js +52 -21
- package/vscode/src/vs/workbench/api/browser/mainThreadTesting.js +26 -24
- package/vscode/src/vs/workbench/api/browser/mainThreadTheming.js +1 -4
- package/vscode/src/vs/workbench/api/browser/mainThreadTimeline.js +5 -8
- package/vscode/src/vs/workbench/api/browser/mainThreadTreeViews.d.ts +4 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadTreeViews.js +106 -46
- package/vscode/src/vs/workbench/api/browser/mainThreadTunnelService.js +83 -65
- package/vscode/src/vs/workbench/api/browser/mainThreadUriOpeners.js +20 -20
- package/vscode/src/vs/workbench/api/browser/mainThreadUrls.js +14 -9
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviewManager.js +17 -9
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviewPanels.js +49 -38
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviewViews.js +10 -13
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviews.js +38 -27
- package/vscode/src/vs/workbench/api/browser/mainThreadWindow.js +5 -11
- package/vscode/src/vs/workbench/api/browser/mainThreadWorkspace.d.ts +4 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadWorkspace.js +73 -43
- package/vscode/src/vs/workbench/api/common/shared/dataTransferCache.js +2 -2
- package/vscode/src/vs/workbench/contrib/customEditor/common/customTextEditorModel.js +17 -10
- package/vscode/src/vs/workbench/contrib/externalUriOpener/common/contributedOpeners.js +17 -11
- package/vscode/src/vs/workbench/services/extensionManagement/browser/extensionBisect.js +107 -80
- package/vscode/src/vs/workbench/services/extensionManagement/browser/webExtensionsScannerService.js +336 -175
- package/vscode/src/vs/workbench/services/extensions/browser/extensionService.js +126 -71
- package/vscode/src/vs/workbench/services/extensions/browser/webWorkerExtensionHost.js +76 -54
- package/vscode/src/vs/workbench/services/extensions/browser/webWorkerFileSystemProvider.js +1 -2
- package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.d.ts +2 -0
- package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.js +343 -192
- package/vscode/src/vs/workbench/services/extensions/common/extHostCustomers.js +5 -3
- package/vscode/src/vs/workbench/services/extensions/common/extensionHostManager.d.ts +0 -1
- package/vscode/src/vs/workbench/services/extensions/common/extensionHostManager.js +75 -68
- package/vscode/src/vs/workbench/services/extensions/common/extensionRunningLocationTracker.js +135 -36
- package/vscode/src/vs/workbench/services/extensions/common/extensionsProposedApi.js +22 -18
- package/vscode/src/vs/workbench/services/extensions/common/extensionsUtil.js +14 -12
- package/vscode/src/vs/workbench/services/extensions/common/lazyCreateExtensionHostManager.js +21 -9
- package/vscode/src/vs/workbench/services/extensions/common/remoteExtensionHost.js +48 -25
- package/vscode/src/vs/workbench/services/themes/browser/cssExtensionPoint.d.ts +24 -0
- package/vscode/src/vs/workbench/services/themes/browser/cssExtensionPoint.js +300 -0
|
@@ -29,47 +29,58 @@ import { transaction } from '@codingame/monaco-vscode-api/vscode/vs/base/common/
|
|
|
29
29
|
function getIconFromIconDto(iconDto) {
|
|
30
30
|
if (iconDto === undefined) {
|
|
31
31
|
return undefined;
|
|
32
|
-
}
|
|
33
|
-
else if (ThemeIcon.isThemeIcon(iconDto)) {
|
|
32
|
+
} else if (ThemeIcon.isThemeIcon(iconDto)) {
|
|
34
33
|
return iconDto;
|
|
35
|
-
}
|
|
36
|
-
else if (isUriComponents(iconDto)) {
|
|
34
|
+
} else if (isUriComponents(iconDto)) {
|
|
37
35
|
return URI.revive(iconDto);
|
|
38
|
-
}
|
|
39
|
-
else {
|
|
36
|
+
} else {
|
|
40
37
|
const icon = iconDto;
|
|
41
|
-
return {
|
|
38
|
+
return {
|
|
39
|
+
light: URI.revive(icon.light),
|
|
40
|
+
dark: URI.revive(icon.dark)
|
|
41
|
+
};
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
function toISCMHistoryItem(historyItemDto) {
|
|
45
45
|
const authorIcon = getIconFromIconDto(historyItemDto.authorIcon);
|
|
46
46
|
const references = historyItemDto.references?.map(r => ({
|
|
47
|
-
...r,
|
|
47
|
+
...r,
|
|
48
|
+
icon: getIconFromIconDto(r.icon)
|
|
48
49
|
}));
|
|
49
|
-
return {
|
|
50
|
+
return {
|
|
51
|
+
...historyItemDto,
|
|
52
|
+
authorIcon,
|
|
53
|
+
references
|
|
54
|
+
};
|
|
50
55
|
}
|
|
51
56
|
function toISCMHistoryItemRef(historyItemRefDto, color) {
|
|
52
|
-
return historyItemRefDto ? {
|
|
57
|
+
return historyItemRefDto ? {
|
|
58
|
+
...historyItemRefDto,
|
|
59
|
+
icon: getIconFromIconDto(historyItemRefDto.icon),
|
|
60
|
+
color: color
|
|
61
|
+
} : undefined;
|
|
53
62
|
}
|
|
54
63
|
class SCMInputBoxContentProvider extends Disposable {
|
|
55
64
|
constructor(textModelService, modelService, languageService) {
|
|
56
65
|
super();
|
|
57
66
|
this.modelService = modelService;
|
|
58
67
|
this.languageService = languageService;
|
|
59
|
-
this._register(
|
|
68
|
+
this._register(
|
|
69
|
+
textModelService.registerTextModelContentProvider(Schemas.vscodeSourceControl, this)
|
|
70
|
+
);
|
|
60
71
|
}
|
|
61
72
|
async provideTextContent(resource) {
|
|
62
73
|
const existing = this.modelService.getModel(resource);
|
|
63
74
|
if (existing) {
|
|
64
75
|
return existing;
|
|
65
76
|
}
|
|
66
|
-
return this.modelService.createModel(
|
|
77
|
+
return this.modelService.createModel("", this.languageService.createById("scminput"), resource);
|
|
67
78
|
}
|
|
68
79
|
}
|
|
69
80
|
class MainThreadSCMResourceGroup {
|
|
70
81
|
get resourceTree() {
|
|
71
82
|
if (!this._resourceTree) {
|
|
72
|
-
const rootUri = this.provider.rootUri ?? URI.file(
|
|
83
|
+
const rootUri = this.provider.rootUri ?? URI.file("/");
|
|
73
84
|
this._resourceTree = ( new ResourceTree(this, rootUri, this._uriIdentService.extUri));
|
|
74
85
|
for (const resource of this.resources) {
|
|
75
86
|
this._resourceTree.add(resource.sourceUri, resource);
|
|
@@ -77,9 +88,22 @@ class MainThreadSCMResourceGroup {
|
|
|
77
88
|
}
|
|
78
89
|
return this._resourceTree;
|
|
79
90
|
}
|
|
80
|
-
get hideWhenEmpty() {
|
|
81
|
-
|
|
82
|
-
|
|
91
|
+
get hideWhenEmpty() {
|
|
92
|
+
return !!this.features.hideWhenEmpty;
|
|
93
|
+
}
|
|
94
|
+
get contextValue() {
|
|
95
|
+
return this.features.contextValue;
|
|
96
|
+
}
|
|
97
|
+
constructor(
|
|
98
|
+
sourceControlHandle,
|
|
99
|
+
handle,
|
|
100
|
+
provider,
|
|
101
|
+
features,
|
|
102
|
+
label,
|
|
103
|
+
id,
|
|
104
|
+
multiDiffEditorEnableViewChanges,
|
|
105
|
+
_uriIdentService
|
|
106
|
+
) {
|
|
83
107
|
this.sourceControlHandle = sourceControlHandle;
|
|
84
108
|
this.handle = handle;
|
|
85
109
|
this.provider = provider;
|
|
@@ -107,7 +131,10 @@ class MainThreadSCMResourceGroup {
|
|
|
107
131
|
this._onDidChangeResources.fire();
|
|
108
132
|
}
|
|
109
133
|
$updateGroup(features) {
|
|
110
|
-
this.features = {
|
|
134
|
+
this.features = {
|
|
135
|
+
...this.features,
|
|
136
|
+
...features
|
|
137
|
+
};
|
|
111
138
|
this._onDidChange.fire();
|
|
112
139
|
}
|
|
113
140
|
$updateGroupLabel(label) {
|
|
@@ -116,7 +143,19 @@ class MainThreadSCMResourceGroup {
|
|
|
116
143
|
}
|
|
117
144
|
}
|
|
118
145
|
class MainThreadSCMResource {
|
|
119
|
-
constructor(
|
|
146
|
+
constructor(
|
|
147
|
+
proxy,
|
|
148
|
+
sourceControlHandle,
|
|
149
|
+
groupHandle,
|
|
150
|
+
handle,
|
|
151
|
+
sourceUri,
|
|
152
|
+
resourceGroup,
|
|
153
|
+
decorations,
|
|
154
|
+
contextValue,
|
|
155
|
+
command,
|
|
156
|
+
multiDiffEditorOriginalUri,
|
|
157
|
+
multiDiffEditorModifiedUri
|
|
158
|
+
) {
|
|
120
159
|
this.proxy = proxy;
|
|
121
160
|
this.sourceControlHandle = sourceControlHandle;
|
|
122
161
|
this.groupHandle = groupHandle;
|
|
@@ -152,11 +191,17 @@ class MainThreadSCMArtifactProvider {
|
|
|
152
191
|
}
|
|
153
192
|
async provideArtifactGroups(token) {
|
|
154
193
|
const artifactGroups = await this.proxy.$provideArtifactGroups(this.handle, token ?? CancellationToken.None);
|
|
155
|
-
return artifactGroups?.map(group => ({
|
|
194
|
+
return artifactGroups?.map(group => ({
|
|
195
|
+
...group,
|
|
196
|
+
icon: getIconFromIconDto(group.icon)
|
|
197
|
+
}));
|
|
156
198
|
}
|
|
157
199
|
async provideArtifacts(group, token) {
|
|
158
200
|
const artifacts = await this.proxy.$provideArtifacts(this.handle, group, token ?? CancellationToken.None);
|
|
159
|
-
return artifacts?.map(artifact => ({
|
|
201
|
+
return artifacts?.map(artifact => ({
|
|
202
|
+
...artifact,
|
|
203
|
+
icon: getIconFromIconDto(artifact.icon)
|
|
204
|
+
}));
|
|
160
205
|
}
|
|
161
206
|
$onDidChangeArtifacts(groups) {
|
|
162
207
|
this._onDidChangeArtifacts.fire(groups);
|
|
@@ -166,10 +211,18 @@ class MainThreadSCMArtifactProvider {
|
|
|
166
211
|
}
|
|
167
212
|
}
|
|
168
213
|
class MainThreadSCMHistoryProvider {
|
|
169
|
-
get historyItemRef() {
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
get
|
|
214
|
+
get historyItemRef() {
|
|
215
|
+
return this._historyItemRef;
|
|
216
|
+
}
|
|
217
|
+
get historyItemRemoteRef() {
|
|
218
|
+
return this._historyItemRemoteRef;
|
|
219
|
+
}
|
|
220
|
+
get historyItemBaseRef() {
|
|
221
|
+
return this._historyItemBaseRef;
|
|
222
|
+
}
|
|
223
|
+
get historyItemRefChanges() {
|
|
224
|
+
return this._historyItemRefChanges;
|
|
225
|
+
}
|
|
173
226
|
constructor(proxy, handle) {
|
|
174
227
|
this.proxy = proxy;
|
|
175
228
|
this.handle = handle;
|
|
@@ -185,7 +238,12 @@ class MainThreadSCMHistoryProvider {
|
|
|
185
238
|
owner: this,
|
|
186
239
|
equalsFn: structuralEquals
|
|
187
240
|
}, undefined);
|
|
188
|
-
this._historyItemRefChanges = observableValue(this, {
|
|
241
|
+
this._historyItemRefChanges = observableValue(this, {
|
|
242
|
+
added: [],
|
|
243
|
+
modified: [],
|
|
244
|
+
removed: [],
|
|
245
|
+
silent: false
|
|
246
|
+
});
|
|
189
247
|
}
|
|
190
248
|
async resolveHistoryItem(historyItemId, token) {
|
|
191
249
|
const historyItem = await this.proxy.$resolveHistoryItem(this.handle, historyItemId, token ?? CancellationToken.None);
|
|
@@ -195,21 +253,35 @@ class MainThreadSCMHistoryProvider {
|
|
|
195
253
|
return this.proxy.$resolveHistoryItemChatContext(this.handle, historyItemId, token ?? CancellationToken.None);
|
|
196
254
|
}
|
|
197
255
|
async resolveHistoryItemChangeRangeChatContext(historyItemId, historyItemParentId, path, token) {
|
|
198
|
-
return this.proxy.$resolveHistoryItemChangeRangeChatContext(
|
|
256
|
+
return this.proxy.$resolveHistoryItemChangeRangeChatContext(
|
|
257
|
+
this.handle,
|
|
258
|
+
historyItemId,
|
|
259
|
+
historyItemParentId,
|
|
260
|
+
path,
|
|
261
|
+
token ?? CancellationToken.None
|
|
262
|
+
);
|
|
199
263
|
}
|
|
200
264
|
async resolveHistoryItemRefsCommonAncestor(historyItemRefs, token) {
|
|
201
265
|
return this.proxy.$resolveHistoryItemRefsCommonAncestor(this.handle, historyItemRefs, token ?? CancellationToken.None);
|
|
202
266
|
}
|
|
203
267
|
async provideHistoryItemRefs(historyItemsRefs, token) {
|
|
204
268
|
const historyItemRefs = await this.proxy.$provideHistoryItemRefs(this.handle, historyItemsRefs, token ?? CancellationToken.None);
|
|
205
|
-
return historyItemRefs?.map(ref => ({
|
|
269
|
+
return historyItemRefs?.map(ref => ({
|
|
270
|
+
...ref,
|
|
271
|
+
icon: getIconFromIconDto(ref.icon)
|
|
272
|
+
}));
|
|
206
273
|
}
|
|
207
274
|
async provideHistoryItems(options, token) {
|
|
208
275
|
const historyItems = await this.proxy.$provideHistoryItems(this.handle, options, token ?? CancellationToken.None);
|
|
209
276
|
return historyItems?.map(historyItem => toISCMHistoryItem(historyItem));
|
|
210
277
|
}
|
|
211
278
|
async provideHistoryItemChanges(historyItemId, historyItemParentId, token) {
|
|
212
|
-
const changes = await this.proxy.$provideHistoryItemChanges(
|
|
279
|
+
const changes = await this.proxy.$provideHistoryItemChanges(
|
|
280
|
+
this.handle,
|
|
281
|
+
historyItemId,
|
|
282
|
+
historyItemParentId,
|
|
283
|
+
token ?? CancellationToken.None
|
|
284
|
+
);
|
|
213
285
|
return changes?.map(change => ({
|
|
214
286
|
uri: URI.revive(change.uri),
|
|
215
287
|
originalUri: change.originalUri && URI.revive(change.originalUri),
|
|
@@ -227,33 +299,83 @@ class MainThreadSCMHistoryProvider {
|
|
|
227
299
|
const added = ( historyItemRefs.added.map(ref => toISCMHistoryItemRef(ref)));
|
|
228
300
|
const modified = ( historyItemRefs.modified.map(ref => toISCMHistoryItemRef(ref)));
|
|
229
301
|
const removed = ( historyItemRefs.removed.map(ref => toISCMHistoryItemRef(ref)));
|
|
230
|
-
this._historyItemRefChanges.set({
|
|
302
|
+
this._historyItemRefChanges.set({
|
|
303
|
+
added,
|
|
304
|
+
modified,
|
|
305
|
+
removed,
|
|
306
|
+
silent: historyItemRefs.silent
|
|
307
|
+
}, undefined);
|
|
231
308
|
}
|
|
232
309
|
}
|
|
233
310
|
class MainThreadSCMProvider {
|
|
234
|
-
get id() {
|
|
311
|
+
get id() {
|
|
312
|
+
return `scm${this._handle}`;
|
|
313
|
+
}
|
|
235
314
|
get parentId() {
|
|
236
|
-
return this._parentHandle !== undefined
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
get handle() {
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
get
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
get
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
get
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
get
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
315
|
+
return this._parentHandle !== undefined ? `scm${this._parentHandle}` : undefined;
|
|
316
|
+
}
|
|
317
|
+
get providerId() {
|
|
318
|
+
return this._providerId;
|
|
319
|
+
}
|
|
320
|
+
get handle() {
|
|
321
|
+
return this._handle;
|
|
322
|
+
}
|
|
323
|
+
get label() {
|
|
324
|
+
return this._label;
|
|
325
|
+
}
|
|
326
|
+
get rootUri() {
|
|
327
|
+
return this._rootUri;
|
|
328
|
+
}
|
|
329
|
+
get iconPath() {
|
|
330
|
+
return this._iconPath;
|
|
331
|
+
}
|
|
332
|
+
get isHidden() {
|
|
333
|
+
return this._isHidden;
|
|
334
|
+
}
|
|
335
|
+
get inputBoxTextModel() {
|
|
336
|
+
return this._inputBoxTextModel;
|
|
337
|
+
}
|
|
338
|
+
get contextValue() {
|
|
339
|
+
return this._contextValue;
|
|
340
|
+
}
|
|
341
|
+
get acceptInputCommand() {
|
|
342
|
+
return this.features.acceptInputCommand;
|
|
343
|
+
}
|
|
344
|
+
get count() {
|
|
345
|
+
return this._count;
|
|
346
|
+
}
|
|
347
|
+
get statusBarCommands() {
|
|
348
|
+
return this._statusBarCommands;
|
|
349
|
+
}
|
|
350
|
+
get name() {
|
|
351
|
+
return this._name ?? this._label;
|
|
352
|
+
}
|
|
353
|
+
get commitTemplate() {
|
|
354
|
+
return this._commitTemplate;
|
|
355
|
+
}
|
|
356
|
+
get actionButton() {
|
|
357
|
+
return this._actionButton;
|
|
358
|
+
}
|
|
359
|
+
get artifactProvider() {
|
|
360
|
+
return this._artifactProvider;
|
|
361
|
+
}
|
|
362
|
+
get historyProvider() {
|
|
363
|
+
return this._historyProvider;
|
|
364
|
+
}
|
|
365
|
+
constructor(
|
|
366
|
+
proxy,
|
|
367
|
+
_handle,
|
|
368
|
+
_parentHandle,
|
|
369
|
+
_providerId,
|
|
370
|
+
_label,
|
|
371
|
+
_rootUri,
|
|
372
|
+
_iconPath,
|
|
373
|
+
_isHidden,
|
|
374
|
+
_inputBoxTextModel,
|
|
375
|
+
_quickDiffService,
|
|
376
|
+
_uriIdentService,
|
|
377
|
+
_workspaceContextService
|
|
378
|
+
) {
|
|
257
379
|
this.proxy = proxy;
|
|
258
380
|
this._handle = _handle;
|
|
259
381
|
this._parentHandle = _parentHandle;
|
|
@@ -276,7 +398,7 @@ class MainThreadSCMProvider {
|
|
|
276
398
|
this._contextValue = observableValue(this, undefined);
|
|
277
399
|
this._count = observableValue(this, undefined);
|
|
278
400
|
this._statusBarCommands = observableValue(this, undefined);
|
|
279
|
-
this._commitTemplate = observableValue(this,
|
|
401
|
+
this._commitTemplate = observableValue(this, "");
|
|
280
402
|
this._actionButton = observableValue(this, undefined);
|
|
281
403
|
this._artifactProvider = observableValue(this, undefined);
|
|
282
404
|
this._historyProvider = observableValue(this, undefined);
|
|
@@ -284,27 +406,29 @@ class MainThreadSCMProvider {
|
|
|
284
406
|
const folder = this._workspaceContextService.getWorkspaceFolder(_rootUri);
|
|
285
407
|
if (folder?.uri.toString() === ( _rootUri.toString())) {
|
|
286
408
|
this._name = folder.name;
|
|
287
|
-
}
|
|
288
|
-
else if (_rootUri.path !== '/') {
|
|
409
|
+
} else if (_rootUri.path !== "/") {
|
|
289
410
|
this._name = basename(_rootUri);
|
|
290
411
|
}
|
|
291
412
|
}
|
|
292
413
|
}
|
|
293
414
|
$updateSourceControl(features) {
|
|
294
|
-
this.features = {
|
|
295
|
-
|
|
415
|
+
this.features = {
|
|
416
|
+
...this.features,
|
|
417
|
+
...features
|
|
418
|
+
};
|
|
419
|
+
if (typeof features.commitTemplate !== "undefined") {
|
|
296
420
|
this._commitTemplate.set(features.commitTemplate, undefined);
|
|
297
421
|
}
|
|
298
|
-
if (typeof features.actionButton !==
|
|
422
|
+
if (typeof features.actionButton !== "undefined") {
|
|
299
423
|
this._actionButton.set(features.actionButton ?? undefined, undefined);
|
|
300
424
|
}
|
|
301
|
-
if (typeof features.contextValue !==
|
|
425
|
+
if (typeof features.contextValue !== "undefined") {
|
|
302
426
|
this._contextValue.set(features.contextValue, undefined);
|
|
303
427
|
}
|
|
304
|
-
if (typeof features.count !==
|
|
428
|
+
if (typeof features.count !== "undefined") {
|
|
305
429
|
this._count.set(features.count, undefined);
|
|
306
430
|
}
|
|
307
|
-
if (typeof features.statusBarCommands !==
|
|
431
|
+
if (typeof features.statusBarCommands !== "undefined") {
|
|
308
432
|
this._statusBarCommands.set(features.statusBarCommands, undefined);
|
|
309
433
|
}
|
|
310
434
|
if (features.hasQuickDiffProvider && !this._quickDiff) {
|
|
@@ -312,8 +436,8 @@ class MainThreadSCMProvider {
|
|
|
312
436
|
id: `${this._providerId}.quickDiffProvider`,
|
|
313
437
|
label: features.quickDiffLabel ?? this.label,
|
|
314
438
|
rootUri: this.rootUri,
|
|
315
|
-
kind:
|
|
316
|
-
getOriginalResource: async
|
|
439
|
+
kind: "primary",
|
|
440
|
+
getOriginalResource: async uri => {
|
|
317
441
|
if (!this.features.hasQuickDiffProvider) {
|
|
318
442
|
return null;
|
|
319
443
|
}
|
|
@@ -321,8 +445,7 @@ class MainThreadSCMProvider {
|
|
|
321
445
|
return result && URI.revive(result);
|
|
322
446
|
}
|
|
323
447
|
});
|
|
324
|
-
}
|
|
325
|
-
else if (features.hasQuickDiffProvider === false && this._quickDiff) {
|
|
448
|
+
} else if (features.hasQuickDiffProvider === false && this._quickDiff) {
|
|
326
449
|
this._quickDiff.dispose();
|
|
327
450
|
this._quickDiff = undefined;
|
|
328
451
|
}
|
|
@@ -331,8 +454,8 @@ class MainThreadSCMProvider {
|
|
|
331
454
|
id: `${this._providerId}.secondaryQuickDiffProvider`,
|
|
332
455
|
label: features.secondaryQuickDiffLabel ?? this.label,
|
|
333
456
|
rootUri: this.rootUri,
|
|
334
|
-
kind:
|
|
335
|
-
getOriginalResource: async
|
|
457
|
+
kind: "secondary",
|
|
458
|
+
getOriginalResource: async uri => {
|
|
336
459
|
if (!this.features.hasSecondaryQuickDiffProvider) {
|
|
337
460
|
return null;
|
|
338
461
|
}
|
|
@@ -340,23 +463,20 @@ class MainThreadSCMProvider {
|
|
|
340
463
|
return result && URI.revive(result);
|
|
341
464
|
}
|
|
342
465
|
});
|
|
343
|
-
}
|
|
344
|
-
else if (features.hasSecondaryQuickDiffProvider === false && this._stagedQuickDiff) {
|
|
466
|
+
} else if (features.hasSecondaryQuickDiffProvider === false && this._stagedQuickDiff) {
|
|
345
467
|
this._stagedQuickDiff.dispose();
|
|
346
468
|
this._stagedQuickDiff = undefined;
|
|
347
469
|
}
|
|
348
470
|
if (features.hasArtifactProvider && !this.artifactProvider.get()) {
|
|
349
471
|
const artifactProvider = ( new MainThreadSCMArtifactProvider(this.proxy, this.handle));
|
|
350
472
|
this._artifactProvider.set(artifactProvider, undefined);
|
|
351
|
-
}
|
|
352
|
-
else if (features.hasArtifactProvider === false && this.artifactProvider.get()) {
|
|
473
|
+
} else if (features.hasArtifactProvider === false && this.artifactProvider.get()) {
|
|
353
474
|
this._artifactProvider.set(undefined, undefined);
|
|
354
475
|
}
|
|
355
476
|
if (features.hasHistoryProvider && !this.historyProvider.get()) {
|
|
356
477
|
const historyProvider = ( new MainThreadSCMHistoryProvider(this.proxy, this.handle));
|
|
357
478
|
this._historyProvider.set(historyProvider, undefined);
|
|
358
|
-
}
|
|
359
|
-
else if (features.hasHistoryProvider === false && this.historyProvider.get()) {
|
|
479
|
+
} else if (features.hasHistoryProvider === false && this.historyProvider.get()) {
|
|
360
480
|
this._historyProvider.set(undefined, undefined);
|
|
361
481
|
}
|
|
362
482
|
}
|
|
@@ -402,7 +522,18 @@ class MainThreadSCMProvider {
|
|
|
402
522
|
groupSlices.reverse();
|
|
403
523
|
for (const [start, deleteCount, rawResources] of groupSlices) {
|
|
404
524
|
const resources = ( rawResources.map(rawResource => {
|
|
405
|
-
const [
|
|
525
|
+
const [
|
|
526
|
+
handle,
|
|
527
|
+
sourceUri,
|
|
528
|
+
icons,
|
|
529
|
+
tooltip,
|
|
530
|
+
strikeThrough,
|
|
531
|
+
faded,
|
|
532
|
+
contextValue,
|
|
533
|
+
command,
|
|
534
|
+
multiDiffEditorOriginalUri,
|
|
535
|
+
multiDiffEditorModifiedUri
|
|
536
|
+
] = rawResource;
|
|
406
537
|
const [light, dark] = icons;
|
|
407
538
|
const icon = ThemeIcon.isThemeIcon(light) ? light : URI.revive(light);
|
|
408
539
|
const iconDark = (ThemeIcon.isThemeIcon(dark) ? dark : URI.revive(dark)) || icon;
|
|
@@ -481,7 +612,17 @@ class MainThreadSCMProvider {
|
|
|
481
612
|
}
|
|
482
613
|
}
|
|
483
614
|
let MainThreadSCM = class MainThreadSCM {
|
|
484
|
-
constructor(
|
|
615
|
+
constructor(
|
|
616
|
+
extHostContext,
|
|
617
|
+
scmService,
|
|
618
|
+
scmViewService,
|
|
619
|
+
languageService,
|
|
620
|
+
modelService,
|
|
621
|
+
textModelService,
|
|
622
|
+
quickDiffService,
|
|
623
|
+
_uriIdentService,
|
|
624
|
+
workspaceContextService
|
|
625
|
+
) {
|
|
485
626
|
this.scmService = scmService;
|
|
486
627
|
this.scmViewService = scmViewService;
|
|
487
628
|
this.languageService = languageService;
|
|
@@ -504,7 +645,16 @@ let MainThreadSCM = class MainThreadSCM {
|
|
|
504
645
|
this._repositoryDisposables.clear();
|
|
505
646
|
this._disposables.dispose();
|
|
506
647
|
}
|
|
507
|
-
async $registerSourceControl(
|
|
648
|
+
async $registerSourceControl(
|
|
649
|
+
handle,
|
|
650
|
+
parentHandle,
|
|
651
|
+
id,
|
|
652
|
+
label,
|
|
653
|
+
rootUri,
|
|
654
|
+
iconPath,
|
|
655
|
+
isHidden,
|
|
656
|
+
inputBoxDocumentUri
|
|
657
|
+
) {
|
|
508
658
|
this._repositoryBarriers.set(handle, ( new Barrier()));
|
|
509
659
|
const inputBoxTextModelRef = await this.textModelService.createModelReference(URI.revive(inputBoxDocumentUri));
|
|
510
660
|
const provider = ( new MainThreadSCMProvider(
|
|
@@ -523,13 +673,24 @@ let MainThreadSCM = class MainThreadSCM {
|
|
|
523
673
|
));
|
|
524
674
|
const repository = this.scmService.registerSCMProvider(provider);
|
|
525
675
|
this._repositories.set(handle, repository);
|
|
526
|
-
const disposable = combinedDisposable(
|
|
676
|
+
const disposable = combinedDisposable(
|
|
677
|
+
inputBoxTextModelRef,
|
|
678
|
+
Event.filter(this.scmViewService.onDidFocusRepository, r => r === repository)(_ => this._proxy.$setSelectedSourceControl(handle)),
|
|
679
|
+
repository.input.onDidChange((
|
|
680
|
+
{
|
|
681
|
+
value
|
|
682
|
+
}
|
|
683
|
+
) => this._proxy.$onInputBoxValueChange(handle, value))
|
|
684
|
+
);
|
|
527
685
|
this._repositoryDisposables.set(handle, disposable);
|
|
528
686
|
if (this.scmViewService.focusedRepository === repository) {
|
|
529
687
|
setTimeout(() => this._proxy.$setSelectedSourceControl(handle), 0);
|
|
530
688
|
}
|
|
531
689
|
if (repository.input.value) {
|
|
532
|
-
setTimeout(
|
|
690
|
+
setTimeout(
|
|
691
|
+
() => this._proxy.$onInputBoxValueChange(handle, repository.input.value),
|
|
692
|
+
0
|
|
693
|
+
);
|
|
533
694
|
}
|
|
534
695
|
this._repositoryBarriers.get(handle)?.open();
|
|
535
696
|
}
|
|
@@ -648,14 +809,21 @@ let MainThreadSCM = class MainThreadSCM {
|
|
|
648
809
|
if (enabled) {
|
|
649
810
|
repository.input.validateInput = async (value, pos) => {
|
|
650
811
|
const result = await this._proxy.$validateInput(sourceControlHandle, value, pos);
|
|
651
|
-
return result && {
|
|
812
|
+
return result && {
|
|
813
|
+
message: result[0],
|
|
814
|
+
type: result[1]
|
|
815
|
+
};
|
|
652
816
|
};
|
|
653
|
-
}
|
|
654
|
-
else {
|
|
817
|
+
} else {
|
|
655
818
|
repository.input.validateInput = async () => undefined;
|
|
656
819
|
}
|
|
657
820
|
}
|
|
658
|
-
async $onDidChangeHistoryProviderCurrentHistoryItemRefs(
|
|
821
|
+
async $onDidChangeHistoryProviderCurrentHistoryItemRefs(
|
|
822
|
+
sourceControlHandle,
|
|
823
|
+
historyItemRef,
|
|
824
|
+
historyItemRemoteRef,
|
|
825
|
+
historyItemBaseRef
|
|
826
|
+
) {
|
|
659
827
|
await this._repositoryBarriers.get(sourceControlHandle)?.wait();
|
|
660
828
|
const repository = this._repositories.get(sourceControlHandle);
|
|
661
829
|
if (!repository) {
|
|
@@ -683,16 +851,6 @@ let MainThreadSCM = class MainThreadSCM {
|
|
|
683
851
|
provider.$onDidChangeArtifacts(groups);
|
|
684
852
|
}
|
|
685
853
|
};
|
|
686
|
-
MainThreadSCM = __decorate([
|
|
687
|
-
extHostNamedCustomer(MainContext.MainThreadSCM),
|
|
688
|
-
( __param(1, ISCMService)),
|
|
689
|
-
( __param(2, ISCMViewService)),
|
|
690
|
-
( __param(3, ILanguageService)),
|
|
691
|
-
( __param(4, IModelService)),
|
|
692
|
-
( __param(5, ITextModelService)),
|
|
693
|
-
( __param(6, IQuickDiffService)),
|
|
694
|
-
( __param(7, IUriIdentityService)),
|
|
695
|
-
( __param(8, IWorkspaceContextService))
|
|
696
|
-
], MainThreadSCM);
|
|
854
|
+
MainThreadSCM = __decorate([extHostNamedCustomer(MainContext.MainThreadSCM), ( __param(1, ISCMService)), ( __param(2, ISCMViewService)), ( __param(3, ILanguageService)), ( __param(4, IModelService)), ( __param(5, ITextModelService)), ( __param(6, IQuickDiffService)), ( __param(7, IUriIdentityService)), ( __param(8, IWorkspaceContextService))], MainThreadSCM);
|
|
697
855
|
|
|
698
856
|
export { MainThreadSCM };
|
|
@@ -17,10 +17,10 @@ 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(2555, "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
|
-
return Promise.reject(( new Error(
|
|
23
|
+
return Promise.reject(( new Error("listener failed")));
|
|
24
24
|
}
|
|
25
25
|
return undefined;
|
|
26
26
|
}).then(resolve, reject);
|
|
@@ -31,16 +31,14 @@ class ExtHostSaveParticipant {
|
|
|
31
31
|
let SaveParticipant = class SaveParticipant {
|
|
32
32
|
constructor(extHostContext, instantiationService, _textFileService) {
|
|
33
33
|
this._textFileService = _textFileService;
|
|
34
|
-
this._saveParticipantDisposable = this._textFileService.files.addSaveParticipant(
|
|
34
|
+
this._saveParticipantDisposable = this._textFileService.files.addSaveParticipant(
|
|
35
|
+
instantiationService.createInstance(ExtHostSaveParticipant, extHostContext)
|
|
36
|
+
);
|
|
35
37
|
}
|
|
36
38
|
dispose() {
|
|
37
39
|
this._saveParticipantDisposable.dispose();
|
|
38
40
|
}
|
|
39
41
|
};
|
|
40
|
-
SaveParticipant = __decorate([
|
|
41
|
-
extHostCustomer,
|
|
42
|
-
( __param(1, IInstantiationService)),
|
|
43
|
-
( __param(2, ITextFileService))
|
|
44
|
-
], SaveParticipant);
|
|
42
|
+
SaveParticipant = __decorate([extHostCustomer, ( __param(1, IInstantiationService)), ( __param(2, ITextFileService))], SaveParticipant);
|
|
45
43
|
|
|
46
44
|
export { SaveParticipant };
|