From bd24de45775572f2ceade1a8db2e20250d0add7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B9=90=E5=8A=9B=E9=BD=90?= <162269739+lanceyq@users.noreply.github.com> Date: Tue, 10 Feb 2026 16:17:05 +0800 Subject: [PATCH 01/17] Fix/bug en zh (#389) * [fix]The log retains genuine alerts and errors, while filtering out unnecessary noise. * [fix]Scenario English and Chinese, emotion specifications * [fix]Change the "no data" scenario from 0.0 to None * [fix]The emotional health indicators, emotional advice, and emotional distribution analysis are all linked together. * [fix]The emotional health indicators, emotional advice, and emotional distribution analysis are all linked together. * [fix]Separate expected errors from unexpected errors * [changes]Translation of emotion labels, and the list of hosts arranged in the order of creation * [changes]Translation of emotion labels, and the list of hosts arranged in the order of creation --- api/app/services/emotion_analytics_service.py | 6 +++--- api/app/services/memory_dashboard_service.py | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/api/app/services/emotion_analytics_service.py b/api/app/services/emotion_analytics_service.py index d78dc20c..89e3cab9 100644 --- a/api/app/services/emotion_analytics_service.py +++ b/api/app/services/emotion_analytics_service.py @@ -124,17 +124,17 @@ class EmotionAnalyticsService: # 将查询结果转换为字典,方便查找 tags_dict = {tag["emotion_type"]: tag for tag in tags} - # 补全缺失的情绪维度,并翻译 emotion_type + # 补全缺失的情绪维度,直接使用英文枚举key(前端自行翻译) complete_tags = [] for emotion in all_emotion_types: if emotion in tags_dict: tag = tags_dict[emotion].copy() - tag["emotion_type"] = self._translate_emotion_type(emotion, language) + tag["emotion_type"] = emotion complete_tags.append(tag) else: # 如果该情绪类型不存在,添加默认值 complete_tags.append({ - "emotion_type": self._translate_emotion_type(emotion, language), + "emotion_type": emotion, "count": 0, "percentage": 0.0, "avg_intensity": 0.0 diff --git a/api/app/services/memory_dashboard_service.py b/api/app/services/memory_dashboard_service.py index 6fa8b228..8d6071cc 100644 --- a/api/app/services/memory_dashboard_service.py +++ b/api/app/services/memory_dashboard_service.py @@ -55,7 +55,7 @@ def get_workspace_end_users( ) -> List[EndUser]: """获取工作空间的所有宿主(优化版本:减少数据库查询次数) - 返回结果按 updated_at 从新到旧排序(NULL 值排在最后) + 返回结果按 created_at 从新到旧排序(NULL 值排在最后) """ business_logger.info(f"获取工作空间宿主列表: workspace_id={workspace_id}, 操作者: {current_user.username}") @@ -71,13 +71,13 @@ def get_workspace_end_users( app_ids = [app.id for app in apps_orm] # 批量查询所有 end_users(一次查询而非循环查询) - # 按 updated_at 降序排序,NULL 值排在最后;id 作为次级排序键保证确定性 + # 按 created_at 降序排序,NULL 值排在最后;id 作为次级排序键保证确定性 from app.models.end_user_model import EndUser as EndUserModel from sqlalchemy import desc, nullslast end_users_orm = db.query(EndUserModel).filter( EndUserModel.app_id.in_(app_ids) ).order_by( - nullslast(desc(EndUserModel.updated_at)), + nullslast(desc(EndUserModel.created_at)), desc(EndUserModel.id) ).all() From f966176694e9e89148c4bbe1ba50d7d39cd7972c Mon Sep 17 00:00:00 2001 From: yujiangping Date: Tue, 10 Feb 2026 16:32:35 +0800 Subject: [PATCH 02/17] feat(web): improve knowledge base form validation and parser config handling - Refactor form validation logic to support tab-specific field validation in edit mode - Add conditional validation for knowledge graph fields when editing existing knowledge base - Preserve all existing parser_config fields when merging graphrag configuration - Skip third-party authentication check when editing on knowledge graph tab - Update form value retrieval to include disabled fields using getFieldsValue(true) - Improve comments to clarify parser_config field preservation and validation behavior - This change enables users to edit knowledge graph settings without re-validating all basic configuration fields --- .../KnowledgeBase/components/CreateModal.tsx | 34 +++++++++++++++---- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/web/src/views/KnowledgeBase/components/CreateModal.tsx b/web/src/views/KnowledgeBase/components/CreateModal.tsx index 71fe1b94..76640058 100644 --- a/web/src/views/KnowledgeBase/components/CreateModal.tsx +++ b/web/src/views/KnowledgeBase/components/CreateModal.tsx @@ -221,9 +221,9 @@ const CreateModal = forwardRef(({ status: record.status, }; - // Process parser_config data, set default values if not present + // Process parser_config data, preserve all existing fields and merge graphrag config baseValues.parser_config = { - ...record.parser_config, + ...record.parser_config, // Preserve all existing parser_config fields (yuque_user_id, yuque_token, feishu_app_id, etc.) graphrag: { use_graphrag: false, scene_name: '', @@ -362,12 +362,32 @@ const CreateModal = forwardRef(({ // Actual save logic const performSave = async () => { try { - await form.validateFields(); - setLoading(true); - const formValues = form.getFieldsValue(); + // Get fields to validate based on current tab and edit mode + let fieldsToValidate: any[] | undefined = undefined; - // Check Third-party authentication before saving - if (formValues.type === 'Third-party' || currentType === 'Third-party') { + // If in edit mode and on knowledge graph tab, only validate knowledge graph fields + if (datasets?.id && activeTab === 'knowledgeGraph') { + fieldsToValidate = [ + ['parser_config', 'graphrag', 'use_graphrag'], + ['parser_config', 'graphrag', 'scene_name'], + ['parser_config', 'graphrag', 'entity_types'], + ['parser_config', 'graphrag', 'method'], + ['parser_config', 'graphrag', 'resolution'], + ['parser_config', 'graphrag', 'community'], + ]; + } + + // Validate only specified fields or all fields + await form.validateFields(fieldsToValidate); + setLoading(true); + // Get all field values including disabled fields + const formValues = form.getFieldsValue(true); + + // Only check Third-party authentication when creating new or explicitly on basic config tab + // Skip authentication check when editing and on knowledge graph tab + const shouldCheckAuth = !datasets?.id || activeTab === 'basic'; + + if (shouldCheckAuth && (formValues.type === 'Third-party' || currentType === 'Third-party')) { const platform = formValues.parser_config?._third_party_platform || thirdPartyPlatform; try { From 7044f705e764dd1d84bf5438b843eecb007ba2e0 Mon Sep 17 00:00:00 2001 From: yujiangping Date: Tue, 10 Feb 2026 16:51:41 +0800 Subject: [PATCH 03/17] fix(web): improve infinite scroll handling in knowledge base list - Add auto-load detection when initial data doesn't fill viewport to prevent empty scrollbar - Implement scroll height check to automatically load more data if content is insufficient - Fix hasMore condition to prevent premature loader hiding - Update loader visibility to only show when data exists and is actively loading - Refine end message display to show only when all data is loaded and no more items available - Resolves issue where knowledge base list shows no scrollbar on initial load with limited items --- web/src/views/KnowledgeBase/index.tsx | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/web/src/views/KnowledgeBase/index.tsx b/web/src/views/KnowledgeBase/index.tsx index cef520ab..1ad6997b 100644 --- a/web/src/views/KnowledgeBase/index.tsx +++ b/web/src/views/KnowledgeBase/index.tsx @@ -334,6 +334,18 @@ const KnowledgeBaseManagement: FC = () => { setHasMore(hasNext); buildModelMenus(list, isLoadMore); + + // 首次加载后,检查是否需要自动加载更多(解决无滚动条问题) + if (!isLoadMore && hasNext) { + setTimeout(() => { + const scrollDiv = document.getElementById('scrollableDiv'); + if (scrollDiv && scrollDiv.scrollHeight <= scrollDiv.clientHeight) { + console.log('No scrollbar detected, auto-loading more data'); + setPage(2); + fetchData(2, true); + } + }, 100); + } } catch (error) { console.error('Failed to fetch knowledge base list:', error); if (!isLoadMore) { @@ -532,10 +544,10 @@ const KnowledgeBaseManagement: FC = () => { {t('common.loading')}} + hasMore={hasMore} + loader={loading && data.length > 0 ?
{t('common.loading')}
: null} endMessage={ - data.length > 0 ? ( + data.length > 0 && !hasMore ? (
{t('common.noMoreData')}
From bacffc94d91312fbd681c1576f49855471e4ef73 Mon Sep 17 00:00:00 2001 From: zhaoying Date: Tue, 10 Feb 2026 17:42:40 +0800 Subject: [PATCH 04/17] fix(web): FileUpload bugfix --- .../ApplicationConfig/components/Chat.tsx | 48 +++++++++---------- .../Conversation/components/FileUpload.tsx | 14 +----- web/src/views/Conversation/index.tsx | 6 +-- .../views/Workflow/components/Chat/Chat.tsx | 6 +-- 4 files changed, 26 insertions(+), 48 deletions(-) diff --git a/web/src/views/ApplicationConfig/components/Chat.tsx b/web/src/views/ApplicationConfig/components/Chat.tsx index effb34c3..794489c6 100644 --- a/web/src/views/ApplicationConfig/components/Chat.tsx +++ b/web/src/views/ApplicationConfig/components/Chat.tsx @@ -2,7 +2,7 @@ * @Author: ZhaoYing * @Date: 2026-02-03 16:27:39 * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-02-10 12:18:23 + * @Last Modified time: 2026-02-10 17:40:15 */ /** * Chat debugging component for application testing @@ -366,10 +366,8 @@ const Chat: FC = ({ chatList, data, updateChatList, handleSave, sourc const handleMessageChange = (message: string) => { setMessage(message) } - const [update, setUpdate] = useState(false) const fileChange = (file?: any) => { setFileList([...fileList, file]) - setUpdate(prev => !prev) } // const handleRecordingComplete = async (file: any) => { // console.log('file', file) @@ -456,29 +454,27 @@ const Chat: FC = ({ chatList, data, updateChatList, handleSave, sourc onChange={handleMessageChange} > - - - ) - }, - ], - onClick: handleShowUpload - }} - > -
-
+ + + ) + }, + ], + onClick: handleShowUpload + }} + > +
+
{/* diff --git a/web/src/views/Conversation/components/FileUpload.tsx b/web/src/views/Conversation/components/FileUpload.tsx index b7d65f80..1e8d33aa 100644 --- a/web/src/views/Conversation/components/FileUpload.tsx +++ b/web/src/views/Conversation/components/FileUpload.tsx @@ -2,7 +2,7 @@ * @Author: ZhaoYing * @Date: 2026-02-06 21:09:42 * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-02-09 16:41:31 + * @Last Modified time: 2026-02-10 17:40:08 */ /** * File Upload Component @@ -55,8 +55,6 @@ interface UploadFilesProps extends Omit { maxCount?: number; /** Custom file removal callback */ onRemove?: (file: UploadFile) => boolean | void | Promise; - /** Trigger to reset file list */ - update?: boolean; } // Mapping of file extensions to MIME types const ALL_FILE_TYPE: { @@ -109,7 +107,6 @@ const UploadFiles = forwardRef(({ isAutoUpload = true, maxCount = 1, onRemove: customOnRemove, - update, requestConfig, ...props }, ref) => { @@ -118,11 +115,6 @@ const UploadFiles = forwardRef(({ const [fileList, setFileList] = useState(propFileList); const [accept, setAccept] = useState(); - // Reset file list when update prop changes - useEffect(() => { - setFileList([]) - }, [update]) - /** * Validates file type and size before upload * @returns Upload.LIST_IGNORE to prevent upload, or true to proceed @@ -185,9 +177,7 @@ const UploadFiles = forwardRef(({ /** * Handles upload state changes */ - const handleChange: UploadProps['onChange'] = ({ fileList: newFileList, event }) => { - console.log('event', event) - setFileList(newFileList); + const handleChange: UploadProps['onChange'] = ({ fileList: newFileList }) => { if (onChange) { onChange(maxCount === 1 ? newFileList[0] : newFileList); } diff --git a/web/src/views/Conversation/index.tsx b/web/src/views/Conversation/index.tsx index fcc32bf8..825ea834 100644 --- a/web/src/views/Conversation/index.tsx +++ b/web/src/views/Conversation/index.tsx @@ -2,7 +2,7 @@ * @Author: ZhaoYing * @Date: 2026-02-03 16:58:03 * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-02-09 20:20:01 + * @Last Modified time: 2026-02-10 17:41:05 */ /** * Conversation Page @@ -254,10 +254,8 @@ const Conversation: FC = () => { }) } - const [update, setUpdate] = useState(false) const fileChange = (file?: any) => { form.setFieldValue('files', [...(queryValues.files || []), file]) - setUpdate(prev => !prev) } // const handleRecordingComplete = async (file: any) => { // console.log('file', file) @@ -353,8 +351,6 @@ const Conversation: FC = () => { action={shareFileUploadUrlWithoutApiPrefix} fileType={['jpg', 'jpeg', 'png', 'gif', 'bmp', 'webp', 'svg']} onChange={fileChange} - fileList={[]} - update={update} requestConfig={{ headers: { 'Content-Type': 'multipart/form-data', diff --git a/web/src/views/Workflow/components/Chat/Chat.tsx b/web/src/views/Workflow/components/Chat/Chat.tsx index 95f43a9c..00a0c7fb 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-02-10 12:17:41 + * @Last Modified time: 2026-02-10 17:41:24 */ /** * Workflow Chat Component @@ -343,13 +343,11 @@ const Chat = forwardRef(({ appId const handleMessageChange = (message: string) => { setMessage(message) } - const [update, setUpdate] = useState(false) /** * Handles file upload from local device */ const fileChange = (file?: any) => { setFileList([...fileList, file]) - setUpdate(prev => !prev) } // const handleRecordingComplete = async (file: any) => { // console.log('file', file) @@ -517,8 +515,6 @@ const Chat = forwardRef(({ appId ) }, From 9ae26129459be9912d1a70142e34d66790113eb4 Mon Sep 17 00:00:00 2001 From: zhaoying Date: Tue, 10 Feb 2026 18:00:56 +0800 Subject: [PATCH 05/17] fix(web): change skill search key --- .../components/Skill/SkillListModal.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/web/src/views/ApplicationConfig/components/Skill/SkillListModal.tsx b/web/src/views/ApplicationConfig/components/Skill/SkillListModal.tsx index 8220878e..0a56b82f 100644 --- a/web/src/views/ApplicationConfig/components/Skill/SkillListModal.tsx +++ b/web/src/views/ApplicationConfig/components/Skill/SkillListModal.tsx @@ -1,8 +1,8 @@ /* * @Author: ZhaoYing * @Date: 2026-02-05 10:45:08 - * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-02-05 10:45:08 + * @Last Modified by: ZhaoYing + * @Last Modified time: 2026-02-10 17:59:37 */ import { forwardRef, useEffect, useImperativeHandle, useState } from 'react'; import { Space, List, Flex, Tooltip } from 'antd'; @@ -31,7 +31,7 @@ interface SkillModalProps { * * A modal dialog for selecting skills from a searchable list. * Features: - * - Search functionality to filter skills by keywords + * - Search functionality to filter skills by search * - Grid layout displaying skill cards with icons and descriptions * - Multi-select capability with visual feedback * - Excludes already selected skills from the list @@ -49,7 +49,7 @@ const SkillListModal = forwardRef(({ const [visible, setVisible] = useState(false); const [list, setList] = useState([]) const [filterList, setFilterList] = useState([]) - const [query, setQuery] = useState<{keywords?: string}>({}) + const [query, setQuery] = useState<{search?: string}>({}) const [selectedIds, setSelectedIds] = useState([]) const [selectedRows, setSelectedRows] = useState([]) @@ -82,7 +82,7 @@ const SkillListModal = forwardRef(({ if (visible) { getList() } - }, [query.keywords, visible]) + }, [query.search, visible]) /** * Fetches the skill list from API with current search parameters @@ -123,7 +123,7 @@ const SkillListModal = forwardRef(({ * @param value - Search keyword */ const handleSearch = (value?: string) => { - setQuery({keywords: value}) + setQuery({search: value}) setSelectedIds([]) setSelectedRows([]) } From 2103410694e70c214d8e77583ae44da572c6f551 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B9=90=E5=8A=9B=E9=BD=90?= <162269739+lanceyq@users.noreply.github.com> Date: Tue, 10 Feb 2026 18:02:25 +0800 Subject: [PATCH 06/17] Fix/bug en zh (#391) * [fix]The log retains genuine alerts and errors, while filtering out unnecessary noise. * [fix]Scenario English and Chinese, emotion specifications * [fix]Change the "no data" scenario from 0.0 to None * [fix]The emotional health indicators, emotional advice, and emotional distribution analysis are all linked together. * [fix]The emotional health indicators, emotional advice, and emotional distribution analysis are all linked together. * [fix]Separate expected errors from unexpected errors * [changes]Translation of emotion labels, and the list of hosts arranged in the order of creation * [changes]Translation of emotion labels, and the list of hosts arranged in the order of creation * [fix]The mainframe engineering supports Chinese verification. * [fix]The mainframe engineering supports Chinese verification. --- .../core/memory/models/ontology_scenario_models.py | 13 ++++++++----- .../memory/utils/validation/ontology_validator.py | 12 +++++++----- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/api/app/core/memory/models/ontology_scenario_models.py b/api/app/core/memory/models/ontology_scenario_models.py index 24a61f5f..b51d8bb2 100644 --- a/api/app/core/memory/models/ontology_scenario_models.py +++ b/api/app/core/memory/models/ontology_scenario_models.py @@ -74,7 +74,7 @@ class OntologyClass(BaseModel): """Validate that the class name follows PascalCase convention. PascalCase rules: - - Must start with an uppercase letter + - Must start with an uppercase letter (for English) or any character (for Chinese/Unicode) - Cannot contain spaces - Should not contain special characters except underscores @@ -90,7 +90,10 @@ class OntologyClass(BaseModel): if not v: raise ValueError("Class name cannot be empty") - if not v[0].isupper(): + # For Chinese/Unicode characters, skip the uppercase check + # Only check uppercase for ASCII letters + first_char = v[0] + if first_char.isascii() and first_char.isalpha() and not first_char.isupper(): raise ValueError( f"Class name '{v}' must start with an uppercase letter (PascalCase)" ) @@ -100,11 +103,11 @@ class OntologyClass(BaseModel): f"Class name '{v}' cannot contain spaces (PascalCase)" ) - # Check for invalid characters (allow alphanumeric and underscore only) - if not all(c.isalnum() or c == '_' for c in v): + # Check for invalid characters (allow alphanumeric, underscore, and Unicode characters) + if not all(c.isalnum() or c == '_' or ord(c) > 127 for c in v): raise ValueError( f"Class name '{v}' contains invalid characters. " - "Only alphanumeric characters and underscores are allowed" + "Only alphanumeric characters, underscores, and Unicode characters are allowed" ) return v diff --git a/api/app/core/memory/utils/validation/ontology_validator.py b/api/app/core/memory/utils/validation/ontology_validator.py index 1e1ee506..cb3bcec8 100644 --- a/api/app/core/memory/utils/validation/ontology_validator.py +++ b/api/app/core/memory/utils/validation/ontology_validator.py @@ -88,8 +88,10 @@ class OntologyValidator: logger.warning(f"Validation failed: {error_msg}") return False, error_msg - # Check if starts with uppercase letter - if not name[0].isupper(): + # Check if starts with uppercase letter (only for ASCII letters) + # For Chinese/Unicode characters, skip this check + first_char = name[0] + if first_char.isascii() and first_char.isalpha() and not first_char.isupper(): error_msg = f"Class name '{name}' must start with an uppercase letter (PascalCase)" logger.warning(f"Validation failed: {error_msg}") return False, error_msg @@ -100,9 +102,9 @@ class OntologyValidator: logger.warning(f"Validation failed: {error_msg}") return False, error_msg - # Check for invalid characters (only alphanumeric and underscore allowed) - if not re.match(r'^[A-Za-z0-9_]+$', name): - error_msg = f"Class name '{name}' contains invalid characters. Only alphanumeric characters and underscores are allowed" + # Check for invalid characters (allow alphanumeric, underscore, and Unicode characters) + if not re.match(r'^[A-Za-z0-9_\u4e00-\u9fff]+$', name): + error_msg = f"Class name '{name}' contains invalid characters. Only alphanumeric characters, underscores, and Chinese characters are allowed" logger.warning(f"Validation failed: {error_msg}") return False, error_msg From 41334f5f1e155c24267c9879f256e7faea6d1a66 Mon Sep 17 00:00:00 2001 From: zhaoying Date: Tue, 10 Feb 2026 18:47:11 +0800 Subject: [PATCH 07/17] fix(web): update en --- web/src/i18n/en.ts | 1 + web/src/views/ApplicationConfig/Agent.tsx | 10 ++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/web/src/i18n/en.ts b/web/src/i18n/en.ts index 8d99872d..d44b0461 100644 --- a/web/src/i18n/en.ts +++ b/web/src/i18n/en.ts @@ -1286,6 +1286,7 @@ export const en = { priority: 'Structured Integration', addTool: 'Add Tool', tool: 'Tool', + variableConfig: 'Variable Configuration', statistics: 'Data Statistics', daily_conversations: 'Daily Conversations', diff --git a/web/src/views/ApplicationConfig/Agent.tsx b/web/src/views/ApplicationConfig/Agent.tsx index a0587798..4c3b73ba 100644 --- a/web/src/views/ApplicationConfig/Agent.tsx +++ b/web/src/views/ApplicationConfig/Agent.tsx @@ -2,7 +2,7 @@ * @Author: ZhaoYing * @Date: 2026-02-03 16:29:21 * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-02-09 16:56:27 + * @Last Modified time: 2026-02-10 18:46:40 */ import { type FC, type ReactNode, useEffect, useRef, useState, forwardRef, useImperativeHandle } from 'react'; import clsx from 'clsx' @@ -480,9 +480,11 @@ const Agent = forwardRef((_props, ref) => { {t('application.debuggingAndPreview')} - + {chatVariables.length > 0 && + + } From 32b40fc6bf67ca72c9b64ee39f554b2b2bbe7bf5 Mon Sep 17 00:00:00 2001 From: zhaoying Date: Wed, 11 Feb 2026 11:34:20 +0800 Subject: [PATCH 08/17] fix(web): file upload bugfix --- web/src/views/Conversation/components/FileUpload.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/web/src/views/Conversation/components/FileUpload.tsx b/web/src/views/Conversation/components/FileUpload.tsx index 1e8d33aa..70ee9cf2 100644 --- a/web/src/views/Conversation/components/FileUpload.tsx +++ b/web/src/views/Conversation/components/FileUpload.tsx @@ -2,7 +2,7 @@ * @Author: ZhaoYing * @Date: 2026-02-06 21:09:42 * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-02-10 17:40:08 + * @Last Modified time: 2026-02-11 11:32:48 */ /** * File Upload Component @@ -167,7 +167,7 @@ const UploadFiles = forwardRef(({ formData.append('file', file); const response = await request.uploadFile(action, formData, requestConfig); - + onSuccess?.({data: response}); } catch (error) { onError?.(error as Error); @@ -178,8 +178,9 @@ const UploadFiles = forwardRef(({ * Handles upload state changes */ const handleChange: UploadProps['onChange'] = ({ fileList: newFileList }) => { + setFileList(newFileList); if (onChange) { - onChange(maxCount === 1 ? newFileList[0] : newFileList); + onChange(maxCount === 1 ? newFileList[newFileList.length - 1] : newFileList); } }; From 1795364f5f0a3f712ca23d2ef2c28c997e6e22e9 Mon Sep 17 00:00:00 2001 From: zhaoying Date: Wed, 11 Feb 2026 12:08:35 +0800 Subject: [PATCH 09/17] fix(web): memory-write node hide message config --- web/src/views/Workflow/components/Properties/index.tsx | 3 ++- web/src/views/Workflow/constant.ts | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/web/src/views/Workflow/components/Properties/index.tsx b/web/src/views/Workflow/components/Properties/index.tsx index 9e6e418b..e96b1757 100644 --- a/web/src/views/Workflow/components/Properties/index.tsx +++ b/web/src/views/Workflow/components/Properties/index.tsx @@ -2,7 +2,7 @@ * @Author: ZhaoYing * @Date: 2026-02-03 15:39:59 * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-02-09 19:56:42 + * @Last Modified time: 2026-02-11 12:07:06 */ import { type FC, useEffect, useState, useMemo } from "react"; import clsx from 'clsx' @@ -627,6 +627,7 @@ const Properties: FC = ({ } layout={config.type === 'switch' ? 'horizontal' : 'vertical'} className={key === 'parallel_count' ? 'rb:-mt-3! rb:leading-3.5!' : ''} + hidden={Boolean(config.hidden)} > {config.type === 'input' ? diff --git a/web/src/views/Workflow/constant.ts b/web/src/views/Workflow/constant.ts index d897ba2c..b3e5f33b 100644 --- a/web/src/views/Workflow/constant.ts +++ b/web/src/views/Workflow/constant.ts @@ -2,7 +2,7 @@ * @Author: ZhaoYing * @Date: 2026-02-03 15:06:18 * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-02-09 20:08:03 + * @Last Modified time: 2026-02-11 12:07:20 */ import LoopNode from './components/Nodes/LoopNode'; import NormalNode from './components/Nodes/NormalNode'; @@ -240,7 +240,8 @@ export const nodeLibrary: NodeLibrary[] = [ config: { message: { type: 'editor', - isArray: false + isArray: false, + hidden: true, }, messages: { type: 'messageEditor', From fa4da8f4679c76a75c751278b36d610c00578cbe Mon Sep 17 00:00:00 2001 From: zhaoying Date: Fri, 27 Feb 2026 10:23:19 +0800 Subject: [PATCH 10/17] fix(web): change model list provider logo --- web/src/views/ModelManagement/List.tsx | 8 ++++---- web/src/views/ModelManagement/utils.ts | 25 +++++++++++++++++++++++-- 2 files changed, 27 insertions(+), 6 deletions(-) diff --git a/web/src/views/ModelManagement/List.tsx b/web/src/views/ModelManagement/List.tsx index ffa89fb4..ce4d61aa 100644 --- a/web/src/views/ModelManagement/List.tsx +++ b/web/src/views/ModelManagement/List.tsx @@ -1,8 +1,8 @@ /* * @Author: ZhaoYing * @Date: 2026-02-03 16:50:10 - * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-02-03 16:50:10 + * @Last Modified by: ZhaoYing + * @Last Modified time: 2026-02-27 10:20:51 */ /** * Model List View @@ -21,7 +21,7 @@ import PageEmpty from '@/components/Empty/PageEmpty'; import Tag from '@/components/Tag'; import KeyConfigModal from './components/KeyConfigModal' import ModelListDetail from './components/ModelListDetail' -import { getLogoUrl } from './utils' +import { getListLogoUrl } from './utils' /** * Model list component @@ -70,7 +70,7 @@ const ModelList = forwardRef {item.provider[0].toUpperCase()} diff --git a/web/src/views/ModelManagement/utils.ts b/web/src/views/ModelManagement/utils.ts index fe36e137..bf44367f 100644 --- a/web/src/views/ModelManagement/utils.ts +++ b/web/src/views/ModelManagement/utils.ts @@ -1,8 +1,8 @@ /* * @Author: ZhaoYing * @Date: 2026-02-03 16:50:22 - * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-02-03 16:50:22 + * @Last Modified by: ZhaoYing + * @Last Modified time: 2026-02-27 10:22:46 */ /** * Utility functions for Model Management @@ -40,5 +40,26 @@ export const getLogoUrl = (logo?: string) => { return logo } + return ICONS[logo as keyof typeof ICONS] || undefined +} + +/** + * Get logo URL from provider name or URL + * @param provider - Provider name + * @param logo - Provider name or logo URL + * @returns Logo URL or undefined + */ +export const getListLogoUrl = (provider?: string, logo?: string) => { + let url = ICONS[provider as keyof typeof ICONS] + + if (url) return url + + if (!logo) { + return undefined + } + if (logo.startsWith('http')) { + return logo + } + return ICONS[logo as keyof typeof ICONS] || undefined } \ No newline at end of file From d4971893520db2b1a3711f4e20616729194265db Mon Sep 17 00:00:00 2001 From: Timebomb2018 <18868801967@163.com> Date: Fri, 27 Feb 2026 10:24:03 +0800 Subject: [PATCH 11/17] docs(version): Version 0.2.5 Release Notes --- api/app/version_info.json | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/api/app/version_info.json b/api/app/version_info.json index aea03dcd..a4ff5d55 100644 --- a/api/app/version_info.json +++ b/api/app/version_info.json @@ -1,4 +1,34 @@ { + "v0.2.5": { + "introduction": { + "codeName": "行云", + "releaseDate": "2026-2-26", + "upgradePosition": "🐻 精炼根基,优化核心用户体验与系统稳定性", + "coreUpgrades": [ + "1. 用户体验与国际化 🎨
* SSO 语言参数修复:解决 SSO 认证后添加 `?language=zh` 参数仍显示英文的问题,语言偏好现正确保留
* 邮箱修改支持:用户可直接在用户管理系统中修改邮箱地址", + "2. 工作流可视化增强 💬
* 循环与迭代节点输出展示:实时显示执行进度和中间输出,便于调试复杂迭代过程
* 变量支持回车选择:支持回车键确认变量选择,简化工作流配置流程", + "3. 多租户模型管理 ⚙️
* 租户隔离的模型密钥:模型广场排除自定义模型,模型列表按租户隔离密钥,防止跨租户密钥泄露", + "4. 稳健性与缺陷修复 🔧
* 知识图谱构建修复:解决知识图谱构建流程稳定性问题,确保更可靠的实体提取和关系映射", + "
", + "版本 0.2.5 通过解决国际化边界情况、增强多租户隔离和改进工作流透明度,构建更具生产就绪性的平台。工作流可视化改进为更复杂的调试和监控能力奠定基础。未来将继续深化企业就绪性,扩展用户管理功能、优化知识图谱智能和增强工作流编排能力,在可观测性、性能优化和无缝集成模式方面持续改进。", + "智慧致远 🐻✨" + ] + }, + "introduction_en": { + "codeName": "Flowing Clouds", + "releaseDate": "2026-2-26", + "upgradePosition": "🐻 Refined foundations with enhanced user experience and system stability", + "coreUpgrades": [ + "1. User Experience & Internationalization 🎨
* SSO Language Parameter Fix: Resolved issue where `?language=zh` parameter still showed English UI after SSO authentication
* Email Update Support: Users can now modify email addresses directly in user management system", + "2. Workflow Visualization Enhancements 💬
* Loop & Iteration Node Output Display: Real-time display of execution progress and intermediate outputs for easier debugging
* Variable Selection with Enter Key: Enabled Enter key confirmation for streamlined variable assignment", + "3. Multi-Tenant Model Management ⚙️
* Tenant-Scoped Model Keys: Model marketplace excludes custom models, model list properly isolates keys per tenant to prevent cross-tenant exposure", + "4. Robustness & Bug Fixes 🔧
* Knowledge Graph Construction Fix: Addressed stability issues in knowledge graph pipeline for more reliable entity extraction and relationship mapping", + "
", + "Version 0.2.5 matures MemoryBear's operational foundations by addressing internationalization edge cases, enhancing multi-tenant isolation, and improving workflow transparency. The workflow visualization improvements lay groundwork for sophisticated debugging and monitoring capabilities. Looking forward, we will deepen enterprise readiness by expanding user management features, refining knowledge graph intelligence, and enhancing workflow orchestration with continued improvements in observability, performance optimization, and seamless integration patterns.", + "Intelligent Resilience 🐻✨" + ] + } + }, "v0.2.4": { "introduction": { "codeName": "智远", From 6a6e64f487e1c9fde7e1668ab4016e8fb7997845 Mon Sep 17 00:00:00 2001 From: Timebomb2018 <18868801967@163.com> Date: Fri, 27 Feb 2026 11:06:17 +0800 Subject: [PATCH 12/17] docs(version): Version 0.2.5 Release Notes --- api/app/version_info.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/api/app/version_info.json b/api/app/version_info.json index a4ff5d55..772ff56e 100644 --- a/api/app/version_info.json +++ b/api/app/version_info.json @@ -5,9 +5,9 @@ "releaseDate": "2026-2-26", "upgradePosition": "🐻 精炼根基,优化核心用户体验与系统稳定性", "coreUpgrades": [ - "1. 用户体验与国际化 🎨
* SSO 语言参数修复:解决 SSO 认证后添加 `?language=zh` 参数仍显示英文的问题,语言偏好现正确保留
* 邮箱修改支持:用户可直接在用户管理系统中修改邮箱地址", + "1. 用户体验与国际化 🎨
* 语言参数修复:语言偏好现正确保留
* 邮箱修改支持:用户可直接在用户管理系统中修改邮箱地址", "2. 工作流可视化增强 💬
* 循环与迭代节点输出展示:实时显示执行进度和中间输出,便于调试复杂迭代过程
* 变量支持回车选择:支持回车键确认变量选择,简化工作流配置流程", - "3. 多租户模型管理 ⚙️
* 租户隔离的模型密钥:模型广场排除自定义模型,模型列表按租户隔离密钥,防止跨租户密钥泄露", + "3. 优化模型管理 ⚙️
* 模型广场移除自定义模型,优化模型使用体验", "4. 稳健性与缺陷修复 🔧
* 知识图谱构建修复:解决知识图谱构建流程稳定性问题,确保更可靠的实体提取和关系映射", "
", "版本 0.2.5 通过解决国际化边界情况、增强多租户隔离和改进工作流透明度,构建更具生产就绪性的平台。工作流可视化改进为更复杂的调试和监控能力奠定基础。未来将继续深化企业就绪性,扩展用户管理功能、优化知识图谱智能和增强工作流编排能力,在可观测性、性能优化和无缝集成模式方面持续改进。", @@ -19,9 +19,9 @@ "releaseDate": "2026-2-26", "upgradePosition": "🐻 Refined foundations with enhanced user experience and system stability", "coreUpgrades": [ - "1. User Experience & Internationalization 🎨
* SSO Language Parameter Fix: Resolved issue where `?language=zh` parameter still showed English UI after SSO authentication
* Email Update Support: Users can now modify email addresses directly in user management system", + "1. User Experience & Internationalization 🎨
* Language parameter fix: language preferences are now correctly retained
* Email Update Support: Users can now modify email addresses directly in user management system", "2. Workflow Visualization Enhancements 💬
* Loop & Iteration Node Output Display: Real-time display of execution progress and intermediate outputs for easier debugging
* Variable Selection with Enter Key: Enabled Enter key confirmation for streamlined variable assignment", - "3. Multi-Tenant Model Management ⚙️
* Tenant-Scoped Model Keys: Model marketplace excludes custom models, model list properly isolates keys per tenant to prevent cross-tenant exposure", + "3. Optimized Model Management ⚙️
* Custom models have been removed from the Model marketplace to optimize the model usage experience", "4. Robustness & Bug Fixes 🔧
* Knowledge Graph Construction Fix: Addressed stability issues in knowledge graph pipeline for more reliable entity extraction and relationship mapping", "
", "Version 0.2.5 matures MemoryBear's operational foundations by addressing internationalization edge cases, enhancing multi-tenant isolation, and improving workflow transparency. The workflow visualization improvements lay groundwork for sophisticated debugging and monitoring capabilities. Looking forward, we will deepen enterprise readiness by expanding user management features, refining knowledge graph intelligence, and enhancing workflow orchestration with continued improvements in observability, performance optimization, and seamless integration patterns.", From 2d731c64123254608ad8440095cd5bbbf52be1ad Mon Sep 17 00:00:00 2001 From: Timebomb2018 <18868801967@163.com> Date: Fri, 27 Feb 2026 11:16:15 +0800 Subject: [PATCH 13/17] docs(version): Version 0.2.5 Release Notes --- api/app/version_info.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/app/version_info.json b/api/app/version_info.json index 772ff56e..7d82eabc 100644 --- a/api/app/version_info.json +++ b/api/app/version_info.json @@ -10,7 +10,7 @@ "3. 优化模型管理 ⚙️
* 模型广场移除自定义模型,优化模型使用体验", "4. 稳健性与缺陷修复 🔧
* 知识图谱构建修复:解决知识图谱构建流程稳定性问题,确保更可靠的实体提取和关系映射", "
", - "版本 0.2.5 通过解决国际化边界情况、增强多租户隔离和改进工作流透明度,构建更具生产就绪性的平台。工作流可视化改进为更复杂的调试和监控能力奠定基础。未来将继续深化企业就绪性,扩展用户管理功能、优化知识图谱智能和增强工作流编排能力,在可观测性、性能优化和无缝集成模式方面持续改进。", + "版本 0.2.5 通过解决国际化边界情况和改进工作流透明度,构建更具生产就绪性的平台。工作流可视化改进为更复杂的调试和监控能力奠定基础。未来将继续深化企业就绪性,扩展用户管理功能、优化知识图谱智能和增强工作流编排能力,在可观测性、性能优化和无缝集成模式方面持续改进。", "智慧致远 🐻✨" ] }, @@ -24,7 +24,7 @@ "3. Optimized Model Management ⚙️
* Custom models have been removed from the Model marketplace to optimize the model usage experience", "4. Robustness & Bug Fixes 🔧
* Knowledge Graph Construction Fix: Addressed stability issues in knowledge graph pipeline for more reliable entity extraction and relationship mapping", "
", - "Version 0.2.5 matures MemoryBear's operational foundations by addressing internationalization edge cases, enhancing multi-tenant isolation, and improving workflow transparency. The workflow visualization improvements lay groundwork for sophisticated debugging and monitoring capabilities. Looking forward, we will deepen enterprise readiness by expanding user management features, refining knowledge graph intelligence, and enhancing workflow orchestration with continued improvements in observability, performance optimization, and seamless integration patterns.", + "Version 0.2.5 matures MemoryBear's operational foundations by addressing internationalization edge cases and improving workflow transparency. The workflow visualization improvements lay groundwork for sophisticated debugging and monitoring capabilities. Looking forward, we will deepen enterprise readiness by expanding user management features, refining knowledge graph intelligence, and enhancing workflow orchestration with continued improvements in observability, performance optimization, and seamless integration patterns.", "Intelligent Resilience 🐻✨" ] } From bbaa39c569eb3aa261ed7de6cbfbdc499ce22c3e Mon Sep 17 00:00:00 2001 From: Timebomb2018 <18868801967@163.com> Date: Fri, 27 Feb 2026 12:08:18 +0800 Subject: [PATCH 14/17] fix(user): The user changes the space and modifies the role, the role information is synchronized. --- api/app/controllers/user_controller.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/app/controllers/user_controller.py b/api/app/controllers/user_controller.py index 3c574c81..2806da1a 100644 --- a/api/app/controllers/user_controller.py +++ b/api/app/controllers/user_controller.py @@ -100,7 +100,7 @@ def get_current_user_info( result_schema.current_workspace_name = current_workspace.name for ws in result.workspaces: - if ws.workspace_id == current_user.current_workspace_id: + if ws.workspace_id == current_user.current_workspace_id and ws.is_active: result_schema.role = ws.role break From dd9be2ed90c2e00111ff7f9d4058cf9d5f5557c4 Mon Sep 17 00:00:00 2001 From: zhaoying Date: Fri, 27 Feb 2026 18:48:02 +0800 Subject: [PATCH 15/17] fix(web): AutocompletePlugin key up/down support scroll --- .../Editor/plugin/AutocompletePlugin.tsx | 34 ++++++++++++++++--- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/web/src/views/Workflow/components/Editor/plugin/AutocompletePlugin.tsx b/web/src/views/Workflow/components/Editor/plugin/AutocompletePlugin.tsx index 8e2687f1..f9fe097e 100644 --- a/web/src/views/Workflow/components/Editor/plugin/AutocompletePlugin.tsx +++ b/web/src/views/Workflow/components/Editor/plugin/AutocompletePlugin.tsx @@ -1,4 +1,4 @@ -import { useEffect, useState, type FC } from 'react'; +import { useEffect, useState, useRef, type FC } from 'react'; import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'; import { $getSelection, $isRangeSelection, $isTextNode, COMMAND_PRIORITY_HIGH, KEY_ENTER_COMMAND, KEY_ARROW_DOWN_COMMAND, KEY_ARROW_UP_COMMAND, KEY_ESCAPE_COMMAND } from 'lexical'; @@ -22,6 +22,26 @@ const AutocompletePlugin: FC<{ options: Suggestion[], enableJinja2?: boolean }> const [showSuggestions, setShowSuggestions] = useState(false); const [selectedIndex, setSelectedIndex] = useState(0); const [popupPosition, setPopupPosition] = useState({ top: 0, left: 0 }); + const popupRef = useRef(null); + + const scrollSelectedIntoView = () => { + if (!popupRef.current) return; + + const selectedElement = popupRef.current.querySelector('[data-selected="true"]'); + if (!selectedElement) return; + + const container = popupRef.current; + const element = selectedElement as HTMLElement; + + const containerRect = container.getBoundingClientRect(); + const elementRect = element.getBoundingClientRect(); + + if (elementRect.bottom > containerRect.bottom) { + container.scrollTop += elementRect.bottom - containerRect.bottom; + } else if (elementRect.top < containerRect.top) { + container.scrollTop -= containerRect.top - elementRect.top; + } + }; useEffect(() => { return editor.registerUpdateListener(({ editorState }) => { @@ -116,7 +136,7 @@ const AutocompletePlugin: FC<{ options: Suggestion[], enableJinja2?: boolean }> setShowSuggestions(false); }; - const groupedSuggestions = options.reduce((groups: Record, suggestion) => { + const groupedSuggestions = options.reduce((groups: Record, suggestion) => { const { nodeData } = suggestion const nodeId = nodeData.id as string; if (!groups[nodeId]) { @@ -163,7 +183,9 @@ const AutocompletePlugin: FC<{ options: Suggestion[], enableJinja2?: boolean }> while (nextIndex < allOptions.length && allOptions[nextIndex].disabled) { nextIndex++; } - return nextIndex >= allOptions.length ? prev : nextIndex; + const newIndex = nextIndex >= allOptions.length ? prev : nextIndex; + setTimeout(() => scrollSelectedIntoView(), 0); + return newIndex; }); return true; } @@ -182,7 +204,9 @@ const AutocompletePlugin: FC<{ options: Suggestion[], enableJinja2?: boolean }> while (prevIndex >= 0 && allOptions[prevIndex].disabled) { prevIndex--; } - return prevIndex < 0 ? prev : prevIndex; + const newIndex = prevIndex < 0 ? prev : prevIndex; + setTimeout(() => scrollSelectedIntoView(), 0); + return newIndex; }); return true; } @@ -218,6 +242,7 @@ const AutocompletePlugin: FC<{ options: Suggestion[], enableJinja2?: boolean }> } return (
e.preventDefault()} style={{ @@ -248,6 +273,7 @@ const AutocompletePlugin: FC<{ options: Suggestion[], enableJinja2?: boolean }> return (
Date: Fri, 27 Feb 2026 18:59:58 +0800 Subject: [PATCH 16/17] feat(web): create space storage type add recommend --- web/src/components/RadioGroupCard/index.tsx | 7 ++++++- web/src/i18n/en.ts | 1 + web/src/i18n/zh.ts | 1 + web/src/views/SpaceManagement/components/SpaceModal.tsx | 8 ++++++-- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/web/src/components/RadioGroupCard/index.tsx b/web/src/components/RadioGroupCard/index.tsx index 41924c61..e09466cd 100644 --- a/web/src/components/RadioGroupCard/index.tsx +++ b/web/src/components/RadioGroupCard/index.tsx @@ -20,6 +20,7 @@ import { type FC, type Key, type ReactNode, useEffect } from 'react'; import { type RadioGroupProps } from 'antd'; import clsx from 'clsx' +import { useTranslation } from 'react-i18next'; /** Radio card option interface */ interface RadioCardOption { @@ -33,6 +34,8 @@ interface RadioCardOption { icon?: string; /** Whether the option is disabled */ disabled?: boolean; + /** Whether the option is recommended */ + recommend?: boolean; /** Additional properties */ [key: string]: string | number | boolean | undefined | null | Key; } @@ -63,6 +66,7 @@ const RadioGroupCard: FC = ({ allowClear = true, block = false, }) => { + const { t } = useTranslation(); /** Listen to value changes and trigger side effects via onValueChange callback */ useEffect(() => { if (onValueChange) { @@ -91,12 +95,13 @@ const RadioGroupCard: FC = ({ })}> {/* Render each option as a selectable card */} {options.map(option => ( -
handleChange(option)}> + {option.recommend &&
{t('common.recommend')}
} {/* Use custom render or default card layout */} {itemRender ? itemRender(option) : ( <> diff --git a/web/src/i18n/en.ts b/web/src/i18n/en.ts index 8dfb68db..f2b4eaa4 100644 --- a/web/src/i18n/en.ts +++ b/web/src/i18n/en.ts @@ -452,6 +452,7 @@ export const en = { nextStep: 'Next Step', prevStep: 'Previous Step', exportSuccess: 'Export successful', + recommend: 'Recommend', }, model: { searchPlaceholder: 'search model…', diff --git a/web/src/i18n/zh.ts b/web/src/i18n/zh.ts index feefc843..e2e7082a 100644 --- a/web/src/i18n/zh.ts +++ b/web/src/i18n/zh.ts @@ -1019,6 +1019,7 @@ export const zh = { nextStep: '下一步', prevStep: '上一步', exportSuccess: '导出成功', + recommend: '推荐', }, model: { searchPlaceholder: '搜索模型…', diff --git a/web/src/views/SpaceManagement/components/SpaceModal.tsx b/web/src/views/SpaceManagement/components/SpaceModal.tsx index a0703d81..4f37b246 100644 --- a/web/src/views/SpaceManagement/components/SpaceModal.tsx +++ b/web/src/views/SpaceManagement/components/SpaceModal.tsx @@ -34,8 +34,8 @@ interface SpaceModalProps { } /** Storage types */ const types: StorageType[] = [ - 'rag', 'neo4j', + 'rag', ] /** Type icons mapping */ const typeIcons: Record = { @@ -154,6 +154,9 @@ const SpaceModal = forwardRef(({
(({ value: type, label: t(`space.${type}`), labelDesc: t(`space.${type}Desc`), - icon: typeIcons[type] + icon: typeIcons[type], + recommend: type === 'neo4j', }))} block={true} /> From f81fdca62a16e5b59cabf6283395473dfbaa8f80 Mon Sep 17 00:00:00 2001 From: zhaoying Date: Sat, 28 Feb 2026 17:28:55 +0800 Subject: [PATCH 17/17] fix(web): model logo; BasicAuthLayout fix --- web/src/components/Layout/BasicAuthLayout.tsx | 10 +++++----- web/src/store/user.ts | 8 ++++---- .../ModelManagement/components/CustomModelModal.tsx | 6 +++--- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/web/src/components/Layout/BasicAuthLayout.tsx b/web/src/components/Layout/BasicAuthLayout.tsx index a73f6c69..f279a48b 100644 --- a/web/src/components/Layout/BasicAuthLayout.tsx +++ b/web/src/components/Layout/BasicAuthLayout.tsx @@ -2,10 +2,10 @@ * @Author: ZhaoYing * @Date: 2026-02-02 15:12:42 * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-02-04 14:06:28 + * @Last Modified time: 2026-02-28 17:28:41 */ /** - * BasicLayout Component + * BasicAuthLayout Component * * A minimal layout wrapper that provides: * - User information initialization @@ -26,12 +26,12 @@ import { useUser } from '@/store/user'; * Basic layout component for pages without navigation UI. * Fetches user info and storage type on mount, then renders child routes. */ -const BasicLayout: FC = () => { +const BasicAuthLayout: FC = () => { const { getUserInfo } = useUser(); // Fetch user information and storage type on component mount useEffect(() => { - getUserInfo(); + getUserInfo(undefined, true); // Pass true to skip navigation jump }, [getUserInfo]); return ( @@ -42,4 +42,4 @@ const BasicLayout: FC = () => { ) }; -export default BasicLayout; \ No newline at end of file +export default BasicAuthLayout; \ No newline at end of file diff --git a/web/src/store/user.ts b/web/src/store/user.ts index c9231d9c..f5e0cb28 100644 --- a/web/src/store/user.ts +++ b/web/src/store/user.ts @@ -2,7 +2,7 @@ * @Author: ZhaoYing * @Date: 2026-02-02 16:33:54 * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-02-04 18:30:10 + * @Last Modified time: 2026-02-28 17:21:20 */ /** * User Store @@ -44,7 +44,7 @@ export interface UserState { /** Update login information */ updateLoginInfo: (values: LoginInfo) => void; /** Get user information */ - getUserInfo: (flag?: boolean) => void; + getUserInfo: (flag?: boolean, notNeedJump?: boolean) => void; /** Clear user information */ clearUserInfo: () => void; /** Logout user */ @@ -73,13 +73,13 @@ export const useUser = create((set, get) => ({ cookieUtils.set('refreshToken', values.refresh_token); set({ loginInfo: values }); }, - getUserInfo: async (flag?: boolean) => { + getUserInfo: async (flag?: boolean, notNeedJump?: boolean) => { if (!cookieUtils.get('authToken')) { return } const { checkJump } = get() const localUser = JSON.parse(localStorage.getItem('user') || '{}') as User; - if (localUser.id) { + if (localUser.id && !notNeedJump) { checkJump() return } diff --git a/web/src/views/ModelManagement/components/CustomModelModal.tsx b/web/src/views/ModelManagement/components/CustomModelModal.tsx index fb0db96e..17373a02 100644 --- a/web/src/views/ModelManagement/components/CustomModelModal.tsx +++ b/web/src/views/ModelManagement/components/CustomModelModal.tsx @@ -1,8 +1,8 @@ /* * @Author: ZhaoYing * @Date: 2026-02-03 16:49:28 - * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-02-03 16:49:28 + * @Last Modified by: ZhaoYing + * @Last Modified time: 2026-02-28 17:24:05 */ /** * Custom Model Modal @@ -50,7 +50,7 @@ const CustomModelModal = forwardRef( setModel(model); form.setFieldsValue({ ...model, - logo: model.logo ? { url: model.logo, uid: model.logo, status: 'done', name: 'logo' } : undefined + logo: model.logo && model.logo.startsWith('http') ? { url: model.logo, uid: model.logo, status: 'done', name: 'logo' } : undefined }); } else { setIsEdit(false);