src/vs/workbench/contrib/terminal/browser/terminalEditorService.ts/TerminalEditorService/reviveInput
class TerminalEditorService:	reviveInput(deserializedInput: IDeserializedTerminalEditorInput): EditorInput {
		const resource: URI = URI.isUri(deserializedInput) ? deserializedInput : deserializedInput.resource;
		const inputKey = resource.path;

		if ('pid' in deserializedInput) {
			const instance = this._terminalInstanceService.createInstance({ attachPersistentProcess: deserializedInput }, TerminalLocation.Editor);
			instance.target = TerminalLocation.Editor;
			const input = this._instantiationService.createInstance(TerminalEditorInput, resource, instance);
			this._registerInstance(inputKey, input, instance);
			return input;
		} else {
			throw new Error(`Could not revive terminal editor input, ${deserializedInput}`);
		}
	}