From 74333db4c8ca97b16fdd15f7ff1ee45aace03569 Mon Sep 17 00:00:00 2001 From: JzoNg Date: Tue, 13 Aug 2024 16:12:12 +0800 Subject: [PATCH] update input in env & conversation var --- .../components/array-value-list.tsx | 4 ++-- .../components/variable-modal.tsx | 12 ++++-------- .../workflow/panel/env-panel/variable-modal.tsx | 10 +++------- 3 files changed, 9 insertions(+), 17 deletions(-) diff --git a/web/app/components/workflow/panel/chat-variable-panel/components/array-value-list.tsx b/web/app/components/workflow/panel/chat-variable-panel/components/array-value-list.tsx index a040f2fd8e..8206f02049 100644 --- a/web/app/components/workflow/panel/chat-variable-panel/components/array-value-list.tsx +++ b/web/app/components/workflow/panel/chat-variable-panel/components/array-value-list.tsx @@ -6,6 +6,7 @@ import { RiAddLine } from '@remixicon/react' import produce from 'immer' import RemoveButton from '@/app/components/workflow/nodes/_base/components/remove-button' import Button from '@/app/components/base/button' +import Input from '@/app/components/base/input' type Props = { isString: boolean @@ -49,8 +50,7 @@ const ArrayValueList: FC = ({
{list.map((item, index) => (
-
{t('workflow.chatVariable.modal.name')}
- handleNameChange(e.target.value)} - type='text' />
@@ -312,16 +310,14 @@ const ChatVariableModal = ({
{type === ChatVarType.String && ( - setValue(e.target.value)} /> )} {type === ChatVarType.Number && ( - setValue(Number(e.target.value))} diff --git a/web/app/components/workflow/panel/env-panel/variable-modal.tsx b/web/app/components/workflow/panel/env-panel/variable-modal.tsx index 46f92bd8ed..6939c9449c 100644 --- a/web/app/components/workflow/panel/env-panel/variable-modal.tsx +++ b/web/app/components/workflow/panel/env-panel/variable-modal.tsx @@ -4,6 +4,7 @@ import { v4 as uuid4 } from 'uuid' import { RiCloseLine, RiQuestionLine } from '@remixicon/react' import { useContext } from 'use-context-selector' import Button from '@/app/components/base/button' +import Input from '@/app/components/base/input' import TooltipPlus from '@/app/components/base/tooltip-plus' import { ToastContext } from '@/app/components/base/toast' import { useStore } from '@/app/components/workflow/store' @@ -113,13 +114,10 @@ const VariableModal = ({
{t('workflow.env.modal.name')}
- handleNameChange(e.target.value)} - type='text' />
@@ -127,9 +125,7 @@ const VariableModal = ({
{t('workflow.env.modal.value')}
- setValue(e.target.value)}