import React from "react"; import { ArrowSquareOut, FilePdf, FileText, Trash, } from "@phosphor-icons/react"; import { Empty, IconButton } from "./ui.jsx"; export function AssistantSources({ material, onRemoveSource, onRemoveMaterial, }) { return (
{material?.kind === "book" ? ( <>

{material.title}

{material.page_count} pages ยท indexed on this device

Open original PDF

Answers use the selected passage, neighboring pages and relevant sections retrieved from this book. Page citations jump back to the reader.

) : material?.sources?.length ? ( material.sources.map((source, index) => (
Source {index + 1}

{source.title}

Open source {source.excerpt && (
Saved source excerpt

{source.excerpt}

)}
onRemoveSource(index)} >
)) ) : ( Add cited sources when authoring the lesson or in the article editor. )}
); }