@codingame/monaco-vscode-extensions-service-override 25.1.2 → 26.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.
Files changed (120) hide show
  1. package/index.js +7 -0
  2. package/package.json +3 -3
  3. package/vscode/src/vs/base/common/console.js +24 -15
  4. package/vscode/src/vs/platform/extensionManagement/common/extensionManagementCLI.d.ts +4 -1
  5. package/vscode/src/vs/platform/extensionManagement/common/extensionManagementCLI.js +149 -84
  6. package/vscode/src/vs/platform/extensionResourceLoader/browser/extensionResourceLoaderService.js +20 -12
  7. package/vscode/src/vs/platform/extensionResourceLoader/common/extensionResourceLoader.js +38 -21
  8. package/vscode/src/vs/platform/remote/common/managedSocket.js +7 -10
  9. package/vscode/src/vs/workbench/api/browser/mainThreadAiEmbeddingVector.js +5 -2
  10. package/vscode/src/vs/workbench/api/browser/mainThreadAiRelatedInformation.js +5 -2
  11. package/vscode/src/vs/workbench/api/browser/mainThreadAiSettingsSearch.js +4 -1
  12. package/vscode/src/vs/workbench/api/browser/mainThreadAuthentication.js +200 -143
  13. package/vscode/src/vs/workbench/api/browser/mainThreadBulkEdits.js +10 -14
  14. package/vscode/src/vs/workbench/api/browser/mainThreadCLICommands.js +41 -31
  15. package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents2.d.ts +9 -12
  16. package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents2.js +168 -115
  17. package/vscode/src/vs/workbench/api/browser/mainThreadChatCodeMapper.js +11 -13
  18. package/vscode/src/vs/workbench/api/browser/mainThreadChatContext.d.ts +5 -5
  19. package/vscode/src/vs/workbench/api/browser/mainThreadChatContext.js +42 -15
  20. package/vscode/src/vs/workbench/api/browser/mainThreadChatOutputRenderer.js +8 -7
  21. package/vscode/src/vs/workbench/api/browser/mainThreadChatSessions.d.ts +4 -2
  22. package/vscode/src/vs/workbench/api/browser/mainThreadChatSessions.js +170 -99
  23. package/vscode/src/vs/workbench/api/browser/mainThreadChatStatus.js +2 -5
  24. package/vscode/src/vs/workbench/api/browser/mainThreadClipboard.js +4 -9
  25. package/vscode/src/vs/workbench/api/browser/mainThreadCodeInsets.js +13 -12
  26. package/vscode/src/vs/workbench/api/browser/mainThreadCommands.js +16 -19
  27. package/vscode/src/vs/workbench/api/browser/mainThreadComments.js +127 -70
  28. package/vscode/src/vs/workbench/api/browser/mainThreadConfiguration.js +80 -26
  29. package/vscode/src/vs/workbench/api/browser/mainThreadConsole.js +5 -11
  30. package/vscode/src/vs/workbench/api/browser/mainThreadCustomEditors.js +199 -97
  31. package/vscode/src/vs/workbench/api/browser/mainThreadDataChannels.js +1 -4
  32. package/vscode/src/vs/workbench/api/browser/mainThreadDebugService.js +88 -73
  33. package/vscode/src/vs/workbench/api/browser/mainThreadDecorations.js +5 -5
  34. package/vscode/src/vs/workbench/api/browser/mainThreadDiagnostics.js +16 -12
  35. package/vscode/src/vs/workbench/api/browser/mainThreadDialogs.js +10 -8
  36. package/vscode/src/vs/workbench/api/browser/mainThreadDocumentContentProviders.js +14 -6
  37. package/vscode/src/vs/workbench/api/browser/mainThreadDocuments.js +52 -37
  38. package/vscode/src/vs/workbench/api/browser/mainThreadDocumentsAndEditors.js +78 -58
  39. package/vscode/src/vs/workbench/api/browser/mainThreadEditSessionIdentityParticipant.js +5 -7
  40. package/vscode/src/vs/workbench/api/browser/mainThreadEditor.js +75 -63
  41. package/vscode/src/vs/workbench/api/browser/mainThreadEditorTabs.js +99 -91
  42. package/vscode/src/vs/workbench/api/browser/mainThreadEditors.js +93 -55
  43. package/vscode/src/vs/workbench/api/browser/mainThreadEmbeddings.js +3 -7
  44. package/vscode/src/vs/workbench/api/browser/mainThreadExtensionService.js +85 -60
  45. package/vscode/src/vs/workbench/api/browser/mainThreadFileSystem.js +49 -45
  46. package/vscode/src/vs/workbench/api/browser/mainThreadFileSystemEventService.js +114 -72
  47. package/vscode/src/vs/workbench/api/browser/mainThreadInteractive.js +4 -7
  48. package/vscode/src/vs/workbench/api/browser/mainThreadLabelService.js +1 -4
  49. package/vscode/src/vs/workbench/api/browser/mainThreadLanguageFeatures.d.ts +2 -2
  50. package/vscode/src/vs/workbench/api/browser/mainThreadLanguageFeatures.js +381 -238
  51. package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModelTools.d.ts +7 -3
  52. package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModelTools.js +90 -13
  53. package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModels.js +81 -58
  54. package/vscode/src/vs/workbench/api/browser/mainThreadLanguages.js +9 -10
  55. package/vscode/src/vs/workbench/api/browser/mainThreadLocalization.js +2 -7
  56. package/vscode/src/vs/workbench/api/browser/mainThreadLogService.js +6 -10
  57. package/vscode/src/vs/workbench/api/browser/mainThreadManagedSockets.js +12 -10
  58. package/vscode/src/vs/workbench/api/browser/mainThreadMcp.d.ts +3 -2
  59. package/vscode/src/vs/workbench/api/browser/mainThreadMcp.js +162 -97
  60. package/vscode/src/vs/workbench/api/browser/mainThreadMessageService.js +32 -26
  61. package/vscode/src/vs/workbench/api/browser/mainThreadNotebook.js +38 -32
  62. package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDocuments.js +48 -46
  63. package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDocumentsAndEditors.js +22 -18
  64. package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDto.js +5 -8
  65. package/vscode/src/vs/workbench/api/browser/mainThreadNotebookEditors.js +35 -21
  66. package/vscode/src/vs/workbench/api/browser/mainThreadNotebookKernels.js +31 -28
  67. package/vscode/src/vs/workbench/api/browser/mainThreadNotebookSaveParticipant.js +5 -7
  68. package/vscode/src/vs/workbench/api/browser/mainThreadOutputService.js +47 -23
  69. package/vscode/src/vs/workbench/api/browser/mainThreadProfileContentHandlers.js +15 -12
  70. package/vscode/src/vs/workbench/api/browser/mainThreadProgress.js +17 -18
  71. package/vscode/src/vs/workbench/api/browser/mainThreadQuickDiff.js +6 -7
  72. package/vscode/src/vs/workbench/api/browser/mainThreadQuickOpen.js +83 -66
  73. package/vscode/src/vs/workbench/api/browser/mainThreadRemoteConnectionData.js +1 -5
  74. package/vscode/src/vs/workbench/api/browser/mainThreadSCM.js +250 -92
  75. package/vscode/src/vs/workbench/api/browser/mainThreadSaveParticipant.js +6 -8
  76. package/vscode/src/vs/workbench/api/browser/mainThreadSearch.js +37 -26
  77. package/vscode/src/vs/workbench/api/browser/mainThreadSecretState.js +34 -21
  78. package/vscode/src/vs/workbench/api/browser/mainThreadShare.js +3 -6
  79. package/vscode/src/vs/workbench/api/browser/mainThreadSpeech.js +19 -14
  80. package/vscode/src/vs/workbench/api/browser/mainThreadStatusBar.js +41 -16
  81. package/vscode/src/vs/workbench/api/browser/mainThreadStorage.js +18 -17
  82. package/vscode/src/vs/workbench/api/browser/mainThreadTask.js +145 -145
  83. package/vscode/src/vs/workbench/api/browser/mainThreadTelemetry.js +19 -11
  84. package/vscode/src/vs/workbench/api/browser/mainThreadTerminalService.js +176 -80
  85. package/vscode/src/vs/workbench/api/browser/mainThreadTerminalShellIntegration.js +52 -21
  86. package/vscode/src/vs/workbench/api/browser/mainThreadTesting.js +26 -24
  87. package/vscode/src/vs/workbench/api/browser/mainThreadTheming.js +1 -4
  88. package/vscode/src/vs/workbench/api/browser/mainThreadTimeline.js +5 -8
  89. package/vscode/src/vs/workbench/api/browser/mainThreadTreeViews.d.ts +4 -1
  90. package/vscode/src/vs/workbench/api/browser/mainThreadTreeViews.js +106 -46
  91. package/vscode/src/vs/workbench/api/browser/mainThreadTunnelService.js +83 -65
  92. package/vscode/src/vs/workbench/api/browser/mainThreadUriOpeners.js +20 -20
  93. package/vscode/src/vs/workbench/api/browser/mainThreadUrls.js +14 -9
  94. package/vscode/src/vs/workbench/api/browser/mainThreadWebviewManager.js +17 -9
  95. package/vscode/src/vs/workbench/api/browser/mainThreadWebviewPanels.js +49 -38
  96. package/vscode/src/vs/workbench/api/browser/mainThreadWebviewViews.js +10 -13
  97. package/vscode/src/vs/workbench/api/browser/mainThreadWebviews.js +38 -27
  98. package/vscode/src/vs/workbench/api/browser/mainThreadWindow.js +5 -11
  99. package/vscode/src/vs/workbench/api/browser/mainThreadWorkspace.d.ts +4 -1
  100. package/vscode/src/vs/workbench/api/browser/mainThreadWorkspace.js +73 -43
  101. package/vscode/src/vs/workbench/api/common/shared/dataTransferCache.js +2 -2
  102. package/vscode/src/vs/workbench/contrib/customEditor/common/customTextEditorModel.js +17 -10
  103. package/vscode/src/vs/workbench/contrib/externalUriOpener/common/contributedOpeners.js +17 -11
  104. package/vscode/src/vs/workbench/services/extensionManagement/browser/extensionBisect.js +107 -80
  105. package/vscode/src/vs/workbench/services/extensionManagement/browser/webExtensionsScannerService.js +336 -175
  106. package/vscode/src/vs/workbench/services/extensions/browser/extensionService.js +126 -71
  107. package/vscode/src/vs/workbench/services/extensions/browser/webWorkerExtensionHost.js +76 -54
  108. package/vscode/src/vs/workbench/services/extensions/browser/webWorkerFileSystemProvider.js +1 -2
  109. package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.d.ts +2 -0
  110. package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.js +343 -192
  111. package/vscode/src/vs/workbench/services/extensions/common/extHostCustomers.js +5 -3
  112. package/vscode/src/vs/workbench/services/extensions/common/extensionHostManager.d.ts +0 -1
  113. package/vscode/src/vs/workbench/services/extensions/common/extensionHostManager.js +75 -68
  114. package/vscode/src/vs/workbench/services/extensions/common/extensionRunningLocationTracker.js +135 -36
  115. package/vscode/src/vs/workbench/services/extensions/common/extensionsProposedApi.js +22 -18
  116. package/vscode/src/vs/workbench/services/extensions/common/extensionsUtil.js +14 -12
  117. package/vscode/src/vs/workbench/services/extensions/common/lazyCreateExtensionHostManager.js +21 -9
  118. package/vscode/src/vs/workbench/services/extensions/common/remoteExtensionHost.js +48 -25
  119. package/vscode/src/vs/workbench/services/themes/browser/cssExtensionPoint.d.ts +24 -0
  120. 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 { light: URI.revive(icon.light), dark: URI.revive(icon.dark) };
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, icon: getIconFromIconDto(r.icon)
47
+ ...r,
48
+ icon: getIconFromIconDto(r.icon)
48
49
  }));
