From 0e9672df80c0da17fcb1f86aaa5d5f9df006dd88 Mon Sep 17 00:00:00 2001 From: zhaoying Date: Wed, 18 Mar 2026 16:10:20 +0800 Subject: [PATCH] fix(web): app features --- web/src/components/Chat/ChatToolbar.tsx | 12 +++---- web/src/i18n/zh.ts | 2 +- web/src/views/ApplicationConfig/Agent.tsx | 3 +- web/src/views/ApplicationConfig/Cluster.tsx | 3 +- .../components/AppSharingModal.tsx | 17 +++++---- .../components/ConfigHeader.tsx | 18 +++++----- .../FeaturesConfig/FeaturesConfigModal.tsx | 35 +++++++++++-------- .../components/FeaturesConfig/index.tsx | 9 +++-- web/src/views/ApplicationConfig/index.tsx | 9 +++-- .../views/ApplicationManagement/MySharing.tsx | 9 +++-- .../components/UploadFileListModal.tsx | 3 +- web/src/views/Conversation/index.tsx | 24 +++++++------ .../Workflow/components/CanvasToolbar.tsx | 4 --- .../views/Workflow/hooks/useWorkflowGraph.ts | 21 ++++++++--- web/src/views/Workflow/index.tsx | 20 ++++------- 15 files changed, 111 insertions(+), 78 deletions(-) diff --git a/web/src/components/Chat/ChatToolbar.tsx b/web/src/components/Chat/ChatToolbar.tsx index 6a316bd5..883ac98a 100644 --- a/web/src/components/Chat/ChatToolbar.tsx +++ b/web/src/components/Chat/ChatToolbar.tsx @@ -2,7 +2,7 @@ * @Author: ZhaoYing * @Date: 2026-03-17 14:22:25 * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-03-17 18:39:49 + * @Last Modified time: 2026-03-18 15:55:13 */ // Toolbar component for chat input area, supporting file upload, audio recording, and variable configuration import { useRef, forwardRef, useImperativeHandle, type ReactNode, useEffect } from 'react' @@ -120,7 +120,10 @@ const ChatToolbar = forwardRef(({ // Build dropdown menu items based on allowed transfer methods const fileMenus: MenuProps['items'] = [] - if (file_upload?.allowed_transfer_methods?.includes('remote_url')) { + const enabledTypes = ['image', 'document', 'video', 'audio'].filter( + type => file_upload?.[`${type}_enabled` as keyof FeaturesConfigForm['file_upload']] + ) + if (file_upload?.allowed_transfer_methods?.includes('remote_url') && enabledTypes.length > 0) { fileMenus.push({ key: 'url', label: t('memoryConversation.addRemoteFile'), @@ -133,9 +136,6 @@ const ChatToolbar = forwardRef(({ } }) } - const enabledTypes = ['image', 'document', 'video', 'audio'].filter( - type => file_upload?.[`${type}_enabled` as keyof FeaturesConfigForm['file_upload']] - ) if (file_upload?.allowed_transfer_methods?.includes('local_file') && enabledTypes.length > 0) { fileMenus.push({ key: 'upload', @@ -155,7 +155,7 @@ const ChatToolbar = forwardRef(({
-