src/vs/workbench/contrib/localHistory/browser/localHistoryFileSystemProvider.ts/LocalHistoryFileSystemProvider/toLocalHistoryFileSystem
class LocalHistoryFileSystemProvider:	static toLocalHistoryFileSystem(resource: ILocalHistoryResource): URI {
		const serializedLocalHistoryResource: ISerializedLocalHistoryResource = {
			location: resource.location.toString(true),
			associatedResource: resource.associatedResource.toString(true)
		};

		// Try to preserve the associated resource as much as possible
		// and only keep the `query` part dynamic. This enables other
		// components (e.g. other timeline providers) to continue
		// providing timeline entries even when our resource is active.
		return resource.associatedResource.with({
			scheme: LocalHistoryFileSystemProvider.SCHEMA,
			query: JSON.stringify(serializedLocalHistoryResource)
		});
	}