
import { EChatRole, TChatRole, TMessage } from "@/types/bot";
import Message from "./Message";
import MessageRobot from "./MessageRobot";
import { TAgentDetail } from "@/types/agent";
interface Props {
  agent?: TAgentDetail,
  role: TChatRole,
  text: string
  textReasoning?: string
  message: TMessage
}
export default ({agent, text, role, message, textReasoning=''}:Props) => {
  if(role === EChatRole.User ){
    return <Message text={text}/>
  }
  return <MessageRobot message={message} textReasoning={textReasoning} text={text} agent={agent}/>
}


