@codingame/monaco-vscode-extensions-service-override 14.0.6 → 15.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 (81) hide show
  1. package/index.js +0 -1
  2. package/package.json +28 -28
  3. package/vscode/src/vs/platform/extensionManagement/common/extensionManagementCLI.js +28 -28
  4. package/vscode/src/vs/workbench/api/browser/mainThreadAuthentication.d.ts +4 -5
  5. package/vscode/src/vs/workbench/api/browser/mainThreadAuthentication.js +13 -10
  6. package/vscode/src/vs/workbench/api/browser/mainThreadBulkEdits.d.ts +1 -1
  7. package/vscode/src/vs/workbench/api/browser/mainThreadBulkEdits.js +3 -2
  8. package/vscode/src/vs/workbench/api/browser/mainThreadCLICommands.js +1 -1
  9. package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents2.d.ts +1 -1
  10. package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents2.js +22 -7
  11. package/vscode/src/vs/workbench/api/browser/mainThreadChatCodeMapper.js +12 -1
  12. package/vscode/src/vs/workbench/api/browser/mainThreadCodeInsets.d.ts +1 -1
  13. package/vscode/src/vs/workbench/api/browser/mainThreadCodeInsets.js +1 -1
  14. package/vscode/src/vs/workbench/api/browser/mainThreadComments.d.ts +1 -1
  15. package/vscode/src/vs/workbench/api/browser/mainThreadComments.js +2 -2
  16. package/vscode/src/vs/workbench/api/browser/mainThreadCustomEditors.js +6 -6
  17. package/vscode/src/vs/workbench/api/browser/mainThreadDebugService.js +2 -2
  18. package/vscode/src/vs/workbench/api/browser/mainThreadDocumentContentProviders.d.ts +4 -4
  19. package/vscode/src/vs/workbench/api/browser/mainThreadDocumentContentProviders.js +4 -4
  20. package/vscode/src/vs/workbench/api/browser/mainThreadDocuments.d.ts +6 -3
  21. package/vscode/src/vs/workbench/api/browser/mainThreadDocuments.js +31 -12
  22. package/vscode/src/vs/workbench/api/browser/mainThreadDocumentsAndEditors.d.ts +3 -3
  23. package/vscode/src/vs/workbench/api/browser/mainThreadDocumentsAndEditors.js +6 -5
  24. package/vscode/src/vs/workbench/api/browser/mainThreadEditSessionIdentityParticipant.js +1 -1
  25. package/vscode/src/vs/workbench/api/browser/mainThreadEditor.d.ts +3 -3
  26. package/vscode/src/vs/workbench/api/browser/mainThreadEditor.js +1 -0
  27. package/vscode/src/vs/workbench/api/browser/mainThreadEditorTabs.d.ts +1 -1
  28. package/vscode/src/vs/workbench/api/browser/mainThreadEditorTabs.js +8 -8
  29. package/vscode/src/vs/workbench/api/browser/mainThreadEditors.d.ts +2 -2
  30. package/vscode/src/vs/workbench/api/browser/mainThreadEditors.js +6 -6
  31. package/vscode/src/vs/workbench/api/browser/mainThreadExtensionService.js +11 -11
  32. package/vscode/src/vs/workbench/api/browser/mainThreadFileSystem.js +70 -32
  33. package/vscode/src/vs/workbench/api/browser/mainThreadFileSystemEventService.d.ts +1 -1
  34. package/vscode/src/vs/workbench/api/browser/mainThreadFileSystemEventService.js +23 -23
  35. package/vscode/src/vs/workbench/api/browser/mainThreadLabelService.d.ts +1 -1
  36. package/vscode/src/vs/workbench/api/browser/mainThreadLanguageFeatures.d.ts +4 -4
  37. package/vscode/src/vs/workbench/api/browser/mainThreadLanguageFeatures.js +19 -9
  38. package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModelTools.d.ts +2 -1
  39. package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModelTools.js +7 -2
  40. package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModels.js +9 -2
  41. package/vscode/src/vs/workbench/api/browser/mainThreadLanguages.d.ts +3 -3
  42. package/vscode/src/vs/workbench/api/browser/mainThreadLanguages.js +3 -3
  43. package/vscode/src/vs/workbench/api/browser/mainThreadMessageService.js +4 -4
  44. package/vscode/src/vs/workbench/api/browser/mainThreadNotebook.js +1 -1
  45. package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDocumentsAndEditors.js +2 -2
  46. package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDto.d.ts +1 -1
  47. package/vscode/src/vs/workbench/api/browser/mainThreadNotebookEditors.d.ts +2 -2
  48. package/vscode/src/vs/workbench/api/browser/mainThreadNotebookEditors.js +2 -2
  49. package/vscode/src/vs/workbench/api/browser/mainThreadNotebookKernels.d.ts +1 -1
  50. package/vscode/src/vs/workbench/api/browser/mainThreadNotebookKernels.js +2 -2
  51. package/vscode/src/vs/workbench/api/browser/mainThreadNotebookSaveParticipant.js +2 -2
  52. package/vscode/src/vs/workbench/api/browser/mainThreadOutputService.js +4 -4
  53. package/vscode/src/vs/workbench/api/browser/mainThreadProgress.js +6 -9
  54. package/vscode/src/vs/workbench/api/browser/mainThreadSCM.d.ts +3 -3
  55. package/vscode/src/vs/workbench/api/browser/mainThreadSCM.js +9 -10
  56. package/vscode/src/vs/workbench/api/browser/mainThreadSaveParticipant.js +1 -1
  57. package/vscode/src/vs/workbench/api/browser/mainThreadTask.js +1 -1
  58. package/vscode/src/vs/workbench/api/browser/mainThreadTerminalService.js +8 -9
  59. package/vscode/src/vs/workbench/api/browser/mainThreadTerminalShellIntegration.js +10 -7
  60. package/vscode/src/vs/workbench/api/browser/mainThreadTesting.js +2 -6
  61. package/vscode/src/vs/workbench/api/browser/mainThreadTreeViews.js +1 -1
  62. package/vscode/src/vs/workbench/api/browser/mainThreadTunnelService.js +2 -2
  63. package/vscode/src/vs/workbench/api/browser/mainThreadUriOpeners.js +2 -2
  64. package/vscode/src/vs/workbench/api/browser/mainThreadWebviewPanels.d.ts +4 -6
  65. package/vscode/src/vs/workbench/api/browser/mainThreadWebviewPanels.js +8 -16
  66. package/vscode/src/vs/workbench/api/browser/mainThreadWebviews.d.ts +1 -1
  67. package/vscode/src/vs/workbench/api/browser/mainThreadWebviews.js +1 -1
  68. package/vscode/src/vs/workbench/api/browser/mainThreadWorkspace.d.ts +10 -1
  69. package/vscode/src/vs/workbench/api/browser/mainThreadWorkspace.js +20 -7
  70. package/vscode/src/vs/workbench/contrib/customEditor/common/customTextEditorModel.d.ts +1 -1
  71. package/vscode/src/vs/workbench/contrib/customEditor/common/customTextEditorModel.js +3 -3
  72. package/vscode/src/vs/workbench/contrib/externalUriOpener/common/contributedOpeners.js +1 -1
  73. package/vscode/src/vs/workbench/services/extensionManagement/browser/extensionBisect.js +23 -23
  74. package/vscode/src/vs/workbench/services/extensions/browser/webWorkerExtensionHost.js +0 -1
  75. package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.js +12 -12
  76. package/vscode/src/vs/workbench/services/extensions/common/extensionHostManager.js +1 -1
  77. package/vscode/src/vs/workbench/services/extensions/common/extensionsProposedApi.js +1 -1
  78. package/vscode/src/vs/workbench/services/extensions/common/extensionsUtil.js +4 -4
  79. package/vscode/src/vs/workbench/services/extensions/common/remoteExtensionHost.js +0 -1
  80. package/vscode/src/vs/workbench/api/browser/mainThreadChatVariables.d.ts +0 -15
  81. package/vscode/src/vs/workbench/api/browser/mainThreadChatVariables.js +0 -42
