feat: Fetch conversation list by @tanstack/react-query and displays error message that task_executor does not exist #2088 (#2112)

### What problem does this PR solve?

feat: Fetch conversation list by @tanstack/react-query
feat: Displays error message that task_executor does not exist

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2024-08-27 14:45:17 +08:00
committed by GitHub
parent 1d88b197fb
commit 61d2a74b25
11 changed files with 350 additions and 460 deletions

View File

@ -8,7 +8,6 @@ import {
useFetchConversationOnMount,
useGetFileIcon,
useGetSendButtonDisabled,
useSelectConversationLoading,
useSendButtonDisabled,
useSendMessage,
} from '../hooks';
@ -16,6 +15,7 @@ import { buildMessageItemReference } from '../utils';
import MessageInput from '@/components/message-input';
import { useFetchUserInfo } from '@/hooks/user-setting-hooks';
import { memo } from 'react';
import styles from './index.less';
const ChatContainer = () => {
@ -26,6 +26,7 @@ const ChatContainer = () => {
removeLatestMessage,
addNewestAnswer,
conversationId,
loading,
} = useFetchConversationOnMount();
const {
handleInputChange,
@ -43,7 +44,6 @@ const ChatContainer = () => {
const disabled = useGetSendButtonDisabled();
const sendDisabled = useSendButtonDisabled(value);
useGetFileIcon();
const loading = useSelectConversationLoading();
const { data: userInfo } = useFetchUserInfo();
const { createConversationBeforeUploadDocument } =
useCreateConversationBeforeUploadDocument();
@ -104,4 +104,4 @@ const ChatContainer = () => {
);
};
export default ChatContainer;
export default memo(ChatContainer);