From 01ad76787fa97178def68781cd7205eef67598cc Mon Sep 17 00:00:00 2001 From: FinleyGe Date: Mon, 13 Oct 2025 17:28:50 +0800 Subject: [PATCH] fix: chat history do not be saved --- .../service/core/workflow/dispatch/index.ts | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/packages/service/core/workflow/dispatch/index.ts b/packages/service/core/workflow/dispatch/index.ts index 73097fc6d..43f54d0c1 100644 --- a/packages/service/core/workflow/dispatch/index.ts +++ b/packages/service/core/workflow/dispatch/index.ts @@ -47,6 +47,7 @@ import { rewriteRuntimeWorkFlow, removeSystemVariable } from './utils'; import { getHandleId } from '@fastgpt/global/core/workflow/utils'; import { callbackMap } from './constants'; import { anyValueDecrypt } from '../../../common/secret/utils'; +import { result } from 'lodash'; type Props = Omit & { runtimeNodes: RuntimeNodeItemType[]; @@ -164,7 +165,7 @@ export const runWorkflow = async (data: RunWorkflowProps): Promise 0) || + (!Array.isArray(toolResponses) && typeof toolResponses === 'object' && - Object.keys(toolResponses).length === 0 - ) - return; + Object.keys(toolResponses).length > 0) + ) { this.toolRunResponse = toolResponses; } @@ -609,6 +609,8 @@ export const runWorkflow = async (data: RunWorkflowProps): Promise