import React, { ForwardedRef, useEffect, useRef } from 'react'; type Message = { role: string content: string } interface ConversationProps { messages: Message[]; onResendClick: () => void; onEditClick: () => void; onCopyClick: () => void; isClicked: boolean } const ConversationFrontend = React.forwardRef( ({ messages, onResendClick, onEditClick, onCopyClick, isClicked }, ref: ForwardedRef) => { const messagesEndRef = useRef(null) useEffect(() => { messagesEndRef.current?.scrollIntoView() },[messages]) return (
{messages.map((message, index) => { if (index >= 1){ return (

{message.content}

); } })}

Copied!

); } ); export default ConversationFrontend;