src/vs/workbench/contrib/terminal/browser/remoteTerminalBackend.ts/RemoteTerminalBackendContribution/constructor
class RemoteTerminalBackendContribution:	constructor(
		@IInstantiationService instantiationService: IInstantiationService,
		@IRemoteAgentService remoteAgentService: IRemoteAgentService,
		@ITerminalService terminalService: ITerminalService
	) {
		const remoteAuthority = remoteAgentService.getConnection()?.remoteAuthority;
		if (remoteAuthority) {
			const connection = remoteAgentService.getConnection();
			if (connection) {
				const channel = instantiationService.createInstance(RemoteTerminalChannelClient, connection.remoteAuthority, connection.getChannel(REMOTE_TERMINAL_CHANNEL_NAME));
				const backend = instantiationService.createInstance(RemoteTerminalBackend, remoteAuthority, channel);
				Registry.as<ITerminalBackendRegistry>(TerminalExtensions.Backend).registerTerminalBackend(backend);
				terminalService.handleNewRegisteredBackend(backend);
			}
		}
	}