|
|
|
@ -188,10 +188,8 @@ const SearchForm = memo(function ({ initialValues, onSubmit }) {
|
|
|
|
|
|
|
|
|
|
function ChatHistory() {
|
|
|
|
|
// const [formValues, setFormValues] = useState({});
|
|
|
|
|
const [formValues, setFormValues] = useFormStore(
|
|
|
|
|
useShallow((state) => [state.chatHistory, state.setChatHistory]),
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
const [formValues, setFormValues] = useFormStore(useShallow((state) => [state.chatHistoryForm, state.setChatHistoryForm]));
|
|
|
|
|
const [selectedConversation, setSelectedConversation] = useFormStore(useShallow((state) => [state.chatHistorySelectChat, state.setChatHistorySelectChat]));
|
|
|
|
|
|
|
|
|
|
const handleSubmit = useCallback((values) => {
|
|
|
|
|
setFormValues({ ...values });
|
|
|
|
@ -199,7 +197,6 @@ function ChatHistory() {
|
|
|
|
|
|
|
|
|
|
const [loading, setLoading] = useState(false);
|
|
|
|
|
const [conversationsList, setConversationsList] = useState([]);
|
|
|
|
|
const [selectedConversation, setSelectedConversation] = useState({});
|
|
|
|
|
const [chatItemMessages, setChatItemMessages] = useState([]);
|
|
|
|
|
const getConversationsList = async () => {
|
|
|
|
|
setLoading(true);
|
|
|
|
|