fix(lib/vscode): register LogLevelChannel

This commit is contained in:
Joe Previte
2021-03-15 14:27:37 -07:00
parent 050a1bb146
commit ae02023454
4 changed files with 28 additions and 53 deletions

View File

@@ -5,8 +5,8 @@
import { ProxyChannel } from 'vs/base/parts/ipc/common/ipc';
import { ILocalizationsService } from 'vs/platform/localizations/common/localizations';
import { ISharedProcessService } from 'vs/platform/ipc/electron-sandbox/services';
import { registerSingleton } from 'vs/platform/instantiation/common/extensions';
import { IRemoteAgentService } from '../../remote/common/remoteAgentService';
// @ts-ignore: interface is implemented via proxy
export class LocalizationsService implements ILocalizationsService {
@@ -14,9 +14,17 @@ export class LocalizationsService implements ILocalizationsService {
declare readonly _serviceBrand: undefined;
constructor(
@ISharedProcessService sharedProcessService: ISharedProcessService,
@IRemoteAgentService remoteAgentService: IRemoteAgentService,
) {
return ProxyChannel.toService<ILocalizationsService>(sharedProcessService.getChannel('localizations'));
/*
NOTE@coder:
Upstream, they use the ISharedProcessService.
We run this on the browser where there is no shared process so it needs to connect
to the localization channel through the remote agent.
3/16/21 jsjoeio code-asher
*/
return ProxyChannel.toService<ILocalizationsService>(remoteAgentService.getConnection()!.getChannel('localizations'));
}
}