diff --git a/ui/src/assets/iconfont.js b/ui/src/assets/iconfont.js index 314f6cb2149..c29f09bbfb4 100644 --- a/ui/src/assets/iconfont.js +++ b/ui/src/assets/iconfont.js @@ -1 +1 @@ -window._iconfont_svg_string_5200172='',(h=>{var a=(l=(l=document.getElementsByTagName("script"))[l.length-1]).getAttribute("data-injectcss"),l=l.getAttribute("data-disable-injectsvg");if(!l){var o,v,t,i,c,d=function(a,l){l.parentNode.insertBefore(a,l)};if(a&&!h.__iconfont__svg__cssinject__){h.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(a){console&&console.log(a)}}o=function(){var a,l=document.createElement("div");l.innerHTML=h._iconfont_svg_string_5200172,(l=l.getElementsByTagName("svg")[0])&&(l.setAttribute("aria-hidden","true"),l.style.position="absolute",l.style.width=0,l.style.height=0,l.style.overflow="hidden",l=l,(a=document.body).firstChild?d(l,a.firstChild):a.appendChild(l))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(o,0):(v=function(){document.removeEventListener("DOMContentLoaded",v,!1),o()},document.addEventListener("DOMContentLoaded",v,!1)):document.attachEvent&&(t=o,i=h.document,c=!1,m(),i.onreadystatechange=function(){"complete"==i.readyState&&(i.onreadystatechange=null,e())})}function e(){c||(c=!0,t())}function m(){try{i.documentElement.doScroll("left")}catch(a){return void setTimeout(m,50)}e()}})(window); \ No newline at end of file +window._iconfont_svg_string_5200172='',(h=>{var a=(l=(l=document.getElementsByTagName("script"))[l.length-1]).getAttribute("data-injectcss"),l=l.getAttribute("data-disable-injectsvg");if(!l){var o,v,t,i,c,d=function(a,l){l.parentNode.insertBefore(a,l)};if(a&&!h.__iconfont__svg__cssinject__){h.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(a){console&&console.log(a)}}o=function(){var a,l=document.createElement("div");l.innerHTML=h._iconfont_svg_string_5200172,(l=l.getElementsByTagName("svg")[0])&&(l.setAttribute("aria-hidden","true"),l.style.position="absolute",l.style.width=0,l.style.height=0,l.style.overflow="hidden",l=l,(a=document.body).firstChild?d(l,a.firstChild):a.appendChild(l))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(o,0):(v=function(){document.removeEventListener("DOMContentLoaded",v,!1),o()},document.addEventListener("DOMContentLoaded",v,!1)):document.attachEvent&&(t=o,i=h.document,c=!1,m(),i.onreadystatechange=function(){"complete"==i.readyState&&(i.onreadystatechange=null,e())})}function e(){c||(c=!0,t())}function m(){try{i.documentElement.doScroll("left")}catch(a){return void setTimeout(m,50)}e()}})(window); \ No newline at end of file diff --git a/ui/src/assets/workflow/icon_document-split.svg b/ui/src/assets/workflow/icon_document-split.svg new file mode 100644 index 00000000000..86fa913e1d4 --- /dev/null +++ b/ui/src/assets/workflow/icon_document-split.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/ui/src/assets/workflow/icon_knowledge-base.svg b/ui/src/assets/workflow/icon_knowledge-base.svg new file mode 100644 index 00000000000..a7ea575c872 --- /dev/null +++ b/ui/src/assets/workflow/icon_knowledge-base.svg @@ -0,0 +1,3 @@ + + + diff --git a/ui/src/router/ROUTE_README.md b/ui/src/router/ROUTE_README.md index f184f5ad214..bbc645f4a0f 100644 --- a/ui/src/router/ROUTE_README.md +++ b/ui/src/router/ROUTE_README.md @@ -244,7 +244,7 @@ System 共享资源页面: component: () => import('@/views/system/SystemView.vue'), meta: { title: '系统设置', - icon: 'icon_setting_outlined', + icon: 'icon_setting', order: 60, }, } diff --git a/ui/src/router/admin/system/index.ts b/ui/src/router/admin/system/index.ts index e7cfebb5f9d..6bdb04cfd79 100644 --- a/ui/src/router/admin/system/index.ts +++ b/ui/src/router/admin/system/index.ts @@ -68,7 +68,7 @@ export const systemRoutes: RouteRecordRaw = { path: 'resource', name: 'system-resource', redirect: { name: 'system-resource-applications' }, - meta: { title: '资源管理', icon: 'icon-setting', order: 20, resourceScope: 'system-resource' }, + meta: { title: '资源管理', icon: 'icon_setting', order: 20, resourceScope: 'system-resource' }, children: [ { path: 'applications', name: 'system-resource-applications', component: () => import('@/views/system/SystemView.vue'), meta: { title: '智能体', order: 10 } }, { path: 'knowledge', name: 'system-resource-knowledge', component: () => import('@/views/system/SystemView.vue'), meta: { title: '知识库', order: 20 } }, @@ -82,7 +82,7 @@ export const systemRoutes: RouteRecordRaw = { path: 'share', name: 'system-share', redirect: { name: 'system-shared-knowledge' }, - meta: { title: '共享资源', icon: 'icon-setting', order: 30, resourceScope: 'system-shared' }, + meta: { title: '共享资源', icon: 'icon_setting', order: 30, resourceScope: 'system-shared' }, children: [ { path: 'knowledge', name: 'system-shared-knowledge', component: () => import('@/views/system/SystemView.vue'), meta: { title: '知识库', order: 10 } }, { path: 'models', name: 'system-shared-models', component: () => import('@/views/system/shared-resources/SharedModelview.vue'), meta: { title: '模型', order: 20 } }, @@ -110,7 +110,7 @@ export const systemRoutes: RouteRecordRaw = { path: 'settings', name: 'system-settings', redirect: { name: 'system-login-authentication' }, - meta: { title: '系统设置', icon: 'icon-setting', order: 50 }, + meta: { title: '系统设置', icon: 'icon_setting', order: 50 }, children: [ { path: 'authentication', diff --git a/ui/src/router/admin/workspace/modules/application.ts b/ui/src/router/admin/workspace/modules/application.ts index 047a9032d8b..b504d595825 100644 --- a/ui/src/router/admin/workspace/modules/application.ts +++ b/ui/src/router/admin/workspace/modules/application.ts @@ -29,7 +29,7 @@ export const applicationRoutes: RouteRecordRaw[] = [ path: 'setting', name: 'workspace-application-simple-setting', component: () => import('@/views/application-detail/setting/SimpleSettingView.vue'), - meta: { title: '设置', icon: 'icon-setting', activeIcon: 'icon_setting_filled', order: 20 }, + meta: { title: '设置', icon: 'icon_setting', activeIcon: 'icon_setting_filled', order: 20 }, }, ], }, diff --git a/ui/src/styles/element-plus.scss b/ui/src/styles/element-plus.scss index 7bcb94d7235..8c3bf3daa57 100644 --- a/ui/src/styles/element-plus.scss +++ b/ui/src/styles/element-plus.scss @@ -1088,7 +1088,7 @@ max-width: 115px; padding: 0 6px; font-weight: 400 !important; - line-height: 21px; + line-height: 18px; &__content { overflow: hidden; text-overflow: ellipsis; diff --git a/ui/src/views/application/application-card/action-dropdown/SettingApplicationAction.vue b/ui/src/views/application/application-card/action-dropdown/SettingApplicationAction.vue index d5c449c0905..20cd4b5b6d8 100644 --- a/ui/src/views/application/application-card/action-dropdown/SettingApplicationAction.vue +++ b/ui/src/views/application/application-card/action-dropdown/SettingApplicationAction.vue @@ -38,7 +38,7 @@ function handleSettingApplication(event: MouseEvent) { diff --git a/ui/src/views/tool/tool-card/action-dropdown/ToolWorkflowAction.vue b/ui/src/views/tool/tool-card/action-dropdown/ToolWorkflowAction.vue index f2b2e073967..23efa87954d 100644 --- a/ui/src/views/tool/tool-card/action-dropdown/ToolWorkflowAction.vue +++ b/ui/src/views/tool/tool-card/action-dropdown/ToolWorkflowAction.vue @@ -27,7 +27,7 @@ function handleOpenWorkflow(event: MouseEvent) { diff --git a/ui/src/workflow-canvas/WORKFLOW_README.md b/ui/src/workflow-canvas/WORKFLOW_README.md index 6e1e127c1f6..8907f8a509e 100644 --- a/ui/src/workflow-canvas/WORKFLOW_README.md +++ b/ui/src/workflow-canvas/WORKFLOW_README.md @@ -154,6 +154,13 @@ AI 对话、意图识别、问题优化、参数提取、图片理解、视频 组件通过 `submit(data, index?)` 提交,节点写回后 调用 `close()`。新增与编辑参数继续按来源重置参数值,保留旧节点在流程末尾时的返回内容兼容逻辑。 +工作流工具节点在入口维护输入参数与返回内容,参数定义通过工作流 Store 强制刷新工具详情, +按 `field` 保留已配置来源和值,同步输入、输出标题及最新输出名称;节点卸载后忽略旧响应。 +输入参数保留引用与自定义两种来源,切换到引用时重置为空路径,自定义按数据类型初始化, +数组与字典复用 `JsonInput`。节点只在表单项声明必填规则,统一调用 `formRef.validate()`, +由输入组件触发表单项校验,不维护组件 Ref Map 或重复调用组件暴露的校验方法;来源下拉维护锚点保护。 +旧节点缺少返回内容开关时继续沿用无后继节点即开启的兼容规则。 + 变量拆分节点的 `VariableFieldTable` 通过 `v-model` 接收 `VariableField[]`,只负责列表增删改、 重名检查和编辑弹窗,不接收节点模型或读写 `node_data`。节点入口在列表写回时同步输出字段并 清理下游失效引用;字段类型由该组件目录的 `types.ts` 统一定义。 @@ -175,6 +182,12 @@ AI 对话、意图识别、问题优化、参数提取、图片理解、视频 节点入口深拷贝写回列表并发送原有字段刷新事件,保留显隐条件引用校验。用户输入与接口传参继续 交叉检查参数重名;`UserInputSettingDialog` 独立维护直接展示参数设置,删除字段时由表格清理对应设置。 +工具基本信息节点的输入、输出参数表格通过 `v-model` 编辑类型化字段列表,通过 `v-model:config` +编辑标题配置。字段弹窗通过 `submit(data, index?)` 提交,表格完成重名检查与写回后关闭弹窗; +标题弹窗通过 `submit(config)` 提交。节点入口统一深拷贝写回 `properties` 顶层的原有字段与标题协议, +增删、编辑及排序后刷新工具开始节点的全局变量并清空下游字段缓存。工具开始节点保留 +`global` 输入与 `output` 输出分组、旧字段的 `name` 回退和全局变量引用复制。 + 基本信息节点的 `component/LongTermSetting.vue` 同时封装长期记忆设置按钮与弹窗, 通过 `v-model` 接收 `LongTermSetting`,模型与供应商选项由节点入口传入。节点入口根据长期记忆 开关挂载组件;打开时深拷贝配置为草稿,校验通过并保存后仅合并长期记忆配置,取消不修改节点。 @@ -259,6 +272,14 @@ Break 和 Continue 节点在各自入口维护 `condition`、`condition_list` 为真、不为真时隐藏比较值并跳过其必填校验,不改写已保存的比较值。节点级校验统一调用外层表单, 比较符和逻辑下拉保持 `teleported="false"`,通过 `createAnchorGuard()` 保护锚点。 +文档分段节点使用 `WorkflowNodeModel` / `WorkflowNodeView` 注册,在入口维护智能、高级和问答对 +三种策略。保留 `referencing` 来源协议、子分块长度默认 256、分段长度默认 4096,以及高级策略和 +问答对策略下的字段显隐。文档与当前可见的配置引用仅在表单项声明数组必填规则, +由 `NodeCascader` 触发表单项校验,节点统一调用 `formRef.validate()`,不维护引用组件校验 Ref; +切换来源或策略保留字段值并清理校验和浮层保护。`constant.ts` 保存与后端 +`DocumentSerializers.SplitPattern` 一致的固定标识选项,不依赖旧知识库路由或旧版动态 API, +仍支持按选择顺序递归分割和添加自定义标识。 + ### 节点列表排序 `MkFormList` 和 `MkTable` 均为全局自动注册组件,节点模板直接使用,无需手动导入; @@ -356,7 +377,7 @@ MkFormList 的排序、增删均以 `cloneDeep` 回写;MkTable 保留普通行 - 已实现并注册:基本信息、开始、AI 对话、意图识别、问题优化、语音转文本、文本转语音、图片生成、 图片理解、文生视频、图生视频、视频理解、知识库检索、判断器、指定回复、智能体、自定义工具和 - 工具库工具、工具工作流、MCP、文档内容提取、多路召回和文档标签检索,以及参数提取、表单收集、 + 工具库工具、工具工作流、MCP、文档内容提取、文档分段、多路召回和文档标签检索,以及参数提取、表单收集、 变量赋值、变量聚合、变量拆分、循环、循环体、循环开始、Break、Continue、工具基本信息和工具开始节点。 - 知识库检索节点在入口维护检索范围、参数摘要和问题表单,参数设置按钮与弹窗统一封装在 `component/SearchSetting.vue`,通过 `v-model` 接收检索参数,仅在校验通过并保存后深拷贝回写; diff --git a/ui/src/workflow-canvas/component/ThinkingSetting.vue b/ui/src/workflow-canvas/component/ThinkingSetting.vue index 3bca6a8bb4a..4db8e9b31fe 100644 --- a/ui/src/workflow-canvas/component/ThinkingSetting.vue +++ b/ui/src/workflow-canvas/component/ThinkingSetting.vue @@ -43,7 +43,7 @@ function resetData() {