From 18941beb341dd10163e09a6382baf1241bfab178 Mon Sep 17 00:00:00 2001 From: Joel Date: Fri, 4 Jul 2025 16:48:33 +0800 Subject: [PATCH] feat: converstation support bool --- .../chat-variable-panel/components/variable-modal.tsx | 10 ++++++++++ .../workflow/panel/chat-variable-panel/type.ts | 2 ++ 2 files changed, 12 insertions(+) diff --git a/web/app/components/workflow/panel/chat-variable-panel/components/variable-modal.tsx b/web/app/components/workflow/panel/chat-variable-panel/components/variable-modal.tsx index 347c83c155..f03260649e 100644 --- a/web/app/components/workflow/panel/chat-variable-panel/components/variable-modal.tsx +++ b/web/app/components/workflow/panel/chat-variable-panel/components/variable-modal.tsx @@ -17,6 +17,7 @@ import { CodeLanguage } from '@/app/components/workflow/nodes/code/types' import { ChatVarType } from '@/app/components/workflow/panel/chat-variable-panel/type' import cn from '@/utils/classnames' import { checkKeys, replaceSpaceWithUnderscreInVarNameInput } from '@/utils/var' +import BoolValue from './bool-value' export type ModalPropsType = { chatVar?: ConversationVariable @@ -33,6 +34,7 @@ type ObjectValueItem = { const typeList = [ ChatVarType.String, ChatVarType.Number, + ChatVarType.Boolean, ChatVarType.Object, ChatVarType.ArrayString, ChatVarType.ArrayNumber, @@ -157,6 +159,8 @@ const ChatVariableModal = ({ setEditInJSON(true) if (v === ChatVarType.String || v === ChatVarType.Number || v === ChatVarType.Object) setEditInJSON(false) + if(v === ChatVarType.Boolean) + setValue(true) setType(v) } @@ -345,6 +349,12 @@ const ChatVariableModal = ({ type='number' /> )} + {type === ChatVarType.Boolean && ( + + )} {type === ChatVarType.Object && !editInJSON && (