import { Frown } from "react-feather"; import HistoricalMessage from "./HistoricalMessage"; import PromptReply from "./PromptReply"; export default function ChatHistory({ history = [], workspace }) { if (history.length === 0) { return (

No chat history found.

Send your first message to get started.

); } return (
{history.map( ( { uuid = null, content, sources = [], role, closed = true, pending = false, error = false, animate = false, }, index ) => { const isLastBotReply = index === history.length - 1 && role === "assistant"; if (isLastBotReply && animate) { return ( ); } return ( ); } )}
); }