import { Skeleton } from 'antd';
import React from 'react';
import { useConverseMessage } from 'pawchat-shared';
import { AlertErrorView } from '../AlertErrorView';
import { ChatInputBox } from './ChatInputBox';
const ChatBoxPlaceholder: React.FC = React.memo(() => {
return (
);
});
ChatBoxPlaceholder.displayName = 'ChatBoxPlaceholder';
export const ChatBox: React.FC<{
converseId: string;
}> = React.memo((props) => {
const { messages, loading, error, handleSendMessage } = useConverseMessage(
props.converseId
);
if (loading) {
return ;
}
if (error) {
return ;
}
return (
消息数据: {JSON.stringify(messages)}
handleSendMessage({
converseId: props.converseId,
content: msg,
})
}
/>
);
});
ChatBox.displayName = 'ChatBox';