import type { AssistantSources as Sources } from '@trek/shared'; import { Globe } from 'lucide-react'; import { useTranslation } from '../../i18n'; /** A page's host without "www.", as the chip names it; the whole address where it does not read as one. */ function hostOf(url: string): string { try { return new URL(url).hostname.replace(/^www\./, ''); } catch { return url; } } /** * The pages an answer drew on from the provider's web search, under its text: * a row of quiet chips with each page's site and title, opening in a new tab. * No page's icon is loaded, so showing the sources asks no site for anything. */ export default function AssistantSources({ sources }: { sources: Sources['sources'] }) { const { t } = useTranslation(); return ( ); }