UNPKG

@plteam/chat-ui

Version:

CUI Kit is a free and open-source library for creating AI assistant chat interfaces, built with React, Material UI, and TypeScript

13 lines (12 loc) 721 B
import * as React from 'react'; import MessageMarkdownBlock, { ChatMarkdownBlockRoot } from '../markdown/MessageMarkdownBlock'; import { styled } from '@mui/material/styles'; import { useChatSlots } from '../../core/ChatSlotsContext'; export const ChatMarkdownReasoningBlockRoot = styled(ChatMarkdownBlockRoot)(({ theme }) => ({ color: theme.palette.grey[700], })); const MessageReasoningFull = ({ text, isProgress }) => { const { slots, slotProps } = useChatSlots(); return (React.createElement(MessageMarkdownBlock, { text: text, rootComponent: slots.markdownReasoningRoot, rootComponentProps: slotProps.markdownReasoningRoot, inProgress: isProgress })); }; export default MessageReasoningFull;