mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-18 15:55:59 +01:00
Implements data channels (#256226)
This commit is contained in:
committed by
GitHub
parent
4ac51cd2bb
commit
67b27dba35
@@ -43,6 +43,7 @@ import { IExtHostCommands } from './extHostCommands.js';
|
||||
import { createExtHostComments } from './extHostComments.js';
|
||||
import { ExtHostConfigProvider, IExtHostConfiguration } from './extHostConfiguration.js';
|
||||
import { ExtHostCustomEditors } from './extHostCustomEditors.js';
|
||||
import { IExtHostDataChannels } from './extHostDataChannels.js';
|
||||
import { IExtHostDebugService } from './extHostDebugService.js';
|
||||
import { IExtHostDecorations } from './extHostDecorations.js';
|
||||
import { ExtHostDiagnostics } from './extHostDiagnostics.js';
|
||||
@@ -151,6 +152,7 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
|
||||
const extHostAuthentication = accessor.get(IExtHostAuthentication);
|
||||
const extHostLanguageModels = accessor.get(IExtHostLanguageModels);
|
||||
const extHostMcp = accessor.get(IExtHostMpcService);
|
||||
const extHostDataChannels = accessor.get(IExtHostDataChannels);
|
||||
|
||||
// register addressable instances
|
||||
rpcProtocol.set(ExtHostContext.ExtHostFileSystemInfo, extHostFileSystemInfo);
|
||||
@@ -169,6 +171,7 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
|
||||
rpcProtocol.set(ExtHostContext.ExtHostProgress, extHostProgress);
|
||||
rpcProtocol.set(ExtHostContext.ExtHostAuthentication, extHostAuthentication);
|
||||
rpcProtocol.set(ExtHostContext.ExtHostChatProvider, extHostLanguageModels);
|
||||
rpcProtocol.set(ExtHostContext.ExtHostDataChannels, extHostDataChannels);
|
||||
|
||||
// automatically create and register addressable instances
|
||||
const extHostDecorations = rpcProtocol.set(ExtHostContext.ExtHostDecorations, accessor.get(IExtHostDecorations));
|
||||
@@ -451,6 +454,10 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
|
||||
get appCommit(): string | undefined {
|
||||
checkProposedApiEnabled(extension, 'resolvers');
|
||||
return initData.commit;
|
||||
},
|
||||
getDataChannel<T>(channelId: string): vscode.DataChannel<T> {
|
||||
checkProposedApiEnabled(extension, 'dataChannels');
|
||||
return extHostDataChannels.createDataChannel(extension, channelId);
|
||||
}
|
||||
};
|
||||
if (!initData.environment.extensionTestsLocationURI) {
|
||||
|
||||
Reference in New Issue
Block a user