@@ -1,8 +1,8 @@
1
1
  import { UriComponents } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
2
2
  import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
3
- import { INotebookEditor } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser";
3
+ import { INotebookEditor } from "@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser";
4
4
  import { INotebookEditorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/services/notebookEditorService.service";
5
- import { ICellRange } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookRange";
5
+ import { ICellRange } from "@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/notebook/common/notebookRange";
6
6
  import { IEditorGroupsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorGroupsService.service";
7
7
  import { IEditorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service";
8
8
  import { IExtHostContext } from "../../services/extensions/common/extHostCustomers.js";
@@ -5,9 +5,9 @@ import { equals } from '@codingame/monaco-vscode-api/vscode/vs/base/common/objec
5
5
  import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
6
6
  import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
7
7
  import { EditorActivation } from '@codingame/monaco-vscode-api/vscode/vs/platform/editor/common/editor';
8
- import { getNotebookEditorFromEditorPane } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser';
8
+ import { getNotebookEditorFromEditorPane } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser';
9
9
  import { INotebookEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/services/notebookEditorService.service';
10
- import { editorGroupToColumn, columnToEditorGroup } from '@codingame/monaco-vscode-f48982c4-9e82-55e2-b800-20e6d1e6096f-common/vscode/vs/workbench/services/editor/common/editorGroupColumn';
10
+ import { editorGroupToColumn, columnToEditorGroup } from '@codingame/monaco-vscode-38f25ab8-ea30-5ba9-8a08-ae3308c297c0-common/vscode/vs/workbench/services/editor/common/editorGroupColumn';
11
11
  import { IEditorGroupsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorGroupsService.service';
12
12
  import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
13
13
  import { ExtHostContext, NotebookEditorRevealType } from '@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol';
@@ -1,5 +1,5 @@
1
1
  import { UriComponents } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
2
- import { ILanguageService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/languages/language";
2
+ import { ILanguageService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/languages/language.service";
3
3
  import { IExtHostContext } from "../../services/extensions/common/extHostCustomers.js";
4
4
  import { INotebookEditorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/services/notebookEditorService.service";
5
5
  import { INotebookExecutionStateService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookExecutionStateService.service";
@@ -6,11 +6,11 @@ import { onUnexpectedError } from '@codingame/monaco-vscode-api/vscode/vs/base/c
6
6
  import { Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
7
7
  import { DisposableMap, DisposableStore, toDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
8
8
  import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
9
- import { ILanguageService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/languages/language';
9
+ import { ILanguageService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/languages/language.service';
10
10
  import { NotebookDto } from './mainThreadNotebookDto.js';
11
11
  import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
12
12
  import { INotebookEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/services/notebookEditorService.service';
13
- import { NotebookExecutionType } from '@codingame/monaco-vscode-af5ccfda-af82-504b-b365-92b4e654e5c5-common/vscode/vs/workbench/contrib/notebook/common/notebookExecutionStateService';
13
+ import { NotebookExecutionType } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/notebook/common/notebookExecutionStateService';
14
14
  import { INotebookExecutionStateService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookExecutionStateService.service';
15
15
  import { INotebookKernelService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookKernelService.service';
16
16
  import { ExtHostContext, MainContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol';
@@ -6,7 +6,7 @@ import { extHostCustomer } from '../../services/extensions/common/extHostCustome
6
6
  import { ExtHostContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol';
7
7
  import { raceCancellationError } from '@codingame/monaco-vscode-api/vscode/vs/base/common/async';
8
8
  import { IWorkingCopyFileService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/workingCopy/common/workingCopyFileService.service';
9
- import { NotebookFileWorkingCopyModel } from '@codingame/monaco-vscode-168b98e5-dc20-5807-b1f9-798f1f92b37f-common/vscode/vs/workbench/contrib/notebook/common/notebookEditorModel';
9
+ import { NotebookFileWorkingCopyModel } from '@codingame/monaco-vscode-bba55be6-41a2-50cd-a3cc-8bafa35bfa89-common/vscode/vs/workbench/contrib/notebook/common/notebookEditorModel';
10
10
 
11
11
  class ExtHostNotebookDocumentSaveParticipant {
12
12
  constructor(extHostContext) {
@@ -18,7 +18,7 @@ class ExtHostNotebookDocumentSaveParticipant {
18
18
  }
19
19
  let _warningTimeout;
20
20
  const p = ( new Promise((resolve, reject) => {
21
- _warningTimeout = setTimeout(() => reject(( new Error(( localize(2351, "Aborted onWillSaveNotebookDocument-event after 1750ms"))))), 1750);
21
+ _warningTimeout = setTimeout(() => reject(( new Error(( localize(2373, "Aborted onWillSaveNotebookDocument-event after 1750ms"))))), 1750);
22
22
  this._proxy.$participateInSave(workingCopy.resource, context.reason, token).then(_ => {
23
23
  clearTimeout(_warningTimeout);
24
24
  return undefined;
@@ -69,15 +69,15 @@ let MainThreadOutputService = class MainThreadOutputService extends Disposable {
69
69
  }
70
70
  _showChannelQuietly(channel) {
71
71
  const statusProperties = {
72
- name: ( localize(2352, "Show Output")),
72
+ name: ( localize(2374, "Show Output")),
73
73
  text: '$(output)',
74
- ariaLabel: ( localize(2353, "Show {0} Output Channel", channel.label)),
74
+ ariaLabel: ( localize(2375, "Show {0} Output Channel", channel.label)),
75
75
  command: `workbench.action.output.show.${channel.id}`,
76
- tooltip: ( localize(2354, "Show {0} Output Channel", channel.label)),
76
+ tooltip: ( localize(2376, "Show {0} Output Channel", channel.label)),
77
77
  kind: 'prominent'
78
78
  };
79
79
  if (!this._outputStatusItem.value) {
80
- this._outputStatusItem.value = this._statusbarService.addEntry(statusProperties, 'status.view.showQuietly', StatusbarAlignment.RIGHT, { id: 'status.notifications', alignment: StatusbarAlignment.LEFT });
80
+ this._outputStatusItem.value = this._statusbarService.addEntry(statusProperties, 'status.view.showQuietly', StatusbarAlignment.RIGHT, { location: { id: 'status.notifications', priority: Number.NEGATIVE_INFINITY }, alignment: StatusbarAlignment.LEFT });
81
81
  }
82
82
  else {
83
83
  this._outputStatusItem.value.update(statusProperties);
@@ -4,18 +4,11 @@ import { ProgressLocation } from '@codingame/monaco-vscode-api/vscode/vs/platfor
4
4
  import { IProgressService } from '@codingame/monaco-vscode-api/vscode/vs/platform/progress/common/progress.service';
5
5
  import { ExtHostContext, MainContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol';
6
6
  import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
7
- import { Action } from '@codingame/monaco-vscode-api/vscode/vs/base/common/actions';
8
7
  import { ICommandService } from '@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service';
9
8
  import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
10
9
  import { onUnexpectedExternalError } from '@codingame/monaco-vscode-api/vscode/vs/base/common/errors';
10
+ import { toAction } from '@codingame/monaco-vscode-api/vscode/vs/base/common/actions';
11
11
 
12
- class ManageExtensionAction extends Action {
13
- constructor(extensionId, label, commandService) {
14
- super(extensionId, label, undefined, true, () => {
15
- return commandService.executeCommand('_extensions.manage', extensionId);
16
- });
17
- }
18
- }
19
12
  let MainThreadProgress = class MainThreadProgress {
20
13
  constructor(extHostContext, progressService, _commandService) {
21
14
  this._commandService = _commandService;
@@ -33,7 +26,11 @@ let MainThreadProgress = class MainThreadProgress {
33
26
  const notificationOptions = {
34
27
  ...options,
35
28
  location: ProgressLocation.Notification,
36
- secondaryActions: [( new ManageExtensionAction(extensionId, ( localize(2355, "Manage Extension")), this._commandService))]
29
+ secondaryActions: [toAction({
30
+ id: extensionId,
31
+ label: ( localize(2377, "Manage Extension")),
32
+ run: () => this._commandService.executeCommand('_extensions.manage', extensionId)
33
+ })]
37
34
  };
38
35
  options = notificationOptions;
39
36
  }
@@ -8,9 +8,9 @@ import { IMarkdownString } from "@codingame/monaco-vscode-api/vscode/vs/base/com
8
8
  import { IQuickDiffService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/scm/common/quickDiff.service";
9
9
  import { IUriIdentityService } from "@codingame/monaco-vscode-api/vscode/vs/platform/uriIdentity/common/uriIdentity.service";
10
10
  import { IWorkspaceContextService } from "@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace.service";
11
- import { ILanguageService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/languages/language";
12
- import { IModelService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/model";
13
- import { ITextModelService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/resolverService";
11
+ import { ILanguageService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/languages/language.service";
12
+ import { IModelService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/model.service";
13
+ import { ITextModelService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/resolverService.service";
14
14
  export declare class MainThreadSCM implements MainThreadSCMShape {
15
15
  private readonly scmService;
16
16
  private readonly scmViewService;
@@ -3,17 +3,12 @@ import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib
3
3
  import { Barrier } from '@codingame/monaco-vscode-api/vscode/vs/base/common/async';
4
4
  import { isUriComponents, URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
5
5
  import { Emitter, Event } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
6
- import { observableValueOpts } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/api';
7
- import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/autorun';
8
- import { observableValue, transaction } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/base';
9
- import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/derived';
10
- import { CancellationToken } from '@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation';
11
- import { structuralEquals } from '@codingame/monaco-vscode-api/vscode/vs/base/common/equals';
6
+ import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
12
7
  import { Disposable, DisposableStore, dispose, combinedDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
13
- import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/utils';
14
8
  import { ISCMService, ISCMViewService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/scm/common/scm.service';
15
9
  import { ExtHostContext, MainContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol';
16
10
  import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
11
+ import { CancellationToken } from '@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation';
17
12
  import { MarshalledId } from '@codingame/monaco-vscode-api/vscode/vs/base/common/marshallingIds';
18
13
  import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
19
14
  import { IQuickDiffService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/scm/common/quickDiff.service';
@@ -21,11 +16,14 @@ import { ResourceTree } from '@codingame/monaco-vscode-be8ddbb5-094a-5657-b1cc-f
21
16
  import { IUriIdentityService } from '@codingame/monaco-vscode-api/vscode/vs/platform/uriIdentity/common/uriIdentity.service';
22
17
  import { IWorkspaceContextService } from '@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace.service';
23
18
  import { basename } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
24
- import { ILanguageService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/languages/language';
25
- import { IModelService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/model';
26
- import { ITextModelService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/resolverService';
19
+ import { ILanguageService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/languages/language.service';
20
+ import { IModelService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/model.service';
21
+ import { ITextModelService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/resolverService.service';
27
22
  import { Schemas } from '@codingame/monaco-vscode-api/vscode/vs/base/common/network';
23
+ import { structuralEquals } from '@codingame/monaco-vscode-api/vscode/vs/base/common/equals';
28
24
  import { historyItemRefColor, historyItemRemoteRefColor, historyItemBaseRefColor } from '@codingame/monaco-vscode-be8ddbb5-094a-5657-b1cc-fe106c94c632-common/vscode/vs/workbench/contrib/scm/browser/scmHistory';
25
+ import { observableValue, transaction } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/base';
26
+ import { observableValueOpts } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/api';
29
27
 
30
28
  function getIconFromIconDto(iconDto) {
31
29
  if (iconDto === undefined) {
@@ -79,6 +77,7 @@ class MainThreadSCMResourceGroup {
79
77
  return this._resourceTree;
80
78
  }
81
79
  get hideWhenEmpty() { return !!this.features.hideWhenEmpty; }
80
+ get contextValue() { return this.features.contextValue; }
82
81
  constructor(sourceControlHandle, handle, provider, features, label, id, multiDiffEditorEnableViewChanges, _uriIdentService) {
83
82
  this.sourceControlHandle = sourceControlHandle;
84
83
  this.handle = handle;
@@ -17,7 +17,7 @@ class ExtHostSaveParticipant {
17
17
  return undefined;
18
18
  }
19
19
  const p = ( new Promise((resolve, reject) => {
20
- setTimeout(() => reject(( new Error(( localize(2356, "Aborted onWillSaveTextDocument-event after 1750ms"))))), 1750);
20
+ setTimeout(() => reject(( new Error(( localize(2378, "Aborted onWillSaveTextDocument-event after 1750ms"))))), 1750);
21
21
  this._proxy.$participateInSave(editorModel.resource, context.reason).then(values => {
22
22
  if (!values.every(success => success)) {
23
23
  return Promise.reject(( new Error('listener failed')));
@@ -378,7 +378,7 @@ var TaskDTO;
378
378
  }
379
379
  command.presentation = TaskPresentationOptionsDTO.to(task.presentationOptions);
380
380
  const source = TaskSourceDTO.to(task.source, workspace);
381
- const label = ( localize(2357, '{0}: {1}', source.label, task.name));
381
+ const label = ( localize(2379, '{0}: {1}', source.label, task.name));
382
382
  const definition = TaskDefinitionDTO.to(task.definition, executeOnly);
383
383
  const id = (CustomExecutionDTO.is(task.execution) && task._id) ? task._id : `${task.source.extensionId}.${definition._key}`;
384
384
  const result = ( new ContributedTask(
@@ -224,14 +224,12 @@ let MainThreadTerminalService = class MainThreadTerminalService {
224
224
  $registerCompletionProvider(id, extensionIdentifier, ...triggerCharacters) {
225
225
  this._completionProviders.set(id, this._terminalCompletionService.registerTerminalCompletionProvider(extensionIdentifier, id, {
226
226
  id,
227
- provideCompletions: async (commandLine, cursorPosition, token) => {
228
- const completions = await this._proxy.$provideTerminalCompletions(id, { commandLine, cursorPosition }, token);
229
- if (Array.isArray(completions)) {
230
- return ( completions.map(c => ({ ...c, provider: id })));
231
- }
232
- else {
233
- return { items: completions?.items.map(c => ({ ...c, provider: id })), resourceRequestConfig: completions?.resourceRequestConfig };
234
- }
227
+ provideCompletions: async (commandLine, cursorPosition, allowFallbackCompletions, token) => {
228
+ const completions = await this._proxy.$provideTerminalCompletions(id, { commandLine, cursorPosition, allowFallbackCompletions }, token);
229
+ return {
230
+ items: completions?.items.map(c => ({ ...c, provider: id })),
231
+ resourceRequestConfig: completions?.resourceRequestConfig
232
+ };
235
233
  }
236
234
  }, ...triggerCharacters));
237
235
  }
@@ -319,7 +317,8 @@ let MainThreadTerminalService = class MainThreadTerminalService {
319
317
  args: terminalInstance.shellLaunchConfig.args,
320
318
  cwd: terminalInstance.shellLaunchConfig.cwd,
321
319
  env: terminalInstance.shellLaunchConfig.env,
322
- hideFromUser: terminalInstance.shellLaunchConfig.hideFromUser
320
+ hideFromUser: terminalInstance.shellLaunchConfig.hideFromUser,
321
+ tabActions: terminalInstance.shellLaunchConfig.tabActions
323
322
  };
324
323
  this._proxy.$acceptTerminalOpened(terminalInstance.instanceId, extHostTerminalId, terminalInstance.title, shellLaunchConfigDto);
325
324
  }
@@ -42,9 +42,12 @@ let MainThreadTerminalShellIntegration = class MainThreadTerminalShellIntegratio
42
42
  }));
43
43
  const envChangeEvent = this._store.add(this._terminalService.createOnInstanceCapabilityEvent(TerminalCapability.ShellEnvDetection, e => e.onDidChangeEnv));
44
44
  this._store.add(envChangeEvent.event(e => {
45
- const keysArr = Array.from(( e.data.keys()));
46
- const valuesArr = Array.from(( e.data.values()));
47
- this._proxy.$shellEnvChange(e.instance.instanceId, keysArr, valuesArr);
45
+ if (e.data.value && typeof e.data.value === 'object') {
46
+ const envValue = e.data.value;
47
+ const keysArr = ( Object.keys(envValue));
48
+ const valuesArr = ( Object.values(envValue));
49
+ this._proxy.$shellEnvChange(e.instance.instanceId, keysArr, valuesArr, e.data.isTrusted);
50
+ }
48
51
  }));
49
52
  const commandDetectionStartEvent = this._store.add(this._terminalService.createOnInstanceCapabilityEvent(TerminalCapability.CommandDetection, e => e.onCommandExecuted));
50
53
  let currentCommand;
@@ -56,16 +59,16 @@ let MainThreadTerminalShellIntegration = class MainThreadTerminalShellIntegratio
56
59
  const instanceId = e.instance.instanceId;
57
60
  this._proxy.$shellExecutionStart(instanceId, e.data.command, convertToExtHostCommandLineConfidence(e.data), e.data.isTrusted, this._convertCwdToUri(e.data.cwd));
58
61
  instanceDataListeners.get(instanceId)?.dispose();
59
- instanceDataListeners.set(instanceId, Event.accumulate(e.instance.onData, 50, this._store)(events => this._proxy.$shellExecutionData(instanceId, events.join(''))));
62
+ instanceDataListeners.set(instanceId, Event.accumulate(e.instance.onData, 50, this._store)(events => {
63
+ this._proxy.$shellExecutionData(instanceId, events.join(''));
64
+ }));
60
65
  }));
61
66
  const commandDetectionEndEvent = this._store.add(this._terminalService.createOnInstanceCapabilityEvent(TerminalCapability.CommandDetection, e => e.onCommandFinished));
62
67
  this._store.add(commandDetectionEndEvent.event(e => {
63
68
  currentCommand = undefined;
64
69
  const instanceId = e.instance.instanceId;
65
70
  instanceDataListeners.get(instanceId)?.dispose();
66
- setTimeout(() => {
67
- this._proxy.$shellExecutionEnd(instanceId, e.data.command, convertToExtHostCommandLineConfidence(e.data), e.data.isTrusted, e.data.exitCode);
68
- });
71
+ this._proxy.$shellExecutionEnd(instanceId, e.data.command, convertToExtHostCommandLineConfidence(e.data), e.data.isTrusted, e.data.exitCode);
69
72
  }));
70
73
  this._store.add(this._terminalService.onDidDisposeInstance(e => this._proxy.$closeTerminal(e.instanceId)));
71
74
  }
@@ -2,12 +2,7 @@
2
2
  import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
3
3
  import { Event } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
4
4
  import { Disposable, MutableDisposable, DisposableStore, toDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
5
- import { transaction, observableValue } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/base';
6
- import '@codingame/monaco-vscode-api/vscode/vs/base/common/arrays';
7
- import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/autorun';
8
- import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/derived';
9
- import '@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation';
10
- import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/utils';
5
+ import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
11
6
  import { WellDefinedPrefixTree } from '@codingame/monaco-vscode-api/vscode/vs/base/common/prefixTree';
12
7
  import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
13
8
  import { Range } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/core/range';
@@ -21,6 +16,7 @@ import { ITestService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/c
21
16
  import { TestRunProfileBitset, ITestItem, IFileCoverage, CoverageDetails, ITestMessage, TestsDiffOp } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/testing/common/testTypes';
22
17
  import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
23
18
  import { ExtHostContext, MainContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol';
19
+ import { transaction, observableValue } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/base';
24
20
 
25
21
  let MainThreadTesting = class MainThreadTesting extends Disposable {
26
22
  constructor(extHostContext, uriIdentityService, testService, testProfiles, resultService) {
@@ -200,7 +200,7 @@ class TreeViewDragAndDropController {
200
200
  async handleDrop(dataTransfer, targetTreeItem, token, operationUuid, sourceTreeId, sourceTreeItemHandles) {
201
201
  const request = this.dataTransfersCache.add(dataTransfer);
202
202
  try {
203
- const dataTransferDto = await DataTransfer.from(dataTransfer);
203
+ const dataTransferDto = await DataTransfer.fromList(dataTransfer);
204
204
  if (token.isCancellationRequested) {
205
205
  return;
206
206
  }
@@ -112,13 +112,13 @@ let MainThreadTunnelService = class MainThreadTunnelService extends Disposable {
112
112
  }
113
113
  async elevationPrompt(tunnelOptions, tunnel, source) {
114
114
  return this.notificationService.prompt(Severity.Info, ( localize(
115
- 2358,
115
+ 2380,
116
116
  "The extension {0} has forwarded port {1}. You'll need to run as superuser to use port {2} locally.",
117
117
  source,
118
118
  tunnelOptions.remoteAddress.port,
119
119
  tunnelOptions.localAddressPort
120
120
  )), [{
121
- label: ( localize(2359, "Use Port {0} as Sudo...", tunnel.tunnelRemotePort)),
121
+ label: ( localize(2381, "Use Port {0} as Sudo...", tunnel.tunnelRemotePort)),
122
122
  run: async () => {
123
123
  this.elevateionRetry = true;
124
124
  await this.remoteExplorerService.close({ host: tunnel.tunnelRemoteHost, port: tunnel.tunnelRemotePort }, TunnelCloseReason.Other);
@@ -52,7 +52,7 @@ let MainThreadUriOpeners = class MainThreadUriOpeners extends Disposable {
52
52
  }
53
53
  catch (e) {
54
54
  if (!isCancellationError(e)) {
55
- const openDefaultAction = ( new Action('default', ( localize(2360, "Open using default opener")), undefined, undefined, async () => {
55
+ const openDefaultAction = ( new Action('default', ( localize(2382, "Open using default opener")), undefined, undefined, async () => {
56
56
  await this.openerService.open(uri, {
57
57
  allowTunneling: false,
58
58
  allowContributedOpeners: defaultExternalUriOpenerId,
@@ -61,7 +61,7 @@ let MainThreadUriOpeners = class MainThreadUriOpeners extends Disposable {
61
61
  openDefaultAction.tooltip = ( uri.toString());
62
62
  this.notificationService.notify({
63
63
  severity: Severity.Error,
64
- message: ( localize(2361, 'Could not open uri with \'{0}\': {1}', id, (e.toString()))),
64
+ message: ( localize(2383, 'Could not open uri with \'{0}\': {1}', id, (e.toString()))),
65
65
  actions: {
66
66
  primary: [
67
67
  openDefaultAction
@@ -1,28 +1,26 @@
1
1
  import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
2
2
  import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
3
3
  import { IStorageService } from "@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service";
4
- import { ITelemetryService } from "@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service";
5
- import { MainThreadWebviews } from "./mainThreadWebviews.js";
6
- import * as extHostProtocol from "@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol";
7
- import { WebviewInput } from "@codingame/monaco-vscode-771c2e6d-0284-5ac1-be73-7176085eedc5-common/vscode/vs/workbench/contrib/webviewPanel/browser/webviewEditorInput";
4
+ import { WebviewInput } from "@codingame/monaco-vscode-9b5a5e82-d649-5455-b4bf-ef90d6afd294-common/vscode/vs/workbench/contrib/webviewPanel/browser/webviewEditorInput";
8
5
  import { IWebviewWorkbenchService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/webviewPanel/browser/webviewWorkbenchService.service";
9
6
  import { IEditorGroupsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorGroupsService.service";
10
7
  import { IEditorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service";
11
8
  import { IExtensionService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions.service";
12
9
  import { IExtHostContext } from "../../services/extensions/common/extHostCustomers.js";
10
+ import * as extHostProtocol from "@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol";
11
+ import { MainThreadWebviews } from "./mainThreadWebviews.js";
13
12
  export declare class MainThreadWebviewPanels extends Disposable implements extHostProtocol.MainThreadWebviewPanelsShape {
14
13
  private readonly _mainThreadWebviews;
15
14
  private readonly _configurationService;
16
15
  private readonly _editorGroupService;
17
16
  private readonly _editorService;
18
- private readonly _telemetryService;
19
17
  private readonly _webviewWorkbenchService;
20
18
  private readonly webviewPanelViewType;
21
19
  private readonly _proxy;
22
20
  private readonly _webviewInputs;
23
21
  private readonly _revivers;
24
22
  private readonly webviewOriginStore;
25
- constructor(context: IExtHostContext, _mainThreadWebviews: MainThreadWebviews, _configurationService: IConfigurationService, _editorGroupService: IEditorGroupsService, _editorService: IEditorService, extensionService: IExtensionService, storageService: IStorageService, _telemetryService: ITelemetryService, _webviewWorkbenchService: IWebviewWorkbenchService);
23
+ constructor(context: IExtHostContext, _mainThreadWebviews: MainThreadWebviews, _configurationService: IConfigurationService, _editorGroupService: IEditorGroupsService, _editorService: IEditorService, extensionService: IExtensionService, storageService: IStorageService, _webviewWorkbenchService: IWebviewWorkbenchService);
26
24
  get webviewInputs(): Iterable<WebviewInput>;
27
25
  addWebviewInput(handle: extHostProtocol.WebviewHandle, input: WebviewInput, options: {
28
26
  serializeBuffersForPostMessage: boolean;
@@ -7,19 +7,18 @@ import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
7
7
  import { generateUuid } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uuid';
8
8
  import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
9
9
  import { IStorageService } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service';
10
- import { ITelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service';
11
- import { reviveWebviewExtension, reviveWebviewContentOptions } from './mainThreadWebviews.js';
12
- import { ExtHostContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol';
13
- import { DiffEditorInput } from '@codingame/monaco-vscode-4a28f637-7c3c-5e48-a77c-1b7538b38850-common/vscode/vs/workbench/common/editor/diffEditorInput';
14
- import { ExtensionKeyedWebviewOriginStore } from '@codingame/monaco-vscode-771c2e6d-0284-5ac1-be73-7176085eedc5-common/vscode/vs/workbench/contrib/webview/browser/webview';
15
- import { WebviewInput } from '@codingame/monaco-vscode-771c2e6d-0284-5ac1-be73-7176085eedc5-common/vscode/vs/workbench/contrib/webviewPanel/browser/webviewEditorInput';
10
+ import { DiffEditorInput } from '@codingame/monaco-vscode-fdf643f9-94dd-5510-b97a-408abf26ad92-common/vscode/vs/workbench/common/editor/diffEditorInput';
11
+ import { ExtensionKeyedWebviewOriginStore } from '@codingame/monaco-vscode-7ba0af96-90c2-5e11-ad7f-befdbbf246c8-common/vscode/vs/workbench/contrib/webview/browser/webview';
12
+ import { WebviewInput } from '@codingame/monaco-vscode-9b5a5e82-d649-5455-b4bf-ef90d6afd294-common/vscode/vs/workbench/contrib/webviewPanel/browser/webviewEditorInput';
16
13
  import { IWebviewWorkbenchService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/webviewPanel/browser/webviewWorkbenchService.service';
17
- import { editorGroupToColumn } from '@codingame/monaco-vscode-f48982c4-9e82-55e2-b800-20e6d1e6096f-common/vscode/vs/workbench/services/editor/common/editorGroupColumn';
14
+ import { editorGroupToColumn } from '@codingame/monaco-vscode-38f25ab8-ea30-5ba9-8a08-ae3308c297c0-common/vscode/vs/workbench/services/editor/common/editorGroupColumn';
18
15
  import { GroupsOrder, GroupLocation, preferredSideBySideGroupDirection } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorGroupsService';
19
16
  import { IEditorGroupsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorGroupsService.service';
20
17
  import { ACTIVE_GROUP, SIDE_GROUP } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService';
21
18
  import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
22
19
  import { IExtensionService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions.service';
20
+ import { ExtHostContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol';
21
+ import { reviveWebviewExtension, reviveWebviewContentOptions } from './mainThreadWebviews.js';
23
22
 
24
23
  class WebviewInputStore {
25
24
  constructor() {
@@ -64,13 +63,12 @@ class WebviewViewTypeTransformer {
64
63
  }
65
64
  }
66
65
  let MainThreadWebviewPanels = class MainThreadWebviewPanels extends Disposable {
67
- constructor(context, _mainThreadWebviews, _configurationService, _editorGroupService, _editorService, extensionService, storageService, _telemetryService, _webviewWorkbenchService) {
66
+ constructor(context, _mainThreadWebviews, _configurationService, _editorGroupService, _editorService, extensionService, storageService, _webviewWorkbenchService) {
68
67
  super();
69
68
  this._mainThreadWebviews = _mainThreadWebviews;
70
69
  this._configurationService = _configurationService;
71
70
  this._editorGroupService = _editorGroupService;
72
71
  this._editorService = _editorService;
73
- this._telemetryService = _telemetryService;
74
72
  this._webviewWorkbenchService = _webviewWorkbenchService;
75
73
  this.webviewPanelViewType = ( new WebviewViewTypeTransformer('mainThreadWebview-'));
76
74
  this._webviewInputs = ( new WebviewInputStore());
@@ -121,11 +119,6 @@ let MainThreadWebviewPanels = class MainThreadWebviewPanels extends Disposable {
121
119
  extension
122
120
  }, this.webviewPanelViewType.fromExternal(viewType), initData.title, mainThreadShowOptions);
123
121
  this.addWebviewInput(handle, webview, { serializeBuffersForPostMessage: initData.serializeBuffersForPostMessage });
124
- const payload = {
125
- extensionId: extension.id.value,
126
- viewType
127
- };
128
- this._telemetryService.publicLog2('webviews:createWebviewPanel', payload);
129
122
  }
130
123
  $disposeWebview(handle) {
131
124
  const webview = this.tryGetWebviewInput(handle);
@@ -264,8 +257,7 @@ MainThreadWebviewPanels = ( __decorate([
264
257
  ( __param(4, IEditorService)),
265
258
  ( __param(5, IExtensionService)),
266
259
  ( __param(6, IStorageService)),
267
- ( __param(7, ITelemetryService)),
268
- ( __param(8, IWebviewWorkbenchService))
260
+ ( __param(7, IWebviewWorkbenchService))
269
261
  ], MainThreadWebviewPanels));
270
262
  function reviveWebviewIcon(value) {
271
263
  if (!value) {
@@ -3,7 +3,7 @@ import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/l
3
3
  import { IOpenerService } from "@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service";
4
4
  import { IProductService } from "@codingame/monaco-vscode-api/vscode/vs/platform/product/common/productService.service";
5
5
  import * as extHostProtocol from "@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol";
6
- import { IOverlayWebview, WebviewContentOptions, WebviewExtensionDescription } from "@codingame/monaco-vscode-771c2e6d-0284-5ac1-be73-7176085eedc5-common/vscode/vs/workbench/contrib/webview/browser/webview";
6
+ import { IOverlayWebview, WebviewContentOptions, WebviewExtensionDescription } from "@codingame/monaco-vscode-7ba0af96-90c2-5e11-ad7f-befdbbf246c8-common/vscode/vs/workbench/contrib/webview/browser/webview";
7
7
  import { IExtHostContext } from "../../services/extensions/common/extHostCustomers.js";
8
8
  export declare class MainThreadWebviews extends Disposable implements extHostProtocol.MainThreadWebviewsShape {
9
9
  private readonly _openerService;
@@ -104,7 +104,7 @@ let MainThreadWebviews = class MainThreadWebviews extends Disposable {
104
104
  <meta http-equiv="Content-type" content="text/html;charset=UTF-8">
105
105
  <meta http-equiv="Content-Security-Policy" content="default-src 'none';">
106
106
  </head>
107
- <body>${( localize(2362, "An error occurred while loading view: {0}", escape(viewType)))}</body>
107
+ <body>${( localize(2384, "An error occurred while loading view: {0}", escape(viewType)))}</body>
108
108
  </html>`;
109
109
  }
110
110
  };
@@ -20,6 +20,8 @@ import { IWorkspaceEditingService } from "@codingame/monaco-vscode-api/vscode/vs
20
20
  import { ITextSearchComplete, MainThreadWorkspaceShape } from "@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol";
21
21
  import { IEditSessionIdentityService } from "@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/editSessions.service";
22
22
  import { ICanonicalUriService } from "@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/canonicalUri.service";
23
+ import { VSBuffer } from "@codingame/monaco-vscode-api/vscode/vs/base/common/buffer";
24
+ import { ITextFileService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/textfile/common/textfiles.service";
23
25
  export declare class MainThreadWorkspace implements MainThreadWorkspaceShape {
24
26
  private readonly _searchService;
25
27
  private readonly _contextService;
@@ -34,11 +36,12 @@ export declare class MainThreadWorkspace implements MainThreadWorkspaceShape {
34
36
  private readonly _environmentService;
35
37
  private readonly _workspaceTrustManagementService;
36
38
  private readonly _workspaceTrustRequestService;
39
+ private readonly _textFileService;
37
40
  private readonly _toDispose;
38
41
  private readonly _activeCancelTokens;
39
42
  private readonly _proxy;
40
43
  private readonly _queryBuilder;
41
- constructor(extHostContext: IExtHostContext, _searchService: ISearchService, _contextService: IWorkspaceContextService, _editSessionIdentityService: IEditSessionIdentityService, _canonicalUriService: ICanonicalUriService, _editorService: IEditorService, _workspaceEditingService: IWorkspaceEditingService, _notificationService: INotificationService, _requestService: IRequestService, _instantiationService: IInstantiationService, _labelService: ILabelService, _environmentService: IEnvironmentService, fileService: IFileService, _workspaceTrustManagementService: IWorkspaceTrustManagementService, _workspaceTrustRequestService: IWorkspaceTrustRequestService);
44
+ constructor(extHostContext: IExtHostContext, _searchService: ISearchService, _contextService: IWorkspaceContextService, _editSessionIdentityService: IEditSessionIdentityService, _canonicalUriService: ICanonicalUriService, _editorService: IEditorService, _workspaceEditingService: IWorkspaceEditingService, _notificationService: INotificationService, _requestService: IRequestService, _instantiationService: IInstantiationService, _labelService: ILabelService, _environmentService: IEnvironmentService, fileService: IFileService, _workspaceTrustManagementService: IWorkspaceTrustManagementService, _workspaceTrustRequestService: IWorkspaceTrustRequestService, _textFileService: ITextFileService);
42
45
  dispose(): void;
43
46
  $updateWorkspaceFolders(extensionName: string, index: number, deleteCount: number, foldersToAdd: {
44
47
  uri: UriComponents;
@@ -68,4 +71,10 @@ export declare class MainThreadWorkspace implements MainThreadWorkspaceShape {
68
71
  private registeredCanonicalUriProviders;
69
72
  $registerCanonicalUriProvider(handle: number, scheme: string): void;
70
73
  $unregisterCanonicalUriProvider(handle: number): void;
74
+ $decode(content: VSBuffer, resource: UriComponents | undefined, options?: {
75
+ encoding: string;
76
+ }): Promise<string>;
77
+ $encode(content: string, resource: UriComponents | undefined, options?: {
78
+ encoding: string;
79
+ }): Promise<VSBuffer>;
71
80
  }
@@ -26,9 +26,12 @@ import { SideBySideEditor, SaveReason, EditorResourceAccessor } from '@codingame
26
26
  import { coalesce } from '@codingame/monaco-vscode-api/vscode/vs/base/common/arrays';
27
27
  import { ICanonicalUriService } from '@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/canonicalUri.service';
28
28
  import { revive } from '@codingame/monaco-vscode-api/vscode/vs/base/common/marshalling';
29
+ import { bufferToStream, readableToBuffer, VSBuffer } from '@codingame/monaco-vscode-api/vscode/vs/base/common/buffer';
30
+ import { ITextFileService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/textfile/common/textfiles.service';
31
+ import { consumeStream } from '@codingame/monaco-vscode-api/vscode/vs/base/common/stream';
29
32
 
30
33
  let MainThreadWorkspace = class MainThreadWorkspace {
31
- constructor(extHostContext, _searchService, _contextService, _editSessionIdentityService, _canonicalUriService, _editorService, _workspaceEditingService, _notificationService, _requestService, _instantiationService, _labelService, _environmentService, fileService, _workspaceTrustManagementService, _workspaceTrustRequestService) {
34
+ constructor(extHostContext, _searchService, _contextService, _editSessionIdentityService, _canonicalUriService, _editorService, _workspaceEditingService, _notificationService, _requestService, _instantiationService, _labelService, _environmentService, fileService, _workspaceTrustManagementService, _workspaceTrustRequestService, _textFileService) {
32
35
  this._searchService = _searchService;
33
36
  this._contextService = _contextService;
34
37
  this._editSessionIdentityService = _editSessionIdentityService;
@@ -42,6 +45,7 @@ let MainThreadWorkspace = class MainThreadWorkspace {
42
45
  this._environmentService = _environmentService;
43
46
  this._workspaceTrustManagementService = _workspaceTrustManagementService;
44
47
  this._workspaceTrustRequestService = _workspaceTrustRequestService;
48
+ this._textFileService = _textFileService;
45
49
  this._toDispose = ( new DisposableStore());
46
50
  this._activeCancelTokens = Object.create(null);
47
51
  this._queryBuilder = this._instantiationService.createInstance(QueryBuilder);
@@ -77,11 +81,11 @@ let MainThreadWorkspace = class MainThreadWorkspace {
77
81
  const wantsToDelete = removeCount > 0;
78
82
  if (wantsToAdd && !wantsToDelete) {
79
83
  if (addCount === 1) {
80
- message = ( localize(2363, "Extension '{0}' added 1 folder to the workspace", extensionName));
84
+ message = ( localize(2385, "Extension '{0}' added 1 folder to the workspace", extensionName));
81
85
  }
82
86
  else {
83
87
  message = ( localize(
84
- 2364,
88
+ 2386,
85
89
  "Extension '{0}' added {1} folders to the workspace",
86
90
  extensionName,
87
91
  addCount
@@ -90,11 +94,11 @@ let MainThreadWorkspace = class MainThreadWorkspace {
90
94
  }
91
95
  else if (wantsToDelete && !wantsToAdd) {
92
96
  if (removeCount === 1) {
93
- message = ( localize(2365, "Extension '{0}' removed 1 folder from the workspace", extensionName));
97
+ message = ( localize(2387, "Extension '{0}' removed 1 folder from the workspace", extensionName));
94
98
  }
95
99
  else {
96
100
  message = ( localize(
97
- 2366,
101
+ 2388,
98
102
  "Extension '{0}' removed {1} folders from the workspace",
99
103
  extensionName,
100
104
  removeCount
@@ -102,7 +106,7 @@ let MainThreadWorkspace = class MainThreadWorkspace {
102
106
  }
103
107
  }
104
108
  else {
105
- message = ( localize(2367, "Extension '{0}' changed folders of the workspace", extensionName));
109
+ message = ( localize(2389, "Extension '{0}' changed folders of the workspace", extensionName));
106
110
  }
107
111
  return message;
108
112
  }
@@ -238,6 +242,14 @@ let MainThreadWorkspace = class MainThreadWorkspace {
238
242
  disposable?.dispose();
239
243
  this.registeredCanonicalUriProviders.delete(handle);
240
244
  }
245
+ async $decode(content, resource, options) {
246
+ const stream = await this._textFileService.getDecodedStream(URI.revive(resource) ?? undefined, bufferToStream(content), { acceptTextOnly: true, encoding: options?.encoding });
247
+ return consumeStream(stream, chunks => chunks.join());
248
+ }
249
+ async $encode(content, resource, options) {
250
+ const res = await this._textFileService.getEncodedReadable(URI.revive(resource) ?? undefined, content, { encoding: options?.encoding });
251
+ return res instanceof VSBuffer ? res : readableToBuffer(res);
252
+ }
241
253
  };
242
254
  MainThreadWorkspace = __decorate([
243
255
  extHostNamedCustomer(MainContext.MainThreadWorkspace),
@@ -254,7 +266,8 @@ MainThreadWorkspace = __decorate([
254
266
  ( __param(11, IEnvironmentService)),
255
267
  ( __param(12, IFileService)),
256
268
  ( __param(13, IWorkspaceTrustManagementService)),
257
- ( __param(14, IWorkspaceTrustRequestService))
269
+ ( __param(14, IWorkspaceTrustRequestService)),
270
+ ( __param(15, ITextFileService))
258
271
  ], MainThreadWorkspace);
259
272
 
260
273
  export { MainThreadWorkspace };