@codingame/monaco-vscode-extensions-service-override 37.1.0 → 37.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +2 -17
- package/package.json +3 -3
- package/service-override/tools/missingMainThreadCustomers.d.ts +1 -0
- package/service-override/tools/missingMainThreadCustomers.js +274 -0
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagementCLI.js +37 -37
- package/vscode/src/vs/workbench/api/browser/mainThreadAgentEditorComments.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadAgentEditorComments.js +3 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadAiEmbeddingVector.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadAiEmbeddingVector.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadAiRelatedInformation.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadAiRelatedInformation.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadAiSettingsSearch.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadAiSettingsSearch.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadAuthentication.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadAuthentication.js +32 -32
- package/vscode/src/vs/workbench/api/browser/mainThreadBrowserTunnelProxy.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadBrowserTunnelProxy.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadBrowsers.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadBrowsers.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadBulkEdits.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadBulkEdits.js +7 -7
- package/vscode/src/vs/workbench/api/browser/mainThreadCLICommands.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadChatOutputRenderer.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadClipboard.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadClipboard.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadCodeInsets.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadCodeInsets.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadCommands.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadCommands.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadComments.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadComments.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadConfiguration.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadConfiguration.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadConsole.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadConsole.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadCustomEditors.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadCustomEditors.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadDataChannels.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadDataChannels.js +9 -9
- package/vscode/src/vs/workbench/api/browser/mainThreadDebugService.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadDebugService.js +7 -7
- package/vscode/src/vs/workbench/api/browser/mainThreadDecorations.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadDecorations.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadDiagnostics.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadDiagnostics.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadDialogs.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadDialogs.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadDocumentContentProviders.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadDocumentContentProviders.js +4 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadDocumentDiff.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadDocumentDiff.js +5 -5
- package/vscode/src/vs/workbench/api/browser/mainThreadDocumentsAndEditors.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadDocumentsAndEditors.js +9 -9
- package/vscode/src/vs/workbench/api/browser/mainThreadDownloadService.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadDownloadService.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadEditSessionIdentityParticipant.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadEditSessionIdentityParticipant.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadEditor.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadEditor.js +5 -5
- package/vscode/src/vs/workbench/api/browser/mainThreadEditorTabs.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadEditorTabs.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadEditors.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadEditors.js +10 -10
- package/vscode/src/vs/workbench/api/browser/mainThreadEmbeddings.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadEmbeddings.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadErrors.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadExtensionService.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadExtensionService.js +13 -13
- package/vscode/src/vs/workbench/api/browser/mainThreadFileSystem.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadFileSystem.js +3 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadFileSystemEventService.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadFileSystemEventService.js +21 -21
- package/vscode/src/vs/workbench/api/browser/mainThreadGitExtensionService.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadGitExtensionService.js +5 -5
- package/vscode/src/vs/workbench/api/browser/mainThreadInteractive.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadInteractive.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadLabelService.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadLabelService.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageFeatures.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageFeatures.js +16 -16
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguages.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguages.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadLocalization.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadLocalization.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadLogService.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadLogService.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadManagedSockets.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadManagedSockets.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadMessageService.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadMessageService.js +7 -7
- package/vscode/src/vs/workbench/api/browser/mainThreadMeteredConnection.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadMeteredConnection.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadOutputService.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadOutputService.js +4 -4
- package/vscode/src/vs/workbench/api/browser/mainThreadPower.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadPower.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadProfileContentHandlers.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadProfileContentHandlers.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadProgress.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadProgress.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadQuickDiff.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadQuickDiff.js +3 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadQuickOpen.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadQuickOpen.js +4 -4
- package/vscode/src/vs/workbench/api/browser/mainThreadRemoteConnectionData.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadRemoteConnectionData.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadSCM.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadSCM.js +8 -8
- package/vscode/src/vs/workbench/api/browser/mainThreadSaveParticipant.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadSaveParticipant.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadSearch.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadSearch.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadSecretState.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadSecretState.js +3 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadShare.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadShare.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadSpeech.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadSpeech.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadStatusBar.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadStatusBar.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadStorage.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadStorage.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadTask.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadTask.js +3 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadTelemetry.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadTelemetry.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadTerminalService.d.ts +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadTerminalService.js +6 -6
- package/vscode/src/vs/workbench/api/browser/mainThreadTerminalShellIntegration.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadTerminalShellIntegration.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadTesting.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadTesting.js +13 -7
- package/vscode/src/vs/workbench/api/browser/mainThreadTheming.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadTheming.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadTimeline.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadTimeline.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadTreeViews.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadTreeViews.js +14 -9
- package/vscode/src/vs/workbench/api/browser/mainThreadTunnelService.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadTunnelService.js +7 -7
- package/vscode/src/vs/workbench/api/browser/mainThreadUriOpeners.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadUriOpeners.js +3 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadUrls.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadUrls.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviewManager.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviewManager.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviewPanels.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviewViews.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviews.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviews.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadWindow.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadWindow.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadWorkspace.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadWorkspace.js +15 -13
- package/vscode/src/vs/workbench/contrib/customEditor/common/customTextEditorModel.js +1 -1
- package/vscode/src/vs/workbench/services/extensionManagement/browser/extensionBisect.js +25 -25
- package/vscode/src/vs/workbench/services/extensionManagement/browser/webExtensionsScannerService.js +37 -32
- package/vscode/src/vs/workbench/services/extensions/browser/extensionService.js +18 -10
- package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.js +55 -45
- package/vscode/src/vs/workbench/services/extensions/common/extensionHostManager.js +5 -5
- package/vscode/src/vs/workbench/services/extensions/common/extensionRunningLocationTracker.js +3 -1
- package/vscode/src/vs/workbench/services/extensions/common/extensionsProposedApi.js +4 -2
- package/vscode/src/vs/workbench/services/extensions/common/extensionsUtil.js +4 -4
- package/vscode/src/vs/workbench/services/extensions/common/lazyCreateExtensionHostManager.js +4 -2
- package/vscode/src/vs/workbench/services/themes/browser/cssExtensionPoint.js +5 -5
- package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents2.d.ts +0 -104
- package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents2.js +0 -827
- package/vscode/src/vs/workbench/api/browser/mainThreadChatCodeMapper.d.ts +0 -15
- package/vscode/src/vs/workbench/api/browser/mainThreadChatCodeMapper.js +0 -71
- package/vscode/src/vs/workbench/api/browser/mainThreadChatContext.d.ts +0 -16
- package/vscode/src/vs/workbench/api/browser/mainThreadChatContext.js +0 -95
- package/vscode/src/vs/workbench/api/browser/mainThreadChatDebug.d.ts +0 -22
- package/vscode/src/vs/workbench/api/browser/mainThreadChatDebug.js +0 -286
- package/vscode/src/vs/workbench/api/browser/mainThreadChatInputNotification.d.ts +0 -10
- package/vscode/src/vs/workbench/api/browser/mainThreadChatInputNotification.js +0 -38
- package/vscode/src/vs/workbench/api/browser/mainThreadChatQuota.d.ts +0 -9
- package/vscode/src/vs/workbench/api/browser/mainThreadChatQuota.js +0 -22
- package/vscode/src/vs/workbench/api/browser/mainThreadChatSessions.d.ts +0 -130
- package/vscode/src/vs/workbench/api/browser/mainThreadChatSessions.js +0 -907
- package/vscode/src/vs/workbench/api/browser/mainThreadChatStatus.d.ts +0 -10
- package/vscode/src/vs/workbench/api/browser/mainThreadChatStatus.js +0 -28
- package/vscode/src/vs/workbench/api/browser/mainThreadDocuments.d.ts +0 -63
- package/vscode/src/vs/workbench/api/browser/mainThreadDocuments.js +0 -305
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModelTools.d.ts +0 -27
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModelTools.js +0 -167
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModels.d.ts +0 -46
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModels.js +0 -356
- package/vscode/src/vs/workbench/api/browser/mainThreadMcp.d.ts +0 -108
- package/vscode/src/vs/workbench/api/browser/mainThreadMcp.js +0 -698
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebook.d.ts +0 -22
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebook.js +0 -210
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDocuments.d.ts +0 -24
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDocuments.js +0 -138
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDocumentsAndEditors.d.ts +0 -29
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDocumentsAndEditors.js +0 -194
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDto.d.ts +0 -17
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDto.js +0 -128
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookEditors.d.ts +0 -27
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookEditors.js +0 -149
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookKernels.d.ts +0 -49
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookKernels.js +0 -372
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookRenderers.d.ts +0 -10
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookRenderers.js +0 -26
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookSaveParticipant.d.ts +0 -9
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookSaveParticipant.js +0 -43
- package/vscode/src/vs/workbench/services/extensions/common/extHostCustomers.d.ts +0 -32
- package/vscode/src/vs/workbench/services/extensions/common/extHostCustomers.js +0 -45
|
@@ -1,372 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
-
import { isNonEmptyArray } from '@codingame/monaco-vscode-api/vscode/vs/base/common/arrays';
|
|
4
|
-
import { CancellationToken } from '@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation';
|
|
5
|
-
import { onUnexpectedError } from '@codingame/monaco-vscode-api/vscode/vs/base/common/errors';
|
|
6
|
-
import { Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
7
|
-
import { DisposableMap, DisposableStore, toDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
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.service';
|
|
10
|
-
import { NotebookDto } from './mainThreadNotebookDto.js';
|
|
11
|
-
import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
|
|
12
|
-
import { INotebookEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/services/notebookEditorService.service';
|
|
13
|
-
import { INotebookExecutionStateService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookExecutionStateService.service';
|
|
14
|
-
import { INotebookKernelService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookKernelService.service';
|
|
15
|
-
import { ExtHostContext, MainContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol';
|
|
16
|
-
import { INotebookService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookService.service';
|
|
17
|
-
import { AsyncIterableProducer } from '@codingame/monaco-vscode-api/vscode/vs/base/common/async';
|
|
18
|
-
|
|
19
|
-
class MainThreadKernel {
|
|
20
|
-
get preloadUris() {
|
|
21
|
-
return ( this.preloads.map(p => p.uri));
|
|
22
|
-
}
|
|
23
|
-
get preloadProvides() {
|
|
24
|
-
return this.preloads.flatMap(p => p.provides);
|
|
25
|
-
}
|
|
26
|
-
constructor(data, _languageService) {
|
|
27
|
-
this._languageService = _languageService;
|
|
28
|
-
this._onDidChange = ( new Emitter());
|
|
29
|
-
this.onDidChange = this._onDidChange.event;
|
|
30
|
-
this.id = data.id;
|
|
31
|
-
this.viewType = data.notebookType;
|
|
32
|
-
this.extension = data.extensionId;
|
|
33
|
-
this.implementsInterrupt = data.supportsInterrupt ?? false;
|
|
34
|
-
this.label = data.label;
|
|
35
|
-
this.description = data.description;
|
|
36
|
-
this.detail = data.detail;
|
|
37
|
-
this.supportedLanguages = isNonEmptyArray(data.supportedLanguages) ? data.supportedLanguages : _languageService.getRegisteredLanguageIds();
|
|
38
|
-
this.implementsExecutionOrder = data.supportsExecutionOrder ?? false;
|
|
39
|
-
this.hasVariableProvider = data.hasVariableProvider ?? false;
|
|
40
|
-
this.localResourceRoot = URI.revive(data.extensionLocation);
|
|
41
|
-
this.preloads = data.preloads?.map(u => ({
|
|
42
|
-
uri: URI.revive(u.uri),
|
|
43
|
-
provides: u.provides
|
|
44
|
-
})) ?? [];
|
|
45
|
-
}
|
|
46
|
-
update(data) {
|
|
47
|
-
const event = Object.create(null);
|
|
48
|
-
if (data.label !== undefined) {
|
|
49
|
-
this.label = data.label;
|
|
50
|
-
event.label = true;
|
|
51
|
-
}
|
|
52
|
-
if (data.description !== undefined) {
|
|
53
|
-
this.description = data.description;
|
|
54
|
-
event.description = true;
|
|
55
|
-
}
|
|
56
|
-
if (data.detail !== undefined) {
|
|
57
|
-
this.detail = data.detail;
|
|
58
|
-
event.detail = true;
|
|
59
|
-
}
|
|
60
|
-
if (data.supportedLanguages !== undefined) {
|
|
61
|
-
this.supportedLanguages = isNonEmptyArray(data.supportedLanguages) ? data.supportedLanguages : this._languageService.getRegisteredLanguageIds();
|
|
62
|
-
event.supportedLanguages = true;
|
|
63
|
-
}
|
|
64
|
-
if (data.supportsExecutionOrder !== undefined) {
|
|
65
|
-
this.implementsExecutionOrder = data.supportsExecutionOrder;
|
|
66
|
-
event.hasExecutionOrder = true;
|
|
67
|
-
}
|
|
68
|
-
if (data.supportsInterrupt !== undefined) {
|
|
69
|
-
this.implementsInterrupt = data.supportsInterrupt;
|
|
70
|
-
event.hasInterruptHandler = true;
|
|
71
|
-
}
|
|
72
|
-
if (data.hasVariableProvider !== undefined) {
|
|
73
|
-
this.hasVariableProvider = data.hasVariableProvider;
|
|
74
|
-
event.hasVariableProvider = true;
|
|
75
|
-
}
|
|
76
|
-
this._onDidChange.fire(event);
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
class MainThreadKernelDetectionTask {
|
|
80
|
-
constructor(notebookType) {
|
|
81
|
-
this.notebookType = notebookType;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
let MainThreadNotebookKernels = class MainThreadNotebookKernels {
|
|
85
|
-
constructor(
|
|
86
|
-
extHostContext,
|
|
87
|
-
_languageService,
|
|
88
|
-
_notebookKernelService,
|
|
89
|
-
_notebookExecutionStateService,
|
|
90
|
-
_notebookService,
|
|
91
|
-
notebookEditorService
|
|
92
|
-
) {
|
|
93
|
-
this._languageService = _languageService;
|
|
94
|
-
this._notebookKernelService = _notebookKernelService;
|
|
95
|
-
this._notebookExecutionStateService = _notebookExecutionStateService;
|
|
96
|
-
this._notebookService = _notebookService;
|
|
97
|
-
this._editors = ( new DisposableMap());
|
|
98
|
-
this._disposables = ( new DisposableStore());
|
|
99
|
-
this._kernels = ( new Map());
|
|
100
|
-
this._kernelDetectionTasks = ( new Map());
|
|
101
|
-
this._kernelSourceActionProviders = ( new Map());
|
|
102
|
-
this._kernelSourceActionProvidersEventRegistrations = ( new Map());
|
|
103
|
-
this._executions = ( new Map());
|
|
104
|
-
this._notebookExecutions = ( new Map());
|
|
105
|
-
this.variableRequestIndex = 0;
|
|
106
|
-
this.variableRequestMap = ( new Map());
|
|
107
|
-
this._proxy = ( extHostContext.getProxy(ExtHostContext.ExtHostNotebookKernels));
|
|
108
|
-
notebookEditorService.listNotebookEditors().forEach(this._onEditorAdd, this);
|
|
109
|
-
notebookEditorService.onDidAddNotebookEditor(this._onEditorAdd, this, this._disposables);
|
|
110
|
-
notebookEditorService.onDidRemoveNotebookEditor(this._onEditorRemove, this, this._disposables);
|
|
111
|
-
this._disposables.add(toDisposable(() => {
|
|
112
|
-
this._executions.forEach(e => {
|
|
113
|
-
e.complete({});
|
|
114
|
-
});
|
|
115
|
-
this._notebookExecutions.forEach(e => e.complete());
|
|
116
|
-
}));
|
|
117
|
-
this._disposables.add(this._notebookKernelService.onDidChangeSelectedNotebooks(e => {
|
|
118
|
-
for (const [handle, [kernel]] of this._kernels) {
|
|
119
|
-
if (e.oldKernel === kernel.id) {
|
|
120
|
-
this._proxy.$acceptNotebookAssociation(handle, e.notebook, false);
|
|
121
|
-
} else if (e.newKernel === kernel.id) {
|
|
122
|
-
this._proxy.$acceptNotebookAssociation(handle, e.notebook, true);
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
}));
|
|
126
|
-
}
|
|
127
|
-
dispose() {
|
|
128
|
-
this._disposables.dispose();
|
|
129
|
-
for (const [, registration] of ( this._kernels.values())) {
|
|
130
|
-
registration.dispose();
|
|
131
|
-
}
|
|
132
|
-
for (const [, registration] of ( this._kernelDetectionTasks.values())) {
|
|
133
|
-
registration.dispose();
|
|
134
|
-
}
|
|
135
|
-
for (const [, registration] of ( this._kernelSourceActionProviders.values())) {
|
|
136
|
-
registration.dispose();
|
|
137
|
-
}
|
|
138
|
-
this._editors.dispose();
|
|
139
|
-
}
|
|
140
|
-
_onEditorAdd(editor) {
|
|
141
|
-
const ipcListener = editor.onDidReceiveMessage(e => {
|
|
142
|
-
if (!editor.hasModel()) {
|
|
143
|
-
return;
|
|
144
|
-
}
|
|
145
|
-
const {
|
|
146
|
-
selected
|
|
147
|
-
} = this._notebookKernelService.getMatchingKernel(editor.textModel);
|
|
148
|
-
if (!selected) {
|
|
149
|
-
return;
|
|
150
|
-
}
|
|
151
|
-
for (const [handle, candidate] of this._kernels) {
|
|
152
|
-
if (candidate[0] === selected) {
|
|
153
|
-
this._proxy.$acceptKernelMessageFromRenderer(handle, editor.getId(), e.message);
|
|
154
|
-
break;
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
});
|
|
158
|
-
this._editors.set(editor, ipcListener);
|
|
159
|
-
}
|
|
160
|
-
_onEditorRemove(editor) {
|
|
161
|
-
this._editors.deleteAndDispose(editor);
|
|
162
|
-
}
|
|
163
|
-
async $postMessage(handle, editorId, message) {
|
|
164
|
-
const tuple = this._kernels.get(handle);
|
|
165
|
-
if (!tuple) {
|
|
166
|
-
throw ( new Error("kernel already disposed"));
|
|
167
|
-
}
|
|
168
|
-
const [kernel] = tuple;
|
|
169
|
-
let didSend = false;
|
|
170
|
-
for (const [editor] of this._editors) {
|
|
171
|
-
if (!editor.hasModel()) {
|
|
172
|
-
continue;
|
|
173
|
-
}
|
|
174
|
-
if (this._notebookKernelService.getMatchingKernel(editor.textModel).selected !== kernel) {
|
|
175
|
-
continue;
|
|
176
|
-
}
|
|
177
|
-
if (editorId === undefined) {
|
|
178
|
-
editor.postMessage(message);
|
|
179
|
-
didSend = true;
|
|
180
|
-
} else if (editor.getId() === editorId) {
|
|
181
|
-
editor.postMessage(message);
|
|
182
|
-
didSend = true;
|
|
183
|
-
break;
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
return didSend;
|
|
187
|
-
}
|
|
188
|
-
$receiveVariable(requestId, variable) {
|
|
189
|
-
const emitter = this.variableRequestMap.get(requestId);
|
|
190
|
-
if (emitter) {
|
|
191
|
-
emitter.emitOne(variable);
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
async $addKernel(handle, data) {
|
|
195
|
-
const that = this;
|
|
196
|
-
const kernel = new (class extends MainThreadKernel {
|
|
197
|
-
async executeNotebookCellsRequest(uri, handles) {
|
|
198
|
-
await that._proxy.$executeCells(handle, uri, handles);
|
|
199
|
-
}
|
|
200
|
-
async cancelNotebookCellExecution(uri, handles) {
|
|
201
|
-
await that._proxy.$cancelCells(handle, uri, handles);
|
|
202
|
-
}
|
|
203
|
-
provideVariables(notebookUri, parentId, kind, start, token) {
|
|
204
|
-
const requestId = `${handle}variables${that.variableRequestIndex++}`;
|
|
205
|
-
return new AsyncIterableProducer(async emitter => {
|
|
206
|
-
that.variableRequestMap.set(requestId, emitter);
|
|
207
|
-
try {
|
|
208
|
-
await that._proxy.$provideVariables(handle, requestId, notebookUri, parentId, kind, start, token);
|
|
209
|
-
} finally {
|
|
210
|
-
that.variableRequestMap.delete(requestId);
|
|
211
|
-
}
|
|
212
|
-
});
|
|
213
|
-
}
|
|
214
|
-
})(data, this._languageService);
|
|
215
|
-
const disposables = this._disposables.add(( new DisposableStore()));
|
|
216
|
-
this._kernels.set(handle, [kernel, disposables]);
|
|
217
|
-
disposables.add(this._notebookKernelService.registerKernel(kernel));
|
|
218
|
-
}
|
|
219
|
-
$updateKernel(handle, data) {
|
|
220
|
-
const tuple = this._kernels.get(handle);
|
|
221
|
-
if (tuple) {
|
|
222
|
-
tuple[0].update(data);
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
$removeKernel(handle) {
|
|
226
|
-
const tuple = this._kernels.get(handle);
|
|
227
|
-
if (tuple) {
|
|
228
|
-
tuple[1].dispose();
|
|
229
|
-
this._kernels.delete(handle);
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
$updateNotebookPriority(handle, notebook, value) {
|
|
233
|
-
const tuple = this._kernels.get(handle);
|
|
234
|
-
if (tuple) {
|
|
235
|
-
this._notebookKernelService.updateKernelNotebookAffinity(tuple[0], URI.revive(notebook), value);
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
$createExecution(handle, controllerId, rawUri, cellHandle) {
|
|
239
|
-
const uri = URI.revive(rawUri);
|
|
240
|
-
const notebook = this._notebookService.getNotebookTextModel(uri);
|
|
241
|
-
if (!notebook) {
|
|
242
|
-
throw ( new Error(`Notebook not found: ${( uri.toString())}`));
|
|
243
|
-
}
|
|
244
|
-
const kernel = this._notebookKernelService.getMatchingKernel(notebook);
|
|
245
|
-
if (!kernel.selected || kernel.selected.id !== controllerId) {
|
|
246
|
-
throw ( new Error(`Kernel is not selected: ${kernel.selected?.id} !== ${controllerId}`));
|
|
247
|
-
}
|
|
248
|
-
const execution = this._notebookExecutionStateService.createCellExecution(uri, cellHandle);
|
|
249
|
-
execution.confirm();
|
|
250
|
-
this._executions.set(handle, execution);
|
|
251
|
-
}
|
|
252
|
-
$updateExecution(handle, data) {
|
|
253
|
-
const updates = data.value;
|
|
254
|
-
try {
|
|
255
|
-
const execution = this._executions.get(handle);
|
|
256
|
-
execution?.update(( updates.map(NotebookDto.fromCellExecuteUpdateDto)));
|
|
257
|
-
} catch (e) {
|
|
258
|
-
onUnexpectedError(e);
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
$completeExecution(handle, data) {
|
|
262
|
-
try {
|
|
263
|
-
const execution = this._executions.get(handle);
|
|
264
|
-
execution?.complete(NotebookDto.fromCellExecuteCompleteDto(data.value));
|
|
265
|
-
} catch (e) {
|
|
266
|
-
onUnexpectedError(e);
|
|
267
|
-
} finally {
|
|
268
|
-
this._executions.delete(handle);
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
$createNotebookExecution(handle, controllerId, rawUri) {
|
|
272
|
-
const uri = URI.revive(rawUri);
|
|
273
|
-
const notebook = this._notebookService.getNotebookTextModel(uri);
|
|
274
|
-
if (!notebook) {
|
|
275
|
-
throw ( new Error(`Notebook not found: ${( uri.toString())}`));
|
|
276
|
-
}
|
|
277
|
-
const kernel = this._notebookKernelService.getMatchingKernel(notebook);
|
|
278
|
-
if (!kernel.selected || kernel.selected.id !== controllerId) {
|
|
279
|
-
throw ( new Error(`Kernel is not selected: ${kernel.selected?.id} !== ${controllerId}`));
|
|
280
|
-
}
|
|
281
|
-
const execution = this._notebookExecutionStateService.createExecution(uri);
|
|
282
|
-
execution.confirm();
|
|
283
|
-
this._notebookExecutions.set(handle, execution);
|
|
284
|
-
}
|
|
285
|
-
$beginNotebookExecution(handle) {
|
|
286
|
-
try {
|
|
287
|
-
const execution = this._notebookExecutions.get(handle);
|
|
288
|
-
execution?.begin();
|
|
289
|
-
} catch (e) {
|
|
290
|
-
onUnexpectedError(e);
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
$completeNotebookExecution(handle) {
|
|
294
|
-
try {
|
|
295
|
-
const execution = this._notebookExecutions.get(handle);
|
|
296
|
-
execution?.complete();
|
|
297
|
-
} catch (e) {
|
|
298
|
-
onUnexpectedError(e);
|
|
299
|
-
} finally {
|
|
300
|
-
this._notebookExecutions.delete(handle);
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
|
-
async $addKernelDetectionTask(handle, notebookType) {
|
|
304
|
-
const kernelDetectionTask = ( new MainThreadKernelDetectionTask(notebookType));
|
|
305
|
-
const registration = this._notebookKernelService.registerNotebookKernelDetectionTask(kernelDetectionTask);
|
|
306
|
-
this._kernelDetectionTasks.set(handle, [kernelDetectionTask, registration]);
|
|
307
|
-
}
|
|
308
|
-
$removeKernelDetectionTask(handle) {
|
|
309
|
-
const tuple = this._kernelDetectionTasks.get(handle);
|
|
310
|
-
if (tuple) {
|
|
311
|
-
tuple[1].dispose();
|
|
312
|
-
this._kernelDetectionTasks.delete(handle);
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
async $addKernelSourceActionProvider(handle, eventHandle, notebookType) {
|
|
316
|
-
const kernelSourceActionProvider = {
|
|
317
|
-
viewType: notebookType,
|
|
318
|
-
provideKernelSourceActions: async () => {
|
|
319
|
-
const actions = await this._proxy.$provideKernelSourceActions(handle, CancellationToken.None);
|
|
320
|
-
return ( actions.map(action => {
|
|
321
|
-
let documentation = action.documentation;
|
|
322
|
-
if (action.documentation && typeof action.documentation !== "string") {
|
|
323
|
-
documentation = URI.revive(action.documentation);
|
|
324
|
-
}
|
|
325
|
-
return {
|
|
326
|
-
label: action.label,
|
|
327
|
-
command: action.command,
|
|
328
|
-
description: action.description,
|
|
329
|
-
detail: action.detail,
|
|
330
|
-
documentation
|
|
331
|
-
};
|
|
332
|
-
}));
|
|
333
|
-
}
|
|
334
|
-
};
|
|
335
|
-
if (typeof eventHandle === "number") {
|
|
336
|
-
const emitter = ( new Emitter());
|
|
337
|
-
this._kernelSourceActionProvidersEventRegistrations.set(eventHandle, emitter);
|
|
338
|
-
kernelSourceActionProvider.onDidChangeSourceActions = emitter.event;
|
|
339
|
-
}
|
|
340
|
-
const registration = this._notebookKernelService.registerKernelSourceActionProvider(notebookType, kernelSourceActionProvider);
|
|
341
|
-
this._kernelSourceActionProviders.set(handle, [kernelSourceActionProvider, registration]);
|
|
342
|
-
}
|
|
343
|
-
$removeKernelSourceActionProvider(handle, eventHandle) {
|
|
344
|
-
const tuple = this._kernelSourceActionProviders.get(handle);
|
|
345
|
-
if (tuple) {
|
|
346
|
-
tuple[1].dispose();
|
|
347
|
-
this._kernelSourceActionProviders.delete(handle);
|
|
348
|
-
}
|
|
349
|
-
if (typeof eventHandle === "number") {
|
|
350
|
-
this._kernelSourceActionProvidersEventRegistrations.delete(eventHandle);
|
|
351
|
-
}
|
|
352
|
-
}
|
|
353
|
-
$emitNotebookKernelSourceActionsChangeEvent(eventHandle) {
|
|
354
|
-
const emitter = this._kernelSourceActionProvidersEventRegistrations.get(eventHandle);
|
|
355
|
-
if (emitter instanceof Emitter) {
|
|
356
|
-
emitter.fire(undefined);
|
|
357
|
-
}
|
|
358
|
-
}
|
|
359
|
-
$variablesUpdated(notebookUri) {
|
|
360
|
-
this._notebookKernelService.notifyVariablesChange(URI.revive(notebookUri));
|
|
361
|
-
}
|
|
362
|
-
};
|
|
363
|
-
MainThreadNotebookKernels = __decorate([
|
|
364
|
-
extHostNamedCustomer(MainContext.MainThreadNotebookKernels),
|
|
365
|
-
( __param(1, ILanguageService)),
|
|
366
|
-
( __param(2, INotebookKernelService)),
|
|
367
|
-
( __param(3, INotebookExecutionStateService)),
|
|
368
|
-
( __param(4, INotebookService)),
|
|
369
|
-
( __param(5, INotebookEditorService))
|
|
370
|
-
], MainThreadNotebookKernels);
|
|
371
|
-
|
|
372
|
-
export { MainThreadNotebookKernels };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
|
-
import { MainThreadNotebookRenderersShape } from "@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol";
|
|
3
|
-
import { IExtHostContext } from "../../services/extensions/common/extHostCustomers.js";
|
|
4
|
-
import { INotebookRendererMessagingService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookRendererMessagingService.service";
|
|
5
|
-
export declare class MainThreadNotebookRenderers extends Disposable implements MainThreadNotebookRenderersShape {
|
|
6
|
-
private readonly messaging;
|
|
7
|
-
private readonly proxy;
|
|
8
|
-
constructor(extHostContext: IExtHostContext, messaging: INotebookRendererMessagingService);
|
|
9
|
-
$postMessage(editorId: string | undefined, rendererId: string, message: unknown): Promise<boolean>;
|
|
10
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
-
import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
4
|
-
import { ExtHostContext, MainContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol';
|
|
5
|
-
import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
|
|
6
|
-
import { INotebookRendererMessagingService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookRendererMessagingService.service';
|
|
7
|
-
|
|
8
|
-
let MainThreadNotebookRenderers = class MainThreadNotebookRenderers extends Disposable {
|
|
9
|
-
constructor(extHostContext, messaging) {
|
|
10
|
-
super();
|
|
11
|
-
this.messaging = messaging;
|
|
12
|
-
this.proxy = ( extHostContext.getProxy(ExtHostContext.ExtHostNotebookRenderers));
|
|
13
|
-
this._register(messaging.onShouldPostMessage(e => {
|
|
14
|
-
this.proxy.$postRendererMessage(e.editorId, e.rendererId, e.message);
|
|
15
|
-
}));
|
|
16
|
-
}
|
|
17
|
-
$postMessage(editorId, rendererId, message) {
|
|
18
|
-
return this.messaging.receiveMessage(editorId, rendererId, message);
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
MainThreadNotebookRenderers = __decorate([
|
|
22
|
-
extHostNamedCustomer(MainContext.MainThreadNotebookRenderers),
|
|
23
|
-
( __param(1, INotebookRendererMessagingService))
|
|
24
|
-
], MainThreadNotebookRenderers);
|
|
25
|
-
|
|
26
|
-
export { MainThreadNotebookRenderers };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
2
|
-
import { IExtHostContext } from "../../services/extensions/common/extHostCustomers.js";
|
|
3
|
-
import { IWorkingCopyFileService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/workingCopy/common/workingCopyFileService.service";
|
|
4
|
-
export declare class SaveParticipant {
|
|
5
|
-
private readonly workingCopyFileService;
|
|
6
|
-
private _saveParticipantDisposable;
|
|
7
|
-
constructor(extHostContext: IExtHostContext, instantiationService: IInstantiationService, workingCopyFileService: IWorkingCopyFileService);
|
|
8
|
-
dispose(): void;
|
|
9
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
-
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
4
|
-
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
5
|
-
import { extHostCustomer } from '../../services/extensions/common/extHostCustomers.js';
|
|
6
|
-
import { ExtHostContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol';
|
|
7
|
-
import { raceCancellationError } from '@codingame/monaco-vscode-api/vscode/vs/base/common/async';
|
|
8
|
-
import { IWorkingCopyFileService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/workingCopy/common/workingCopyFileService.service';
|
|
9
|
-
import { NotebookFileWorkingCopyModel } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookEditorModel';
|
|
10
|
-
|
|
11
|
-
class ExtHostNotebookDocumentSaveParticipant {
|
|
12
|
-
constructor(extHostContext) {
|
|
13
|
-
this._proxy = ( extHostContext.getProxy(ExtHostContext.ExtHostNotebookDocumentSaveParticipant));
|
|
14
|
-
}
|
|
15
|
-
async participate(workingCopy, context, _progress, token) {
|
|
16
|
-
if (!workingCopy.model || !(workingCopy.model instanceof NotebookFileWorkingCopyModel)) {
|
|
17
|
-
return undefined;
|
|
18
|
-
}
|
|
19
|
-
let _warningTimeout;
|
|
20
|
-
const p = ( new Promise((resolve, reject) => {
|
|
21
|
-
_warningTimeout = setTimeout(() => reject(( new Error(( localize(3031, "Aborted onWillSaveNotebookDocument-event after 1750ms"))))), 1750);
|
|
22
|
-
this._proxy.$participateInSave(workingCopy.resource, context.reason, token).then(_ => {
|
|
23
|
-
clearTimeout(_warningTimeout);
|
|
24
|
-
return undefined;
|
|
25
|
-
}).then(resolve, reject);
|
|
26
|
-
}));
|
|
27
|
-
return raceCancellationError(p, token);
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
let SaveParticipant = class SaveParticipant {
|
|
31
|
-
constructor(extHostContext, instantiationService, workingCopyFileService) {
|
|
32
|
-
this.workingCopyFileService = workingCopyFileService;
|
|
33
|
-
this._saveParticipantDisposable = this.workingCopyFileService.addSaveParticipant(
|
|
34
|
-
instantiationService.createInstance(ExtHostNotebookDocumentSaveParticipant, extHostContext)
|
|
35
|
-
);
|
|
36
|
-
}
|
|
37
|
-
dispose() {
|
|
38
|
-
this._saveParticipantDisposable.dispose();
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
SaveParticipant = __decorate([extHostCustomer, ( __param(1, IInstantiationService)), ( __param(2, IWorkingCopyFileService))], SaveParticipant);
|
|
42
|
-
|
|
43
|
-
export { SaveParticipant };
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { IDisposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
|
-
import { BrandedService, IConstructorSignature } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
3
|
-
import { ExtensionHostKind } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensionHostKind";
|
|
4
|
-
import { IExtensionHostProxy } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensionHostProxy";
|
|
5
|
-
import { IInternalExtensionService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions";
|
|
6
|
-
import { IRPCProtocol, ProxyIdentifier } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/proxyIdentifier";
|
|
7
|
-
export interface IExtHostContext extends IRPCProtocol {
|
|
8
|
-
readonly remoteAuthority: string | null;
|
|
9
|
-
readonly extensionHostKind: ExtensionHostKind;
|
|
10
|
-
}
|
|
11
|
-
export interface IInternalExtHostContext extends IExtHostContext {
|
|
12
|
-
readonly internalExtensionService: IInternalExtensionService;
|
|
13
|
-
_setExtensionHostProxy(extensionHostProxy: IExtensionHostProxy): void;
|
|
14
|
-
_setAllMainProxyIdentifiers(mainProxyIdentifiers: ProxyIdentifier<unknown>[]): void;
|
|
15
|
-
}
|
|
16
|
-
export type IExtHostNamedCustomer<T extends IDisposable> = [
|
|
17
|
-
ProxyIdentifier<T>,
|
|
18
|
-
IExtHostCustomerCtor<T>
|
|
19
|
-
];
|
|
20
|
-
export type IExtHostCustomerCtor<T extends IDisposable> = IConstructorSignature<T, [
|
|
21
|
-
IExtHostContext
|
|
22
|
-
]>;
|
|
23
|
-
export declare function extHostNamedCustomer<T extends IDisposable>(id: ProxyIdentifier<T>): <Services extends BrandedService[]>(ctor: {
|
|
24
|
-
new (context: IExtHostContext, ...services: Services): T;
|
|
25
|
-
}) => void;
|
|
26
|
-
export declare function extHostCustomer<T extends IDisposable, Services extends BrandedService[]>(ctor: {
|
|
27
|
-
new (context: IExtHostContext, ...services: Services): T;
|
|
28
|
-
}): void;
|
|
29
|
-
export declare namespace ExtHostCustomersRegistry {
|
|
30
|
-
function getNamedCustomers(): IExtHostNamedCustomer<IDisposable>[];
|
|
31
|
-
function getCustomers(): IExtHostCustomerCtor<IDisposable>[];
|
|
32
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
function extHostNamedCustomer(id) {
|
|
4
|
-
return function(ctor) {
|
|
5
|
-
ExtHostCustomersRegistryImpl.INSTANCE.registerNamedCustomer(id, ctor);
|
|
6
|
-
};
|
|
7
|
-
}
|
|
8
|
-
function extHostCustomer(ctor) {
|
|
9
|
-
ExtHostCustomersRegistryImpl.INSTANCE.registerCustomer(ctor);
|
|
10
|
-
}
|
|
11
|
-
var ExtHostCustomersRegistry;
|
|
12
|
-
(function(ExtHostCustomersRegistry) {
|
|
13
|
-
function getNamedCustomers() {
|
|
14
|
-
return ExtHostCustomersRegistryImpl.INSTANCE.getNamedCustomers();
|
|
15
|
-
}
|
|
16
|
-
ExtHostCustomersRegistry.getNamedCustomers = getNamedCustomers;
|
|
17
|
-
function getCustomers() {
|
|
18
|
-
return ExtHostCustomersRegistryImpl.INSTANCE.getCustomers();
|
|
19
|
-
}
|
|
20
|
-
ExtHostCustomersRegistry.getCustomers = getCustomers;
|
|
21
|
-
})(ExtHostCustomersRegistry || (ExtHostCustomersRegistry = {}));
|
|
22
|
-
class ExtHostCustomersRegistryImpl {
|
|
23
|
-
static {
|
|
24
|
-
this.INSTANCE = ( new ExtHostCustomersRegistryImpl());
|
|
25
|
-
}
|
|
26
|
-
constructor() {
|
|
27
|
-
this._namedCustomers = [];
|
|
28
|
-
this._customers = [];
|
|
29
|
-
}
|
|
30
|
-
registerNamedCustomer(id, ctor) {
|
|
31
|
-
const entry = [id, ctor];
|
|
32
|
-
this._namedCustomers.push(entry);
|
|
33
|
-
}
|
|
34
|
-
getNamedCustomers() {
|
|
35
|
-
return this._namedCustomers;
|
|
36
|
-
}
|
|
37
|
-
registerCustomer(ctor) {
|
|
38
|
-
this._customers.push(ctor);
|
|
39
|
-
}
|
|
40
|
-
getCustomers() {
|
|
41
|
-
return this._customers;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export { ExtHostCustomersRegistry, extHostCustomer, extHostNamedCustomer };
|