From da0d9aab390e9d2bc58a6b544984480b69f0b08d Mon Sep 17 00:00:00 2001 From: Joel Date: Sun, 18 Feb 2024 14:08:08 +0800 Subject: [PATCH] chore: remove node code to panel --- .../components/workflow/nodes/llm/node.tsx | 20 ++-------------- .../components/workflow/nodes/llm/panel.tsx | 24 ++++++++++++++++++- 2 files changed, 25 insertions(+), 19 deletions(-) diff --git a/web/app/components/workflow/nodes/llm/node.tsx b/web/app/components/workflow/nodes/llm/node.tsx index 137bbd1d71..cf241b635f 100644 --- a/web/app/components/workflow/nodes/llm/node.tsx +++ b/web/app/components/workflow/nodes/llm/node.tsx @@ -1,31 +1,15 @@ import type { FC } from 'react' import { useTranslation } from 'react-i18next' import BaseNode from '../_base/node' -import Field from '@/app/components/workflow/nodes/_base/components/field' -import AddButton from '@/app/components/base/button/add-button' const i18nPrefix = 'workflow.nodes.llm' const Node: FC = () => { const { t } = useTranslation() - const handleAddVariable = () => { - console.log('add variable') - } + return (
- - Model Selector - - - } - > - Var Selector - + llm
) diff --git a/web/app/components/workflow/nodes/llm/panel.tsx b/web/app/components/workflow/nodes/llm/panel.tsx index ca61bbcc67..7efbd99308 100644 --- a/web/app/components/workflow/nodes/llm/panel.tsx +++ b/web/app/components/workflow/nodes/llm/panel.tsx @@ -1,10 +1,32 @@ import type { FC } from 'react' +import { useTranslation } from 'react-i18next' import BasePanel from '../_base/panel' +import Field from '@/app/components/workflow/nodes/_base/components/field' +import AddButton from '@/app/components/base/button/add-button' +const i18nPrefix = 'workflow.nodes.llm' const Panel: FC = () => { + const { t } = useTranslation() + const handleAddVariable = () => { + console.log('add variable') + } return ( start panel inputs} + inputsElement={
+ + Model Selector + + + } + > + Var Selector + +
} outputsElement={
start panel outputs
} /> )