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


