mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-23 23:16:58 +08:00
### What problem does this PR solve? feat: Hide the upload button in the external agent's chat box #1880 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -1,11 +1,12 @@
|
||||
import MessageInput from '@/components/message-input';
|
||||
import MessageItem from '@/components/message-item';
|
||||
import { MessageType } from '@/constants/chat';
|
||||
import { MessageType, SharedFrom } from '@/constants/chat';
|
||||
import { useSendButtonDisabled } from '@/pages/chat/hooks';
|
||||
import { Flex, Spin } from 'antd';
|
||||
import { forwardRef } from 'react';
|
||||
import {
|
||||
useCreateSharedConversationOnMount,
|
||||
useGetSharedChatSearchParams,
|
||||
useSelectCurrentSharedConversation,
|
||||
useSendSharedMessage,
|
||||
} from '../shared-hooks';
|
||||
@ -37,6 +38,7 @@ const ChatContainer = () => {
|
||||
addNewestAnswer,
|
||||
);
|
||||
const sendDisabled = useSendButtonDisabled(value);
|
||||
const { from } = useGetSharedChatSearchParams();
|
||||
|
||||
return (
|
||||
<>
|
||||
@ -74,6 +76,7 @@ const ChatContainer = () => {
|
||||
onPressEnter={handlePressEnter}
|
||||
sendLoading={sendLoading}
|
||||
uploadUrl="/v1/api/document/upload_and_parse"
|
||||
showUploadIcon={from === SharedFrom.Chat}
|
||||
></MessageInput>
|
||||
</Flex>
|
||||
</>
|
||||
|
||||
Reference in New Issue
Block a user