From 7611db19f3dd2b21f52e251099b363d020a4faef Mon Sep 17 00:00:00 2001 From: zhaoying Date: Fri, 6 Mar 2026 12:06:32 +0800 Subject: [PATCH 01/10] fix(web): app upload jump add delay --- .../components/UploadWorkflowModal.tsx | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/web/src/views/ApplicationManagement/components/UploadWorkflowModal.tsx b/web/src/views/ApplicationManagement/components/UploadWorkflowModal.tsx index 503ea55a..56ff51eb 100644 --- a/web/src/views/ApplicationManagement/components/UploadWorkflowModal.tsx +++ b/web/src/views/ApplicationManagement/components/UploadWorkflowModal.tsx @@ -2,7 +2,7 @@ * @Author: ZhaoYing * @Date: 2026-02-28 14:08:14 * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-03-02 17:39:49 + * @Last Modified time: 2026-03-06 12:05:46 */ /** * UploadWorkflowModal Component @@ -186,14 +186,16 @@ const UploadWorkflowModal = forwardRef { - switch(type) { - case 'detail': - // Open application detail page in new tab - window.open(`/#/application/config/${appId}`, '_blank'); - break; - } - refresh(); handleClose(); + refresh(); + setTimeout(() => { + switch (type) { + case 'detail': + // Open application detail page in new tab + window.open(`/#/application/config/${appId}`, '_blank'); + break; + } + }, 100) }; /** @@ -350,7 +352,7 @@ const UploadWorkflowModal = forwardRef handleJump('list')}> + , + {!item.model_id && } diff --git a/web/src/views/ModelManagement/types.ts b/web/src/views/ModelManagement/types.ts index 3233353b..d68e5521 100644 --- a/web/src/views/ModelManagement/types.ts +++ b/web/src/views/ModelManagement/types.ts @@ -2,7 +2,7 @@ * @Author: ZhaoYing * @Date: 2026-02-03 16:50:18 * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-03-04 11:39:20 + * @Last Modified time: 2026-03-06 12:26:11 */ /** * Type definitions for Model Management @@ -121,6 +121,7 @@ export interface ModelApiKey { * Model list item data structure */ export interface ModelListItem { + model_id?: string; /** Model name */ model_name?: string; /** Associated model config IDs */ From 0b2651f4edde3cadfe21c8a2505d63968e6b779d Mon Sep 17 00:00:00 2001 From: zhaoying Date: Fri, 6 Mar 2026 13:36:50 +0800 Subject: [PATCH 04/10] fix(web): chat file delete bugfix --- web/src/components/Chat/ChatInput.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/src/components/Chat/ChatInput.tsx b/web/src/components/Chat/ChatInput.tsx index 0e34561a..8c8dce1a 100644 --- a/web/src/components/Chat/ChatInput.tsx +++ b/web/src/components/Chat/ChatInput.tsx @@ -2,7 +2,7 @@ * @Author: ZhaoYing * @Date: 2025-12-10 16:46:14 * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-03-06 12:21:19 + * @Last Modified time: 2026-03-06 13:36:20 */ import { type FC, useEffect, useMemo } from 'react' import { Flex, Input, Form } from 'antd' @@ -50,7 +50,7 @@ const ChatInput: FC = ({ const handleDelete = (file: any) => { - fileChange?.(fileList?.filter(item => item.uid !== file.uid) || []) + fileChange?.(fileList?.filter(item => file.url ? item.url !== file.url : item.uid !== file.uid) || []) } // Convert file object to preview URL const previewFileList = useMemo(() => { From fed0ae8e9c3562400f94334bd8b3af9b50de749c Mon Sep 17 00:00:00 2001 From: zhaoying Date: Fri, 6 Mar 2026 13:54:33 +0800 Subject: [PATCH 05/10] feat(web): change memory extraction pruning_scene control --- web/src/i18n/en.ts | 2 +- web/src/i18n/zh.ts | 2 +- .../views/MemoryExtractionEngine/constant.ts | 9 ++----- .../views/MemoryExtractionEngine/index.tsx | 27 ++++++++++++++----- web/src/views/MemoryManagement/index.tsx | 6 ++--- 5 files changed, 28 insertions(+), 18 deletions(-) diff --git a/web/src/i18n/en.ts b/web/src/i18n/en.ts index cd4b97e9..9c76ba98 100644 --- a/web/src/i18n/en.ts +++ b/web/src/i18n/en.ts @@ -1572,7 +1572,7 @@ export const en = { intelligentSemanticPruningFunction: 'Intelligent Semantic Pruning Function', intelligentSemanticPruningFunctionDesc: 'Whether to activate intelligent semantic pruning (true/false).', intelligentSemanticPruningScene: 'Intelligent Semantic Pruning Scene', - intelligentSemanticPruningSceneDesc: 'Select intelligent semantic pruning scene (education, online_service, outbound).', + intelligentSemanticPruningSceneDesc: 'Semantic pruning scenarios are consistent with ontology engineering scenarios', intelligentSemanticPruningThreshold: 'Intelligent Semantic Pruning Threshold', intelligentSemanticPruningThresholdDesc: 'Set intelligent semantic pruning threshold (0-0.9).', reflectionEngine: 'Self-Reflexion Engine', diff --git a/web/src/i18n/zh.ts b/web/src/i18n/zh.ts index f3b2a906..12896307 100644 --- a/web/src/i18n/zh.ts +++ b/web/src/i18n/zh.ts @@ -1571,7 +1571,7 @@ export const zh = { intelligentSemanticPruningFunction: '智能语义修剪功能', intelligentSemanticPruningFunctionDesc: '是否激活智能语义修剪(true/false)。', intelligentSemanticPruningScene: '智能语义修剪场景', - intelligentSemanticPruningSceneDesc: '选择智能语义修剪场景(education、online_service、outbound)。', + intelligentSemanticPruningSceneDesc: '语义剪枝场景与本体工程场景一致', intelligentSemanticPruningThreshold: '智能语义修剪阈值', intelligentSemanticPruningThresholdDesc: '设置智能语义修剪阈值(0-0.9)。', reflectionEngine: '自我反思引擎', diff --git a/web/src/views/MemoryExtractionEngine/constant.ts b/web/src/views/MemoryExtractionEngine/constant.ts index 8c2ceb80..68f9e8c6 100644 --- a/web/src/views/MemoryExtractionEngine/constant.ts +++ b/web/src/views/MemoryExtractionEngine/constant.ts @@ -2,7 +2,7 @@ * @Author: ZhaoYing * @Date: 2026-02-03 17:30:06 * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-02-04 10:09:45 + * @Last Modified time: 2026-03-06 13:49:00 */ /** * Memory Extraction Engine Configuration Constants @@ -140,13 +140,8 @@ export const configList: ConfigVo[] = [ { label: 'intelligentSemanticPruningScene', variableName: 'pruning_scene', - control: 'select', + control: 'text', type: 'enum', - options: [ - { label: 'education', value: 'education' }, - { label: 'online_service', value: 'online_service' }, - { label: 'outbound', value: 'outbound' }, - ], meaning: 'intelligentSemanticPruningSceneDesc', }, // Intelligent semantic pruning阈值 diff --git a/web/src/views/MemoryExtractionEngine/index.tsx b/web/src/views/MemoryExtractionEngine/index.tsx index c36a16f6..e5c8f477 100644 --- a/web/src/views/MemoryExtractionEngine/index.tsx +++ b/web/src/views/MemoryExtractionEngine/index.tsx @@ -1,8 +1,8 @@ /* * @Author: ZhaoYing * @Date: 2026-02-03 17:30:02 - * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-02-03 17:30:02 + * @Last Modified by: ZhaoYing + * @Last Modified time: 2026-03-06 13:50:05 */ /** * Memory Extraction Engine Configuration Page @@ -13,7 +13,7 @@ import { type FC, useState, useEffect } from 'react' import { useTranslation } from 'react-i18next' import { useParams } from 'react-router-dom' -import { Row, Col, Space, Select, InputNumber, Slider, App, Form } from 'antd' +import { Row, Col, Space, Select, InputNumber, Slider, App, Form, Input } from 'antd' import clsx from 'clsx' import Card from './components/Card' @@ -35,15 +35,15 @@ const keys = [ /** * Configuration description component */ -const ConfigDesc: FC<{ config: Variable, className?: string }> = ({config, className}) => { +const ConfigDesc: FC<{ config: Variable, className?: string; onlyMeaning?: boolean; }> = ({ config, className, onlyMeaning = false}) => { const { t } = useTranslation(); return (
- + {!onlyMeaning && {config.variableName && {t('memoryExtractionEngine.variableName')}: {config.variableName}} {config.control && {t('memoryExtractionEngine.control')}: {t(`memoryExtractionEngine.${config.control}`)}} {config.type && {t('memoryExtractionEngine.type')}: {config.type}} - + } {config.meaning &&
{t('memoryExtractionEngine.Meaning')}: {t(`memoryExtractionEngine.${config.meaning}`)}
}
) @@ -253,6 +253,21 @@ const MemoryExtractionEngine: FC = () => { } + {config.control === 'text' && + <> +
+ -{t(`memoryExtractionEngine.${config.label}`)} +
+
+ + + + +
+ + } ))} diff --git a/web/src/views/MemoryManagement/index.tsx b/web/src/views/MemoryManagement/index.tsx index 6ebb49c7..fdc272e5 100644 --- a/web/src/views/MemoryManagement/index.tsx +++ b/web/src/views/MemoryManagement/index.tsx @@ -2,7 +2,7 @@ * @Author: ZhaoYing * @Date: 2026-02-03 17:33:15 * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-03-05 16:28:58 + * @Last Modified time: 2026-03-06 13:53:53 */ /** * Memory Management Page @@ -154,10 +154,10 @@ const MemoryManagement: React.FC = () => { className="rb:w-5 rb:h-5 rb:cursor-pointer rb:bg-cover rb:bg-[url('@/assets/images/edit.svg')] rb:hover:bg-[url('@/assets/images/edit_hover.svg')]" onClick={() => handleEdit(item)} > -
handleDelete(item)} - >
+ >} From af6fde414f85a4b5452243e80dd20652f2fd4d0a Mon Sep 17 00:00:00 2001 From: Timebomb2018 <18868801967@163.com> Date: Fri, 6 Mar 2026 14:40:07 +0800 Subject: [PATCH 06/10] fix(agent and model): 1. From the model square to the model list, the added models are initially set to be inactive. When manually activating them, a mandatory API key configuration is required. 2. Copying of applications (agent, workflow, multi_agent) --- api/app/controllers/model_controller.py | 5 +++ api/app/schemas/model_schema.py | 1 + api/app/services/app_service.py | 46 ++++++++++++++++++++++++- api/app/services/model_service.py | 1 + 4 files changed, 52 insertions(+), 1 deletion(-) diff --git a/api/app/controllers/model_controller.py b/api/app/controllers/model_controller.py index 0de3d4fe..6204a745 100644 --- a/api/app/controllers/model_controller.py +++ b/api/app/controllers/model_controller.py @@ -371,6 +371,11 @@ def update_model( if model_data.type is not None or model_data.provider is not None: raise BusinessException("不允许更改模型类型和供应商", BizCode.INVALID_PARAMETER) + + if model_data.is_active: + active_keys = ModelApiKeyService.get_api_keys_by_model(db=db, model_config_id=model_id, is_active=model_data.is_active) + if not active_keys: + raise BusinessException("请先为该模型配置可用的 API Key", BizCode.INVALID_PARAMETER) try: api_logger.debug(f"开始更新模型配置: model_id={model_id}") diff --git a/api/app/schemas/model_schema.py b/api/app/schemas/model_schema.py index ea4183a5..4f3878ce 100644 --- a/api/app/schemas/model_schema.py +++ b/api/app/schemas/model_schema.py @@ -23,6 +23,7 @@ class ModelConfigBase(BaseModel): load_balance_strategy: Optional[str] = Field(LoadBalanceStrategy.NONE.value, description="负载均衡策略") capability: List[str] = Field(default_factory=list, description="模型能力列表") is_omni: bool = Field(False, description="是否为Omni模型") + model_id: Optional[uuid.UUID] = Field(None, description="基础模型ID") class ApiKeyCreateNested(BaseModel): diff --git a/api/app/services/app_service.py b/api/app/services/app_service.py index a248f869..5a799937 100644 --- a/api/app/services/app_service.py +++ b/api/app/services/app_service.py @@ -703,7 +703,7 @@ class AppService: self.db.flush() # 如果是 agent 类型,复制 AgentConfig - if source_app.type == "agent": + if source_app.type == AppType.AGENT: source_config = self.db.query(AgentConfig).filter( AgentConfig.app_id == source_app.id ).first() @@ -725,6 +725,50 @@ class AppService: ) self.db.add(new_config) + elif source_app.type == AppType.WORKFLOW: + source_config = self.db.query(WorkflowConfig).filter( + WorkflowConfig.app_id == source_app.id + ).first() + + if source_config: + new_config = WorkflowConfig( + id=uuid.uuid4(), + app_id=new_app.id, + nodes=source_config.nodes.copy() if source_config.nodes else [], + edges=source_config.edges.copy() if source_config.edges else [], + variables=source_config.variables.copy() if source_config.variables else [], + execution_config=source_config.execution_config.copy() if source_config.execution_config else {}, + triggers=source_config.triggers.copy() if source_config.triggers else [], + is_active=True, + created_at=now, + updated_at=now, + ) + self.db.add(new_config) + + elif source_app.type == AppType.MULTI_AGENT: + source_config = self.db.query(MultiAgentConfig).filter( + MultiAgentConfig.app_id == source_app.id + ).first() + + if source_config: + new_config = MultiAgentConfig( + id=uuid.uuid4(), + app_id=new_app.id, + master_agent_id=source_config.master_agent_id, + master_agent_name=source_config.master_agent_name, + default_model_config_id=source_config.default_model_config_id, + model_parameters=source_config.model_parameters, + orchestration_mode=source_config.orchestration_mode, + sub_agents=source_config.sub_agents.copy() if source_config.sub_agents else [], + routing_rules=source_config.routing_rules.copy() if source_config.routing_rules else None, + execution_config=source_config.execution_config.copy() if source_config.execution_config else {}, + aggregation_strategy=source_config.aggregation_strategy, + is_active=True, + created_at=now, + updated_at=now, + ) + self.db.add(new_config) + self.db.commit() self.db.refresh(new_app) diff --git a/api/app/services/model_service.py b/api/app/services/model_service.py index cba25f32..a7398504 100644 --- a/api/app/services/model_service.py +++ b/api/app/services/model_service.py @@ -780,6 +780,7 @@ class ModelBaseService: "description": model_base.description, "capability": model_base.capability, "is_omni": model_base.is_omni, + "is_active": False, "is_composite": False } model_config = ModelConfigRepository.create(db, model_config_data) From 862bff51cbc10637f63059776d8dda82a8c0ea79 Mon Sep 17 00:00:00 2001 From: zhaoying Date: Fri, 6 Mar 2026 15:18:36 +0800 Subject: [PATCH 07/10] fix(web): i18n update --- web/src/i18n/zh.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/src/i18n/zh.ts b/web/src/i18n/zh.ts index 12896307..c4d2df71 100644 --- a/web/src/i18n/zh.ts +++ b/web/src/i18n/zh.ts @@ -96,7 +96,7 @@ export const zh = { createMemorySummary: '创建记忆摘要', memoryManagement: '记忆管理', spaceManagement: '空间管理', - memoryExtractionEngine: '记忆提取引擎', + memoryExtractionEngine: '记忆萃取引擎', forgettingEngine: '遗忘引擎', apiKeyManagement: 'API KEY管理', knowledgePrivate: '详情', @@ -1283,7 +1283,7 @@ export const zh = { createConfiguration: '创建配置', editConfiguration: '编辑配置', desc: '描述', - memoryExtractionEngine: '记忆提取引擎', + memoryExtractionEngine: '记忆萃取引擎', forgottenEngine: '遗忘引擎', active: '活跃', inactive: '不活跃', From 076ceee29d00eaece90e7720bce4b8d27e8bbe3a Mon Sep 17 00:00:00 2001 From: yujiangping Date: Fri, 6 Mar 2026 15:30:30 +0800 Subject: [PATCH 08/10] fix(web): filter vision models for image2text and cleanup tool management - Add vision capability filter for image2text model options in CreateModal - Filter model options to only include models with 'vision' capability when type is 'image2text' - Remove outdated file header comments from ToolManagement component - Comment out 'market' tab from tabKeys array in ToolManagement - Ensure image2text tool only displays compatible vision-capable models --- web/src/views/KnowledgeBase/components/CreateModal.tsx | 10 +++++++++- web/src/views/ToolManagement/index.tsx | 10 +--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/web/src/views/KnowledgeBase/components/CreateModal.tsx b/web/src/views/KnowledgeBase/components/CreateModal.tsx index d9727d18..35eb52d0 100644 --- a/web/src/views/KnowledgeBase/components/CreateModal.tsx +++ b/web/src/views/KnowledgeBase/components/CreateModal.tsx @@ -672,9 +672,17 @@ const CreateModal = forwardRef(({ {currentType !== 'Folder' && dynamicTypeList.map((tp) => { const fieldKey = typeToFieldKey(tp); // When tp is 'llm', merge llm and chat options - const options = tp.toLowerCase() === 'llm' || tp.toLowerCase() === 'image2text' + let options = tp.toLowerCase() === 'llm' || tp.toLowerCase() === 'image2text' ? [...(modelOptionsByType['llm'] || []), ...(modelOptionsByType['chat'] || [])] : modelOptionsByType[tp] || []; + + // When tp is 'image2text', filter to only include models with 'vision' capability + if (tp.toLowerCase() === 'image2text') { + options = options.filter((opt: any) => { + const model = models?.items?.find((m: any) => m.id === opt.value); + return model?.capability?.includes('vision'); + }); + } return ( { const { t } = useTranslation(); const [activeTab, setActiveTab] = useState('mcp'); From 827ab27bef5e04d56ae92e8da5b26ad39e5dc2fa Mon Sep 17 00:00:00 2001 From: zhaoying Date: Fri, 6 Mar 2026 16:12:55 +0800 Subject: [PATCH 09/10] fix(web): workflow upload bugfix --- .../components/UploadWorkflowModal.tsx | 14 ++++++++++---- web/src/views/Ontology/pages/Detail.tsx | 2 +- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/web/src/views/ApplicationManagement/components/UploadWorkflowModal.tsx b/web/src/views/ApplicationManagement/components/UploadWorkflowModal.tsx index 56ff51eb..87c90061 100644 --- a/web/src/views/ApplicationManagement/components/UploadWorkflowModal.tsx +++ b/web/src/views/ApplicationManagement/components/UploadWorkflowModal.tsx @@ -101,6 +101,7 @@ const UploadWorkflowModal = forwardRef { @@ -114,21 +115,24 @@ const UploadWorkflowModal = forwardRef setLoading(false)); break; case 1: // Step 2: Error/warning display if (firstFormData) { const { file, platform } = firstFormData; + const fileNameSplit = firstFormData.file[0].name.split('.') // Pre-fill form with file information form.setFieldsValue({ - name: file[0].name.split('.')[0], + name: fileNameSplit.slice(0, fileNameSplit.length - 1).join('.'), platform: platform, fileName: file[0].name, fileSize: file[0].size, @@ -175,7 +179,9 @@ const UploadWorkflowModal = forwardRef { {t('common.default')} } subTitle={
{data.scene_description}
} - extra={data.is_system_default ? undefined : ( + extra={!data.is_system_default ? undefined : ( )} From 8c3af7f4fffa9d16c17c3cd5dc98c3f314baf803 Mon Sep 17 00:00:00 2001 From: Ke Sun Date: Fri, 6 Mar 2026 16:35:24 +0800 Subject: [PATCH 10/10] fix(config): update default Redis DB numbers for Celery isolation - Change REDIS_DB_CELERY_BROKER default from 1 to 3 - Change REDIS_DB_CELERY_BACKEND default from 2 to 4 - Add documentation comments explaining DB isolation strategy - Prevent task interference when multiple developers share same Redis instance --- api/app/core/config.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/api/app/core/config.py b/api/app/core/config.py index ba17da93..bbe327b6 100644 --- a/api/app/core/config.py +++ b/api/app/core/config.py @@ -192,8 +192,10 @@ class Settings: # Celery configuration (internal) # NOTE: 变量名不以 CELERY_ 开头,避免被 Celery CLI 的前缀匹配机制劫持 # 详见 docs/celery-env-bug-report.md - REDIS_DB_CELERY_BROKER: int = int(os.getenv("REDIS_DB_CELERY_BROKER", "1")) - REDIS_DB_CELERY_BACKEND: int = int(os.getenv("REDIS_DB_CELERY_BACKEND", "2")) + # 默认使用 Redis DB 3 (broker) 和 DB 4 (backend),与业务缓存 (DB 1/2) 隔离 + # 多人共用同一 Redis 时,每位开发者应在 .env 中配置不同的 DB 编号避免任务互相干扰 + REDIS_DB_CELERY_BROKER: int = int(os.getenv("REDIS_DB_CELERY_BROKER", "3")) + REDIS_DB_CELERY_BACKEND: int = int(os.getenv("REDIS_DB_CELERY_BACKEND", "4")) # SMTP Email Configuration SMTP_SERVER: str = os.getenv("SMTP_SERVER", "smtp.gmail.com")