From 2c318f6e60caa70028be308d64c02c77767a39bb Mon Sep 17 00:00:00 2001 From: zhaoying Date: Wed, 18 Mar 2026 19:39:12 +0800 Subject: [PATCH] fix(web): app features bugfix --- web/src/views/ApplicationConfig/Cluster.tsx | 12 ++++++------ .../FeaturesConfig/FileUploadSettingModal.tsx | 4 ++-- web/src/views/Workflow/components/Chat/Chat.tsx | 7 +++++-- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/web/src/views/ApplicationConfig/Cluster.tsx b/web/src/views/ApplicationConfig/Cluster.tsx index 97ae939a..94023f0b 100644 --- a/web/src/views/ApplicationConfig/Cluster.tsx +++ b/web/src/views/ApplicationConfig/Cluster.tsx @@ -2,7 +2,7 @@ * @Author: ZhaoYing * @Date: 2026-02-03 16:29:33 * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-03-17 14:48:57 + * @Last Modified time: 2026-03-18 19:37:15 */ import { useEffect, useState, useRef, forwardRef, useImperativeHandle } from 'react' import { useTranslation } from 'react-i18next' @@ -30,7 +30,7 @@ import RadioGroupCard from '@/components/RadioGroupCard' import { getModelListUrl } from '@/api/models' import ModelConfigModal from './components/ModelConfigModal' import type { Application } from '@/views/ApplicationManagement/types' -import FeaturesConfig from './components/FeaturesConfig' +// import FeaturesConfig from './components/FeaturesConfig' const tagColors = ['processing', 'warning', 'default'] const MAX_LENGTH = 5; @@ -187,15 +187,15 @@ const Cluster = forwardRef { - form.setFieldValue('features', value) - } + // const handleSaveFeaturesConfig = (value: FeaturesConfigForm) => { + // form.setFieldValue('features', value) + // } return ( - + {/* */} diff --git a/web/src/views/ApplicationConfig/components/FeaturesConfig/FileUploadSettingModal.tsx b/web/src/views/ApplicationConfig/components/FeaturesConfig/FileUploadSettingModal.tsx index 3579497a..1d4e2a12 100644 --- a/web/src/views/ApplicationConfig/components/FeaturesConfig/FileUploadSettingModal.tsx +++ b/web/src/views/ApplicationConfig/components/FeaturesConfig/FileUploadSettingModal.tsx @@ -2,7 +2,7 @@ * @Author: ZhaoYing * @Date: 2026-03-05 * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-03-17 18:10:47 + * @Last Modified time: 2026-03-18 19:35:57 */ import { forwardRef, useImperativeHandle, useState } from 'react'; import { Form, InputNumber, Flex, Switch, Row, Col, Radio } from 'antd'; @@ -80,7 +80,7 @@ const FileUploadSettingModal = forwardRef { setVisible(true); if (values) { - const methods = values.allowed_transfer_methods + const methods = values.allowed_transfer_methods || ['local_file', 'remote_url'] const transferMethod = Array.isArray(methods) ? methods.length === 2 ? 'both' : methods[0] : methods diff --git a/web/src/views/Workflow/components/Chat/Chat.tsx b/web/src/views/Workflow/components/Chat/Chat.tsx index 37cb215e..1e3a1b4a 100644 --- a/web/src/views/Workflow/components/Chat/Chat.tsx +++ b/web/src/views/Workflow/components/Chat/Chat.tsx @@ -2,7 +2,7 @@ * @Author: ZhaoYing * @Date: 2026-02-06 21:10:56 * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-03-18 14:34:20 + * @Last Modified time: 2026-03-18 19:31:28 */ /** * Workflow Chat Component @@ -63,9 +63,12 @@ const Chat = forwardRef { setOpen(true) - if (data?.features) setFeatures(data.features) } + useEffect(() => { + if (data?.features && open) setFeatures(data.features) + }, [open, data?.features]) + useEffect(() => { if (open && graphRef.current && toolbarRef.current) { getVariables()