/* eslint-disable @next/next/no-img-element */ import { Dialog, DialogPanel, DialogTitle, Transition, TransitionChild, } from '@headlessui/react'; import { Document } from '@langchain/core/documents'; import { File } from 'lucide-react'; import { Fragment, useState } from 'react'; const MessageSources = ({ sources }: { sources: Document[] }) => { const [isDialogOpen, setIsDialogOpen] = useState(false); const closeModal = () => { setIsDialogOpen(false); document.body.classList.remove('overflow-hidden-scrollable'); }; const openModal = () => { setIsDialogOpen(true); document.body.classList.add('overflow-hidden-scrollable'); }; return (
{source.metadata.title}
{source.metadata.url.replace(/.+\/\/|www.|\..+/g, '')}