49
- return { ...historyItemDto, authorIcon, references };
50
+ return {
51
+ ...historyItemDto,
52
+ authorIcon,
53
+ references
54
+ };
50
55
  }
51
56
  function toISCMHistoryItemRef(historyItemRefDto, color) {
52
- return historyItemRefDto ? { ...historyItemRefDto, icon: getIconFromIconDto(historyItemRefDto.icon), color: color } : undefined;
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(textModelService.registerTextModelContentProvider(Schemas.vscodeSourceControl, this));
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('', this.languageService.createById('scminput'), resource);
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() { return !!this.features.hideWhenEmpty; }
81
- get contextValue() { return this.features.contextValue; }
82
- constructor(sourceControlHandle, handle, provider, features, label, id, multiDiffEditorEnableViewChanges, _uriIdentService) {
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 = { ...this.features, ...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(proxy, sourceControlHandle, groupHandle, handle, sourceUri, resourceGroup, decorations, contextValue, command, multiDiffEditorOriginalUri, multiDiffEditorModifiedUri) {
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 => ({ ...group, icon: getIconFromIconDto(group.icon) }));
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 => ({ ...artifact, icon: getIconFromIconDto(artifact.icon) }));
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() { return this._historyItemRef; }
170
- get historyItemRemoteRef() { return this._historyItemRemoteRef; }
171
- get historyItemBaseRef() { return this._historyItemBaseRef; }
172
- get historyItemRefChanges() { return this._historyItemRefChanges; }
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, { added: [], modified: [], removed: [], silent: false });
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(this.handle, historyItemId, historyItemParentId, path, token ?? CancellationToken.None);
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 => ({ ...ref, icon: getIconFromIconDto(ref.icon) }));
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(this.handle, historyItemId, historyItemParentId, token ?? CancellationToken.None);
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({ added, modified, removed, silent: historyItemRefs.silent }, undefined);
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() { return `scm${this._handle}`; }
311
+ get id() {
312
+ return `scm${this._handle}`;
313
+ }
235
314
  get parentId() {
236
- return this._parentHandle !== undefined
237
- ? `scm${this._parentHandle}`
238
- : undefined;
239
- }
240
- get providerId() { return this._providerId; }
241
- get handle() { return this._handle; }
242
- get label() { return this._label; }
243
- get rootUri() { return this._rootUri; }
244
- get iconPath() { return this._iconPath; }
245
- get isHidden() { return this._isHidden; }
246
- get inputBoxTextModel() { return this._inputBoxTextModel; }
247
- get contextValue() { return this._contextValue; }
248
- get acceptInputCommand() { return this.features.acceptInputCommand; }
249
- get count() { return this._count; }
250
- get statusBarCommands() { return this._statusBarCommands; }
251
- get name() { return this._name ?? this._label; }
252
- get commitTemplate() { return this._commitTemplate; }
253
- get actionButton() { return this._actionButton; }
254
- get artifactProvider() { return this._artifactProvider; }
255
- get historyProvider() { return this._historyProvider; }
256
- constructor(proxy, _handle, _parentHandle, _providerId, _label, _rootUri, _iconPath, _isHidden, _inputBoxTextModel, _quickDiffService, _uriIdentService, _workspaceContextService) {
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 = { ...this.features, ...features };
295
- if (typeof features.commitTemplate !== 'undefined') {
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 !== 'undefined') {
422
+ if (typeof features.actionButton !== "undefined") {
299
423
  this._actionButton.set(features.actionButton ?? undefined, undefined);
300
424
  }
301
- if (typeof features.contextValue !== 'undefined') {
425
+ if (typeof features.contextValue !== "undefined") {
302
426
  this._contextValue.set(features.contextValue, undefined);
303
427
  }
304
- if (typeof features.count !== 'undefined') {
428
+ if (typeof features.count !== "undefined") {
305
429
  this._count.set(features.count, undefined);
306
430
  }
307
- if (typeof features.statusBarCommands !== 'undefined') {
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: 'primary',
316
- getOriginalResource: async (uri) => {
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: 'secondary',
335
- getOriginalResource: async (uri) => {
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 [handle, sourceUri, icons, tooltip, strikeThrough, faded, contextValue, command, multiDiffEditorOriginalUri, multiDiffEditorModifiedUri] = rawResource;
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(extHostContext, scmService, scmViewService, languageService, modelService, textModelService, quickDiffService, _uriIdentService, workspaceContextService) {
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(handle, parentHandle, id, label, rootUri, iconPath, isHidden, inputBoxDocumentUri) {
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(inputBoxTextModelRef, Event.filter(this.scmViewService.onDidFocusRepository, r => r === repository)(_ => this._proxy.$setSelectedSourceControl(handle)), repository.input.onDidChange(({ value }) => this._proxy.$onInputBoxValueChange(handle, value)));
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(() => this._proxy.$onInputBoxValueChange(handle, repository.input.value), 0);
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 && { message: result[0], type: result[1] };
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(sourceControlHandle, historyItemRef, historyItemRemoteRef, historyItemBaseRef) {
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(2552, "Aborted onWillSaveTextDocument-event after 1750ms"))))), 1750);
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('listener failed')));
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(instantiationService.createInstance(ExtHostSaveParticipant, extHostContext));
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 };