* chore: take out experimental feature and bump nitro version * chore: update inference module to use nitro 0.1.17
21 lines
573 B
TypeScript
21 lines
573 B
TypeScript
import { useAtomValue } from 'jotai'
|
|
|
|
import ChatInstruction from '../ChatInstruction'
|
|
import ChatItem from '../ChatItem'
|
|
|
|
import { getCurrentChatMessagesAtom } from '@/helpers/atoms/ChatMessage.atom'
|
|
|
|
const ChatBody: React.FC = () => {
|
|
const messages = useAtomValue(getCurrentChatMessagesAtom)
|
|
return (
|
|
<div className="flex h-full w-full flex-col-reverse overflow-y-auto">
|
|
{messages.map((message) => (
|
|
<ChatItem {...message} key={message.id} />
|
|
))}
|
|
{messages.length === 0 && <ChatInstruction />}
|
|
</div>
|
|
)
|
|
}
|
|
|
|
export default ChatBody
|