From 003e66883c3e38c03090c5a787dc2e1f862bb4a9 Mon Sep 17 00:00:00 2001 From: Archer <545436317@qq.com> Date: Fri, 5 Dec 2025 11:37:21 +0800 Subject: [PATCH] fix: loop filter (#6033) --- document/content/docs/upgrading/4-14/4144.mdx | 2 ++ document/data/doc-last-modified.json | 4 ++-- packages/service/core/workflow/dispatch/loop/runLoop.ts | 2 +- .../core/chat/ChatContainer/PluginRunBox/context.tsx | 4 +++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/document/content/docs/upgrading/4-14/4144.mdx b/document/content/docs/upgrading/4-14/4144.mdx index 0912842aa..e4c870e43 100644 --- a/document/content/docs/upgrading/4-14/4144.mdx +++ b/document/content/docs/upgrading/4-14/4144.mdx @@ -14,6 +14,8 @@ description: 'FastGPT V4.14.4 更新说明' ## 🐛 修复 +1. 循环节点数组,取消过滤空内容。 +2. 工作流工具,未传递自定义 DataId,导致测试运行时,查看知识库提示无权限。 ## 插件 diff --git a/document/data/doc-last-modified.json b/document/data/doc-last-modified.json index 949e2e174..1bcde0095 100644 --- a/document/data/doc-last-modified.json +++ b/document/data/doc-last-modified.json @@ -26,7 +26,7 @@ "document/content/docs/introduction/development/migration/docker_db.mdx": "2025-07-23T21:35:03+08:00", "document/content/docs/introduction/development/migration/docker_mongo.mdx": "2025-07-23T21:35:03+08:00", "document/content/docs/introduction/development/modelConfig/ai-proxy.mdx": "2025-08-05T23:20:39+08:00", - "document/content/docs/introduction/development/modelConfig/intro.mdx": "2025-08-12T22:22:18+08:00", + "document/content/docs/introduction/development/modelConfig/intro.mdx": "2025-12-03T08:36:19+08:00", "document/content/docs/introduction/development/modelConfig/one-api.mdx": "2025-07-23T21:35:03+08:00", "document/content/docs/introduction/development/modelConfig/ppio.mdx": "2025-09-29T11:52:39+08:00", "document/content/docs/introduction/development/modelConfig/siliconCloud.mdx": "2025-08-05T23:20:39+08:00", @@ -118,7 +118,7 @@ "document/content/docs/upgrading/4-14/4141.mdx": "2025-11-19T10:15:27+08:00", "document/content/docs/upgrading/4-14/4142.mdx": "2025-11-18T19:27:14+08:00", "document/content/docs/upgrading/4-14/4143.mdx": "2025-11-26T20:52:05+08:00", - "document/content/docs/upgrading/4-14/4144.mdx": "2025-11-29T09:24:47+08:00", + "document/content/docs/upgrading/4-14/4144.mdx": "2025-12-01T21:46:30+08:00", "document/content/docs/upgrading/4-8/40.mdx": "2025-08-02T19:38:37+08:00", "document/content/docs/upgrading/4-8/41.mdx": "2025-08-02T19:38:37+08:00", "document/content/docs/upgrading/4-8/42.mdx": "2025-08-02T19:38:37+08:00", diff --git a/packages/service/core/workflow/dispatch/loop/runLoop.ts b/packages/service/core/workflow/dispatch/loop/runLoop.ts index 8619649de..0b019e5ca 100644 --- a/packages/service/core/workflow/dispatch/loop/runLoop.ts +++ b/packages/service/core/workflow/dispatch/loop/runLoop.ts @@ -56,7 +56,7 @@ export const dispatchLoop = async (props: Props): Promise => { let interactiveResponse: WorkflowInteractiveResponseType | undefined = undefined; let index = 0; - for await (const item of loopInputArray.filter(Boolean)) { + for await (const item of loopInputArray) { // Skip already looped if (lastIndex && index < lastIndex) { index++; diff --git a/projects/app/src/components/core/chat/ChatContainer/PluginRunBox/context.tsx b/projects/app/src/components/core/chat/ChatContainer/PluginRunBox/context.tsx index 1c815247d..666305d55 100644 --- a/projects/app/src/components/core/chat/ChatContainer/PluginRunBox/context.tsx +++ b/projects/app/src/components/core/chat/ChatContainer/PluginRunBox/context.tsx @@ -190,6 +190,7 @@ const PluginRunContextProvider = ({ abortRequest(); const abortSignal = new AbortController(); chatController.current = abortSignal; + const responseChatItemId = getNanoid(24); setChatRecords([ { @@ -201,7 +202,7 @@ const PluginRunContextProvider = ({ status: 'finish' }, { - dataId: getNanoid(24), + dataId: responseChatItemId, obj: ChatRoleEnum.AI, value: [ { @@ -231,6 +232,7 @@ const PluginRunContextProvider = ({ try { await onStartChat({ messages, + responseChatItemId, controller: chatController.current, generatingMessage, variables: {