From 50a7339299e857bad63ce29b272889c41ff8c482 Mon Sep 17 00:00:00 2001 From: Yi-Cheng Wang <80525895+kirisame-wang@users.noreply.github.com> Date: Thu, 23 Jan 2025 02:22:24 +0800 Subject: [PATCH] fix: Correct logic error in tool input assignment for ChatflowTool (#3903) The previous code incorrectly assigned `toolInput` to an empty string when `customInput` was non-empty. Corrected the logic to ensure that `toolInput` is assigned `customInput` when `useQuestionFromChat` is false and `customInput` is non-empty. --- packages/components/nodes/tools/ChatflowTool/ChatflowTool.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/components/nodes/tools/ChatflowTool/ChatflowTool.ts b/packages/components/nodes/tools/ChatflowTool/ChatflowTool.ts index 06f2451af..f0f718110 100644 --- a/packages/components/nodes/tools/ChatflowTool/ChatflowTool.ts +++ b/packages/components/nodes/tools/ChatflowTool/ChatflowTool.ts @@ -164,7 +164,7 @@ class ChatflowTool_Tools implements INode { let toolInput = '' if (useQuestionFromChat) { toolInput = input - } else if (!customInput) { + } else if (customInput) { toolInput = customInput }