@codingame/monaco-vscode-extensions-service-override 25.1.1 → 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.
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
@@ -17,7 +17,7 @@ import { ErrorNoTelemetry } from '@codingame/monaco-vscode-api/vscode/vs/base/co
17
17
  import { ConfigurationResolverExpression } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/configurationResolver/common/configurationResolverExpression';
18
18
 
19
19
  var TaskExecutionDTO;
20
- (function (TaskExecutionDTO) {
20
+ (function(TaskExecutionDTO) {
21
21
  function from(value) {
22
22
  return {
23
23
  id: value.id,
@@ -27,19 +27,19 @@ var TaskExecutionDTO;
27
27
  TaskExecutionDTO.from = from;
28
28
  })(TaskExecutionDTO || (TaskExecutionDTO = {}));
29
29
  var TaskProblemMatcherStartedDto;
30
- (function (TaskProblemMatcherStartedDto) {
30
+ (function(TaskProblemMatcherStartedDto) {
31
31
  function from(value) {
32
32
  return {
33
33
  execution: {
34
34
  id: value.execution.id,
35
35
  task: TaskDTO.from(value.execution.task)
36
- },
36
+ }
37
37
  };
38
38
  }
39
39
  TaskProblemMatcherStartedDto.from = from;
40
40
  })(TaskProblemMatcherStartedDto || (TaskProblemMatcherStartedDto = {}));
41
41
  var TaskProblemMatcherEndedDto;
42
- (function (TaskProblemMatcherEndedDto) {
42
+ (function(TaskProblemMatcherEndedDto) {
43
43
  function from(value) {
44
44
  return {
45
45
  execution: {
@@ -52,7 +52,7 @@ var TaskProblemMatcherEndedDto;
52
52
  TaskProblemMatcherEndedDto.from = from;
53
53
  })(TaskProblemMatcherEndedDto || (TaskProblemMatcherEndedDto = {}));
54
54
  var TaskProcessStartedDTO;
55
- (function (TaskProcessStartedDTO) {
55
+ (function(TaskProcessStartedDTO) {
56
56
  function from(value, processId) {
57
57
  return {
58
58
  id: value.id,
@@ -62,7 +62,7 @@ var TaskProcessStartedDTO;
62
62
  TaskProcessStartedDTO.from = from;
63
63
  })(TaskProcessStartedDTO || (TaskProcessStartedDTO = {}));
64
64
  var TaskProcessEndedDTO;
65
- (function (TaskProcessEndedDTO) {
65
+ (function(TaskProcessEndedDTO) {
66
66
  function from(value, exitCode) {
67
67
  return {
68
68
  id: value.id,
@@ -72,7 +72,7 @@ var TaskProcessEndedDTO;
72
72
  TaskProcessEndedDTO.from = from;
73
73
  })(TaskProcessEndedDTO || (TaskProcessEndedDTO = {}));
74
74
  var TaskDefinitionDTO;
75
- (function (TaskDefinitionDTO) {
75
+ (function(TaskDefinitionDTO) {
76
76
  function from(value) {
77
77
  const result = Object.assign(Object.create(null), value);
78
78
  delete result._key;
@@ -84,7 +84,7 @@ var TaskDefinitionDTO;
84
84
  if (result === undefined && executeOnly) {
85
85
  result = {
86
86
  _key: generateUuid(),
87
- type: '$executeOnly'
87
+ type: "$executeOnly"
88
88
  };
89
89
  }
90
90
  return result;
@@ -92,7 +92,7 @@ var TaskDefinitionDTO;
92
92
  TaskDefinitionDTO.to = to;
93
93
  })(TaskDefinitionDTO || (TaskDefinitionDTO = {}));
94
94
  var TaskPresentationOptionsDTO;
95
- (function (TaskPresentationOptionsDTO) {
95
+ (function(TaskPresentationOptionsDTO) {
96
96
  function from(value) {
97
97
  if (value === undefined || value === null) {
98
98
  return undefined;
@@ -109,7 +109,7 @@ var TaskPresentationOptionsDTO;
109
109
  TaskPresentationOptionsDTO.to = to;
110
110
  })(TaskPresentationOptionsDTO || (TaskPresentationOptionsDTO = {}));
111
111
  var RunOptionsDTO;
112
- (function (RunOptionsDTO) {
112
+ (function(RunOptionsDTO) {
113
113
  function from(value) {
114
114
  if (value === undefined || value === null) {
115
115
  return undefined;
@@ -126,7 +126,7 @@ var RunOptionsDTO;
126
126
  RunOptionsDTO.to = to;
127
127
  })(RunOptionsDTO || (RunOptionsDTO = {}));
128
128
  var ProcessExecutionOptionsDTO;
129
- (function (ProcessExecutionOptionsDTO) {
129
+ (function(ProcessExecutionOptionsDTO) {
130
130
  function from(value) {
131
131
  if (value === undefined || value === null) {
132
132
  return undefined;
@@ -149,7 +149,7 @@ var ProcessExecutionOptionsDTO;
149
149
  ProcessExecutionOptionsDTO.to = to;
150
150
  })(ProcessExecutionOptionsDTO || (ProcessExecutionOptionsDTO = {}));
151
151
  var ProcessExecutionDTO;
152
- (function (ProcessExecutionDTO) {
152
+ (function(ProcessExecutionDTO) {
153
153
  function is(value) {
154
154
  const candidate = value;
155
155
  return candidate && !!candidate.process;
@@ -181,7 +181,7 @@ var ProcessExecutionDTO;
181
181
  ProcessExecutionDTO.to = to;
182
182
  })(ProcessExecutionDTO || (ProcessExecutionDTO = {}));
183
183
  var ShellExecutionOptionsDTO;
184
- (function (ShellExecutionOptionsDTO) {
184
+ (function(ShellExecutionOptionsDTO) {
185
185
  function from(value) {
186
186
  if (value === undefined || value === null) {
187
187
  return undefined;
@@ -222,7 +222,7 @@ var ShellExecutionOptionsDTO;
222
222
  ShellExecutionOptionsDTO.to = to;
223
223
  })(ShellExecutionOptionsDTO || (ShellExecutionOptionsDTO = {}));
224
224
  var ShellExecutionDTO;
225
- (function (ShellExecutionDTO) {
225
+ (function(ShellExecutionDTO) {
226
226
  function is(value) {
227
227
  const candidate = value;
228
228
  return candidate && (!!candidate.commandLine || !!candidate.command);
@@ -232,8 +232,7 @@ var ShellExecutionDTO;
232
232
  const result = {};
233
233
  if (value.name && isString(value.name) && (value.args === undefined || value.args === null || value.args.length === 0)) {
234
234
  result.commandLine = value.name;
235
- }
236
- else {
235
+ } else {
237
236
  result.command = value.name;
238
237
  result.args = value.args;
239
238
  }
@@ -258,15 +257,15 @@ var ShellExecutionDTO;
258
257
  ShellExecutionDTO.to = to;
259
258
  })(ShellExecutionDTO || (ShellExecutionDTO = {}));
260
259
  var CustomExecutionDTO;
261
- (function (CustomExecutionDTO) {
260
+ (function(CustomExecutionDTO) {
262
261
  function is(value) {
263
262
  const candidate = value;
264
- return candidate && candidate.customExecution === 'customExecution';
263
+ return candidate && candidate.customExecution === "customExecution";
265
264
  }
266
265
  CustomExecutionDTO.is = is;
267
266
  function from(value) {
268
267
  return {
269
- customExecution: 'customExecution'
268
+ customExecution: "customExecution"
270
269
  };
271
270
  }
272
271
  CustomExecutionDTO.from = from;
@@ -279,7 +278,7 @@ var CustomExecutionDTO;
279
278
  CustomExecutionDTO.to = to;
280
279
  })(CustomExecutionDTO || (CustomExecutionDTO = {}));
281
280
  var TaskSourceDTO;
282
- (function (TaskSourceDTO) {
281
+ (function(TaskSourceDTO) {
283
282
  function from(value) {
284
283
  const result = {
285
284
  label: value.label
@@ -288,13 +287,11 @@ var TaskSourceDTO;
288
287
  result.extensionId = value.extension;
289
288
  if (value.workspaceFolder) {
290
289
  result.scope = value.workspaceFolder.uri;
291
- }
292
- else {
290
+ } else {
293
291
  result.scope = value.scope;
294
292
  }
295
- }
296
- else if (value.kind === TaskSourceKind.Workspace) {
297
- result.extensionId = '$core';
293
+ } else if (value.kind === TaskSourceKind.Workspace) {
294
+ result.extensionId = "$core";
298
295
  result.scope = value.config.workspaceFolder ? value.config.workspaceFolder.uri : TaskScope.Global;
299
296
  }
300
297
  return result;
@@ -303,20 +300,17 @@ var TaskSourceDTO;
303
300
  function to(value, workspace) {
304
301
  let scope;
305
302
  let workspaceFolder;
306
- if ((value.scope === undefined) || ((typeof value.scope === 'number') && (value.scope !== TaskScope.Global))) {
303
+ if ((value.scope === undefined) || ((typeof value.scope === "number") && (value.scope !== TaskScope.Global))) {
307
304
  if (workspace.getWorkspace().folders.length === 0) {
308
305
  scope = TaskScope.Global;
309
306
  workspaceFolder = undefined;
310
- }
311
- else {
307
+ } else {
312
308
  scope = TaskScope.Folder;
313
309
  workspaceFolder = workspace.getWorkspace().folders[0];
314
310
  }
315
- }
316
- else if (typeof value.scope === 'number') {
311
+ } else if (typeof value.scope === "number") {
317
312
  scope = value.scope;
318
- }
319
- else {
313
+ } else {
320
314
  scope = TaskScope.Folder;
321
315
  workspaceFolder = workspace.getWorkspaceFolder(URI.revive(value.scope)) ?? undefined;
322
316
  }
@@ -332,7 +326,7 @@ var TaskSourceDTO;
332
326
  TaskSourceDTO.to = to;
333
327
  })(TaskSourceDTO || (TaskSourceDTO = {}));
334
328
  var TaskHandleDTO;
335
- (function (TaskHandleDTO) {
329
+ (function(TaskHandleDTO) {
336
330
  function is(value) {
337
331
  const candidate = value;
338
332
  return !!candidate && isString(candidate.id) && !!candidate.workspaceFolder;
@@ -340,7 +334,7 @@ var TaskHandleDTO;
340
334
  TaskHandleDTO.is = is;
341
335
  })(TaskHandleDTO || (TaskHandleDTO = {}));
342
336
  var TaskDTO;
343
- (function (TaskDTO) {
337
+ (function(TaskDTO) {
344
338
  function from(task) {
345
339
  if (task === undefined || task === null || (!CustomTask.is(task) && !ContributedTask.is(task) && !ConfiguringTask.is(task))) {
346
340
  return undefined;
@@ -355,7 +349,7 @@ var TaskDTO;
355
349
  isBackground: task.configurationProperties.isBackground,
356
350
  problemMatchers: [],
357
351
  hasDefinedMatchers: ContributedTask.is(task) ? task.hasDefinedMatchers : false,
358
- runOptions: RunOptionsDTO.from(task.runOptions),
352
+ runOptions: RunOptionsDTO.from(task.runOptions)
359
353
  };
360
354
  result.group = TaskGroupDTO.from(task.configurationProperties.group);
361
355
  if (task.configurationProperties.detail) {
@@ -363,15 +357,15 @@ var TaskDTO;
363
357
  }
364
358
  if (!ConfiguringTask.is(task) && task.command) {
365
359
  switch (task.command.runtime) {
366
- case RuntimeType.Process:
367
- result.execution = ProcessExecutionDTO.from(task.command);
368
- break;
369
- case RuntimeType.Shell:
370
- result.execution = ShellExecutionDTO.from(task.command);
371
- break;
372
- case RuntimeType.CustomExecution:
373
- result.execution = CustomExecutionDTO.from(task.command);
374
- break;
360
+ case RuntimeType.Process:
361
+ result.execution = ProcessExecutionDTO.from(task.command);
362
+ break;
363
+ case RuntimeType.Shell:
364
+ result.execution = ShellExecutionDTO.from(task.command);
365
+ break;
366
+ case RuntimeType.CustomExecution:
367
+ result.execution = CustomExecutionDTO.from(task.command);
368
+ break;
375
369
  }
376
370
  }
377
371
  if (task.configurationProperties.problemMatchers) {
@@ -385,18 +379,16 @@ var TaskDTO;
385
379
  }
386
380
  TaskDTO.from = from;
387
381
  function to(task, workspace, executeOnly, icon, hide) {
388
- if (!task || (typeof task.name !== 'string')) {
382
+ if (!task || (typeof task.name !== "string")) {
389
383
  return undefined;
390
384
  }
391
385
  let command;
392
386
  if (task.execution) {
393
387
  if (ShellExecutionDTO.is(task.execution)) {
394
388
  command = ShellExecutionDTO.to(task.execution);
395
- }
396
- else if (ProcessExecutionDTO.is(task.execution)) {
389
+ } else if (ProcessExecutionDTO.is(task.execution)) {
397
390
  command = ProcessExecutionDTO.to(task.execution);
398
- }
399
- else if (CustomExecutionDTO.is(task.execution)) {
391
+ } else if (CustomExecutionDTO.is(task.execution)) {
400
392
  command = CustomExecutionDTO.to(task.execution);
401
393
  }
402
394
  }
@@ -405,7 +397,7 @@ var TaskDTO;
405
397
  }
406
398
  command.presentation = TaskPresentationOptionsDTO.to(task.presentationOptions);
407
399
  const source = TaskSourceDTO.to(task.source, workspace);
408
- const label = ( localize(2553, '{0}: {1}', source.label, task.name));
400
+ const label = ( localize(2556, "{0}: {1}", source.label, task.name));
409
401
  const definition = TaskDefinitionDTO.to(task.definition, executeOnly);
410
402
  const id = (CustomExecutionDTO.is(task.execution) && task._id) ? task._id : `${task.source.extensionId}.${definition._key}`;
411
403
  const result = ( new ContributedTask(
@@ -424,20 +416,20 @@ var TaskDTO;
424
416
  TaskDTO.to = to;
425
417
  })(TaskDTO || (TaskDTO = {}));
426
418
  var TaskGroupDTO;
427
- (function (TaskGroupDTO) {
419
+ (function(TaskGroupDTO) {
428
420
  function from(value) {
429
421
  if (value === undefined) {
430
422
  return undefined;
431
423
  }
432
424
  return {
433
- _id: (typeof value === 'string') ? value : value._id,
434
- isDefault: (typeof value === 'string') ? false : ((typeof value.isDefault === 'string') ? false : value.isDefault)
425
+ _id: (typeof value === "string") ? value : value._id,
426
+ isDefault: (typeof value === "string") ? false : ((typeof value.isDefault === "string") ? false : value.isDefault)
435
427
  };
436
428
  }
437
429
  TaskGroupDTO.from = from;
438
430
  })(TaskGroupDTO || (TaskGroupDTO = {}));
439
431
  var TaskFilterDTO;
440
- (function (TaskFilterDTO) {
432
+ (function(TaskFilterDTO) {
441
433
  function from(value) {
442
434
  return value;
443
435
  }
@@ -448,14 +440,19 @@ var TaskFilterDTO;
448
440
  TaskFilterDTO.to = to;
449
441
  })(TaskFilterDTO || (TaskFilterDTO = {}));
450
442
  let MainThreadTask = class MainThreadTask extends Disposable {
451
- constructor(extHostContext, _taskService, _workspaceContextServer, _configurationResolverService) {
443
+ constructor(
444
+ extHostContext,
445
+ _taskService,
446
+ _workspaceContextServer,
447
+ _configurationResolverService
448
+ ) {
452
449
  super();
453
450
  this._taskService = _taskService;
454
451
  this._workspaceContextServer = _workspaceContextServer;
455
452
  this._configurationResolverService = _configurationResolverService;
456
453
  this._proxy = ( extHostContext.getProxy(ExtHostContext.ExtHostTask));
457
454
  this._providers = ( new Map());
458
- this._register(this._taskService.onDidStateChange(async (event) => {
455
+ this._register(this._taskService.onDidStateChange(async event => {
459
456
  if (event.kind === TaskEventKind.Changed) {
460
457
  return;
461
458
  }
@@ -474,24 +471,26 @@ let MainThreadTask = class MainThreadTask extends Disposable {
474
471
  resolvedDefinition = await this._configurationResolverService.resolveAsync(task.getWorkspaceFolder(), expr);
475
472
  }
476
473
  this._proxy.$onDidStartTask(execution, event.terminalId, resolvedDefinition);
477
- }
478
- else if (event.kind === TaskEventKind.ProcessStarted) {
474
+ } else if (event.kind === TaskEventKind.ProcessStarted) {
479
475
  this._proxy.$onDidStartTaskProcess(TaskProcessStartedDTO.from(task.getTaskExecution(), event.processId));
480
- }
481
- else if (event.kind === TaskEventKind.ProcessEnded) {
476
+ } else if (event.kind === TaskEventKind.ProcessEnded) {
482
477
  this._proxy.$onDidEndTaskProcess(TaskProcessEndedDTO.from(task.getTaskExecution(), event.exitCode));
483
- }
484
- else if (event.kind === TaskEventKind.End) {
478
+ } else if (event.kind === TaskEventKind.End) {
485
479
  this._proxy.$OnDidEndTask(TaskExecutionDTO.from(task.getTaskExecution()));
486
- }
487
- else if (event.kind === TaskEventKind.ProblemMatcherStarted) {
488
- this._proxy.$onDidStartTaskProblemMatchers(TaskProblemMatcherStartedDto.from({ execution: task.getTaskExecution() }));
489
- }
490
- else if (event.kind === TaskEventKind.ProblemMatcherEnded) {
491
- this._proxy.$onDidEndTaskProblemMatchers(TaskProblemMatcherEndedDto.from({ execution: task.getTaskExecution(), hasErrors: false }));
492
- }
493
- else if (event.kind === TaskEventKind.ProblemMatcherFoundErrors) {
494
- this._proxy.$onDidEndTaskProblemMatchers(TaskProblemMatcherEndedDto.from({ execution: task.getTaskExecution(), hasErrors: true }));
480
+ } else if (event.kind === TaskEventKind.ProblemMatcherStarted) {
481
+ this._proxy.$onDidStartTaskProblemMatchers(TaskProblemMatcherStartedDto.from({
482
+ execution: task.getTaskExecution()
483
+ }));
484
+ } else if (event.kind === TaskEventKind.ProblemMatcherEnded) {
485
+ this._proxy.$onDidEndTaskProblemMatchers(TaskProblemMatcherEndedDto.from({
486
+ execution: task.getTaskExecution(),
487
+ hasErrors: false
488
+ }));
489
+ } else if (event.kind === TaskEventKind.ProblemMatcherFoundErrors) {
490
+ this._proxy.$onDidEndTaskProblemMatchers(TaskProblemMatcherEndedDto.from({
491
+ execution: task.getTaskExecution(),
492
+ hasErrors: true
493
+ }));
495
494
  }
496
495
  }));
497
496
  }
@@ -507,24 +506,24 @@ let MainThreadTask = class MainThreadTask extends Disposable {
507
506
  const task = TaskDTO.to(taskDTO, this._workspaceContextServer, true);
508
507
  if (task) {
509
508
  resolve(task._id);
510
- }
511
- else {
512
- reject(( new Error('Task could not be created from DTO')));
509
+ } else {
510
+ reject(( new Error("Task could not be created from DTO")));
513
511
  }
514
512
  }));
515
513
  }
516
514
  $registerTaskProvider(handle, type) {
517
515
  const provider = {
518
- provideTasks: (validTypes) => {
519
- return Promise.resolve(this._proxy.$provideTasks(handle, validTypes)).then((value) => {
516
+ provideTasks: validTypes => {
517
+ return Promise.resolve(this._proxy.$provideTasks(handle, validTypes)).then(value => {
520
518
  const tasks = [];
521
519
  for (const dto of value.tasks) {
522
520
  const task = TaskDTO.to(dto, this._workspaceContextServer, true);
523
521
  if (task) {
524
522
  tasks.push(task);
525
- }
526
- else {
527
- console.error(`Task System: can not convert task: ${JSON.stringify(dto.definition, undefined, 0)}. Task will be dropped`);
523
+ } else {
524
+ console.error(
525
+ `Task System: can not convert task: ${JSON.stringify(dto.definition, undefined, 0)}. Task will be dropped`
526
+ );
528
527
  }
529
528
  }
530
529
  const processedExtension = {
@@ -537,13 +536,19 @@ let MainThreadTask = class MainThreadTask extends Disposable {
537
536
  };
538
537
  });
539
538
  },
540
- resolveTask: (task) => {
539
+ resolveTask: task => {
541
540
  const dto = TaskDTO.from(task);
542
541
  if (dto) {
543
- dto.name = ((dto.name === undefined) ? '' : dto.name);
542
+ dto.name = ((dto.name === undefined) ? "" : dto.name);
544
543
  return Promise.resolve(this._proxy.$resolveTask(handle, dto)).then(resolvedTask => {
545
544
  if (resolvedTask) {
546
- return TaskDTO.to(resolvedTask, this._workspaceContextServer, true, task.configurationProperties.icon, task.configurationProperties.hide);
545
+ return TaskDTO.to(
546
+ resolvedTask,
547
+ this._workspaceContextServer,
548
+ true,
549
+ task.configurationProperties.icon,
550
+ task.configurationProperties.hide
551
+ );
547
552
  }
548
553
  return undefined;
549
554
  });
@@ -552,7 +557,10 @@ let MainThreadTask = class MainThreadTask extends Disposable {
552
557
  }
553
558
  };
554
559
  const disposable = this._taskService.registerTaskProvider(provider, type);
555
- this._providers.set(handle, { disposable, provider });
560
+ this._providers.set(handle, {
561
+ disposable,
562
+ provider
563
+ });
556
564
  return Promise.resolve(undefined);
557
565
  }
558
566
  $unregisterTaskProvider(handle) {
@@ -564,7 +572,7 @@ let MainThreadTask = class MainThreadTask extends Disposable {
564
572
  return Promise.resolve(undefined);
565
573
  }
566
574
  $fetchTasks(filter) {
567
- return this._taskService.tasks(TaskFilterDTO.to(filter)).then((tasks) => {
575
+ return this._taskService.tasks(TaskFilterDTO.to(filter)).then(tasks => {
568
576
  const result = [];
569
577
  for (const task of tasks) {
570
578
  const item = TaskDTO.from(task);
@@ -577,16 +585,14 @@ let MainThreadTask = class MainThreadTask extends Disposable {
577
585
  }
578
586
  getWorkspace(value) {
579
587
  let workspace;
580
- if (typeof value === 'string') {
588
+ if (typeof value === "string") {
581
589
  workspace = value;
582
- }
583
- else {
590
+ } else {
584
591
  const workspaceObject = this._workspaceContextServer.getWorkspace();
585
592
  const uri = URI.revive(value);
586
593
  if (workspaceObject.configuration?.toString() === ( uri.toString())) {
587
594
  workspace = workspaceObject;
588
- }
589
- else {
595
+ } else {
590
596
  workspace = this._workspaceContextServer.getWorkspaceFolder(uri);
591
597
  }
592
598
  }
@@ -603,13 +609,11 @@ let MainThreadTask = class MainThreadTask extends Disposable {
603
609
  task: TaskDTO.from(task)
604
610
  };
605
611
  }
606
- throw ( new Error('Task not found'));
607
- }
608
- else {
609
- throw ( new Error('No workspace folder'));
612
+ throw ( new Error("Task not found"));
613
+ } else {
614
+ throw ( new Error("No workspace folder"));
610
615
  }
611
- }
612
- else {
616
+ } else {
613
617
  const task = TaskDTO.to(value, this._workspaceContextServer, true);
614
618
  return {
615
619
  id: task._id,
@@ -622,11 +626,10 @@ let MainThreadTask = class MainThreadTask extends Disposable {
622
626
  if (TaskHandleDTO.is(value)) {
623
627
  const workspace = this.getWorkspace(value.workspaceFolder);
624
628
  if (workspace) {
625
- this._taskService.getTask(workspace, value.id, true).then((task) => {
629
+ this._taskService.getTask(workspace, value.id, true).then(task => {
626
630
  if (!task) {
627
- reject(( new Error('Task not found')));
628
- }
629
- else {
631
+ reject(( new Error("Task not found")));
632
+ } else {
630
633
  const result = {
631
634
  id: value.id,
632
635
  task: TaskDTO.from(task)
@@ -635,22 +638,18 @@ let MainThreadTask = class MainThreadTask extends Disposable {
635
638
  if ((summary?.exitCode === undefined) || (summary.exitCode !== 0)) {
636
639
  this._proxy.$OnDidEndTask(result);
637
640
  }
638
- }, reason => {
639
- });
641
+ }, reason => {});
640
642
  resolve(result);
641
643
  }
642
- }, (_error) => {
643
- reject(( new Error('Task not found')));
644
+ }, _error => {
645
+ reject(( new Error("Task not found")));
644
646
  });
647
+ } else {
648
+ reject(( new Error("No workspace folder")));
645
649
  }
646
- else {
647
- reject(( new Error('No workspace folder')));
648
- }
649
- }
650
- else {
650
+ } else {
651
651
  const task = TaskDTO.to(value, this._workspaceContextServer, true);
652
- this._taskService.run(task).then(undefined, reason => {
653
- });
652
+ this._taskService.run(task).then(undefined, reason => {});
654
653
  const result = {
655
654
  id: task._id,
656
655
  task: TaskDTO.from(task)
@@ -661,69 +660,76 @@ let MainThreadTask = class MainThreadTask extends Disposable {
661
660
  }
662
661
  $customExecutionComplete(id, result) {
663
662
  return ( new Promise((resolve, reject) => {
664
- this._taskService.getActiveTasks().then((tasks) => {
663
+ this._taskService.getActiveTasks().then(tasks => {
665
664
  for (const task of tasks) {
666
665
  if (id === task._id) {
667
- this._taskService.extensionCallbackTaskComplete(task, result).then((value) => {
666
+ this._taskService.extensionCallbackTaskComplete(task, result).then(value => {
668
667
  resolve(undefined);
669
- }, (error) => {
668
+ }, error => {
670
669
  reject(error);
671
670
  });
672
671
  return;
673
672
  }
674
673
  }
675
- reject(( new Error('Task to mark as complete not found')));
674
+ reject(( new Error("Task to mark as complete not found")));
676
675
  });
677
676
  }));
678
677
  }
679
678
  $terminateTask(id) {
680
679
  return ( new Promise((resolve, reject) => {
681
- this._taskService.getActiveTasks().then((tasks) => {
680
+ this._taskService.getActiveTasks().then(tasks => {
682
681
  for (const task of tasks) {
683
682
  if (id === task._id) {
684
- this._taskService.terminate(task).then((value) => {
683
+ this._taskService.terminate(task).then(value => {
685
684
  resolve(undefined);
686
- }, (error) => {
685
+ }, error => {
687
686
  reject(undefined);
688
687
  });
689
688
  return;
690
689
  }
691
690
  }
692
- reject(( new ErrorNoTelemetry('Task to terminate not found')));
691
+ reject(( new ErrorNoTelemetry("Task to terminate not found")));
693
692
  });
694
693
  }));
695
694
  }
696
695
  $registerTaskSystem(key, info) {
697
696
  let platform$1;
698
697
  switch (info.platform) {
699
- case 'Web':
700
- platform$1 = Platform.Web;
701
- break;
702
- case 'win32':
703
- platform$1 = Platform.Windows;
704
- break;
705
- case 'darwin':
706
- platform$1 = Platform.Mac;
707
- break;
708
- case 'linux':
709
- platform$1 = Platform.Linux;
710
- break;
711
- default:
712
- platform$1 = platform;
698
+ case "Web":
699
+ platform$1 = Platform.Web;
700
+ break;
701
+ case "win32":
702
+ platform$1 = Platform.Windows;
703
+ break;
704
+ case "darwin":
705
+ platform$1 = Platform.Mac;
706
+ break;
707
+ case "linux":
708
+ platform$1 = Platform.Linux;
709
+ break;
710
+ default:
711
+ platform$1 = platform;
713
712
  }
714
713
  this._taskService.registerTaskSystem(key, {
715
714
  platform: platform$1,
716
- uriProvider: (path) => {
717
- return ( URI.from({ scheme: info.scheme, authority: info.authority, path }));
715
+ uriProvider: path => {
716
+ return ( URI.from({
717
+ scheme: info.scheme,
718
+ authority: info.authority,
719
+ path
720
+ }));
718
721
  },
719
722
  context: this._extHostContext,
720
723
  resolveVariables: (workspaceFolder, toResolve, target) => {
721
724
  const vars = [];
722
725
  toResolve.variables.forEach(item => vars.push(item));
723
- return Promise.resolve(this._proxy.$resolveVariables(workspaceFolder.uri, { process: toResolve.process, variables: vars })).then(values => {
726
+ return Promise.resolve(this._proxy.$resolveVariables(workspaceFolder.uri, {
727
+ process: toResolve.process,
728
+ variables: vars
729
+ })).then(values => {
724
730
  const partiallyResolvedVars = Array.from(( Object.values(values.variables)));
725
731
  return ( new Promise((resolve, reject) => {
726
- this._configurationResolverService.resolveWithInteraction(workspaceFolder, partiallyResolvedVars, 'tasks', undefined, target).then(resolvedVars => {
732
+ this._configurationResolverService.resolveWithInteraction(workspaceFolder, partiallyResolvedVars, "tasks", undefined, target).then(resolvedVars => {
727
733
  if (!resolvedVars) {
728
734
  resolve(undefined);
729
735
  }
@@ -735,11 +741,10 @@ let MainThreadTask = class MainThreadTask extends Disposable {
735
741
  const variableName = vars[i].substring(2, vars[i].length - 1);
736
742
  if (resolvedVars && values.variables[vars[i]] === vars[i]) {
737
743
  const resolved = resolvedVars.get(variableName);
738
- if (typeof resolved === 'string') {
744
+ if (typeof resolved === "string") {
739
745
  result.variables.set(variableName, resolved);
740
746
  }
741
- }
742
- else {
747
+ } else {
743
748
  result.variables.set(variableName, partiallyResolvedVars[i]);
744
749
  }
745
750
  }
@@ -762,11 +767,6 @@ let MainThreadTask = class MainThreadTask extends Disposable {
762
767
  return this._taskService.registerSupportedExecutions(custom, shell, process);
763
768
  }
764
769
  };
765
- MainThreadTask = __decorate([
766
- extHostNamedCustomer(MainContext.MainThreadTask),
767
- ( __param(1, ITaskService)),
768
- ( __param(2, IWorkspaceContextService)),
769
- ( __param(3, IConfigurationResolverService))
770
- ], MainThreadTask);
770
+ MainThreadTask = __decorate([extHostNamedCustomer(MainContext.MainThreadTask), ( __param(1, ITaskService)), ( __param(2, IWorkspaceContextService)), ( __param(3, IConfigurationResolverService))], MainThreadTask);
771
771
 
772
772
  export { MainThreadTask, TaskProblemMatcherEndedDto, TaskProblemMatcherStartedDto };