From 77cfc3e1c01f2bf7dc7ebe2558d60020c00a7d30 Mon Sep 17 00:00:00 2001 From: lcjia_you Date: Thu, 16 May 2024 10:49:41 +0800 Subject: [PATCH] =?UTF-8?q?Fix=20a=20bug=20in=20'assistant-setting.tsx'=20?= =?UTF-8?q?that=20causes=20the=20upload=20button=20to=E2=80=A6=20(#796)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit … incorrectly appear on the model settings page. ### What problem does this PR solve? This is an issue with the Upload component on the assistant-setting page. I use the show variable to explicitly control the button component within it. see: ![20240516000417](https://github.com/infiniflow/ragflow/assets/37476944/de88f911-6dbd-412d-a981-86cf60aa2257) ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) - [x] Other (please describe): Add the local models that DeepDoc depends on to the gitignore file in dev mode. Signed-off-by: liuchao --- .gitignore | 1 + .../assistant-setting.tsx | 16 ++++++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index ef393f31ea..87fcc66ae8 100644 --- a/.gitignore +++ b/.gitignore @@ -29,3 +29,4 @@ Cargo.lock docker/ragflow-logs/ /flask_session /logs +rag/res/deepdoc \ No newline at end of file diff --git a/web/src/pages/chat/chat-configuration-modal/assistant-setting.tsx b/web/src/pages/chat/chat-configuration-modal/assistant-setting.tsx index fdaa08c299..97d998f5c9 100644 --- a/web/src/pages/chat/chat-configuration-modal/assistant-setting.tsx +++ b/web/src/pages/chat/chat-configuration-modal/assistant-setting.tsx @@ -22,6 +22,15 @@ const AssistantSetting = ({ show }: ISegmentedContentProps) => { return e?.fileList; }; + const uploadButtion = ( + + ) + return (
{ maxCount={1} showUploadList={{ showPreviewIcon: false, showRemoveIcon: false }} > - + {show ? uploadButtion : null}