MingruiZhang's picture
feat: Component UI and lastUpdated timestamp (#21)
bfbf1a7 unverified
raw
history blame
770 Bytes
'use client';
import { MediaDetails } from '@/lib/fetch';
import useChatWithMedia from '@/lib/hooks/useChatWithMedia';
import React from 'react';
import { ChatList } from '../chat/ChatList';
// import { ChatPanel } from '../chat/ChatPanel';
export interface ChatProps {
mediaList: MediaDetails[];
}
const Chat: React.FC<ChatProps> = ({ mediaList }) => {
const { messages, append, reload, stop, isLoading, input, setInput } =
useChatWithMedia(mediaList);
return (
<>
<ChatList messages={messages} />
{/* <ChatPanel
isLoading={isLoading}
stop={stop}
append={append}
reload={reload}
messages={messages}
input={input}
setInput={setInput}
/> */}
</>
);
};
export default Chat;