Fix: Hide the upload button in the external chat box #2242 (#4048)

### What problem does this PR solve?

Fix: Hide the upload button in the external chat box  #2242

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
balibabu 2024-12-17 10:32:52 +08:00 committed by GitHub
parent cb6e9ce164
commit 1053ef5551
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,7 +1,7 @@
import MessageInput from '@/components/message-input';
import MessageItem from '@/components/message-item';
import { useClickDrawer } from '@/components/pdf-drawer/hooks';
import { MessageType, SharedFrom } from '@/constants/chat';
import { MessageType } from '@/constants/chat';
import { useSendButtonDisabled } from '@/pages/chat/hooks';
import { Flex, Spin } from 'antd';
import { forwardRef } from 'react';
@ -15,7 +15,7 @@ import PdfDrawer from '@/components/pdf-drawer';
import styles from './index.less';
const ChatContainer = () => {
const { from, sharedId: conversationId } = useGetSharedChatSearchParams();
const { sharedId: conversationId } = useGetSharedChatSearchParams();
const { visible, hideModal, documentId, selectedChunk, clickDocumentButton } =
useClickDrawer();
@ -79,7 +79,7 @@ const ChatContainer = () => {
onPressEnter={handlePressEnter}
sendLoading={sendLoading}
uploadMethod="external_upload_and_parse"
showUploadIcon={from === SharedFrom.Chat}
showUploadIcon={false}
></MessageInput>
</Flex>
{visible && (