From 18d143f56ed82c28d128c4ad90cc33310fabbd80 Mon Sep 17 00:00:00 2001 From: ousugo Date: Fri, 14 Mar 2025 13:17:21 +0800 Subject: [PATCH] feat(Inputbar): Add file type validation message for unsupported files - Implemented a message notification for users when attempting to upload unsupported file types in the Inputbar component. --- src/renderer/src/pages/home/Inputbar/Inputbar.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/renderer/src/pages/home/Inputbar/Inputbar.tsx b/src/renderer/src/pages/home/Inputbar/Inputbar.tsx index 22a14757..ad392960 100644 --- a/src/renderer/src/pages/home/Inputbar/Inputbar.tsx +++ b/src/renderer/src/pages/home/Inputbar/Inputbar.tsx @@ -384,6 +384,11 @@ const Inputbar: FC = ({ assistant: _assistant, setActiveTopic, topic }) = const selectedFile = await window.api.file.get(tempFilePath) selectedFile && setFiles((prevFiles) => [...prevFiles, selectedFile]) break + } else { + window.message.info({ + key: 'file_not_supported', + content: t('chat.input.file_not_supported') + }) } }