mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-19 12:06:42 +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:
@ -66,6 +66,7 @@ interface IProps {
|
||||
conversationId: string;
|
||||
uploadUrl?: string;
|
||||
isShared?: boolean;
|
||||
showUploadIcon?: boolean;
|
||||
}
|
||||
|
||||
const getBase64 = (file: FileType): Promise<string> =>
|
||||
@ -85,6 +86,7 @@ const MessageInput = ({
|
||||
sendLoading,
|
||||
onInputChange,
|
||||
conversationId,
|
||||
showUploadIcon = true,
|
||||
uploadUrl = '/v1/document/upload_and_parse',
|
||||
}: IProps) => {
|
||||
const { t } = useTranslate('chat');
|
||||
@ -158,7 +160,7 @@ const MessageInput = ({
|
||||
className={classNames({ [styles.inputWrapper]: fileList.length === 0 })}
|
||||
suffix={
|
||||
<Space>
|
||||
{conversationId && (
|
||||
{conversationId && showUploadIcon && (
|
||||
<Upload
|
||||
action={uploadUrl}
|
||||
fileList={fileList}
|
||||
|
||||
Reference in New Issue
Block a user