From c1bf4c6405c8c1db41b5fd699f1621b798398273 Mon Sep 17 00:00:00 2001 From: Joel Date: Thu, 28 Mar 2024 18:23:05 +0800 Subject: [PATCH] chore: var picker ui --- .../workflow-variable-block/component.tsx | 28 +++++++++++++++---- 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/web/app/components/base/prompt-editor/plugins/workflow-variable-block/component.tsx b/web/app/components/base/prompt-editor/plugins/workflow-variable-block/component.tsx index 725a5c7a6d..94bf6cef81 100644 --- a/web/app/components/base/prompt-editor/plugins/workflow-variable-block/component.tsx +++ b/web/app/components/base/prompt-editor/plugins/workflow-variable-block/component.tsx @@ -2,6 +2,10 @@ import type { FC } from 'react' import { useSelectOrDelete } from '../../hooks' import { DELETE_WORKFLOW_VARIABLE_BLOCK_COMMAND } from './index' import type { Node } from '@/app/components/workflow/types' +import { Variable02 } from '@/app/components/base/icons/src/vender/solid/development' +import { VarBlockIcon } from '@/app/components/workflow/block-icon' +import { BlockEnum } from '@/app/components/workflow/types' +import { Line3 } from '@/app/components/base/icons/src/public/common' type WorkflowVariableBlockComponentProps = { nodeKey: string @@ -16,21 +20,33 @@ const WorkflowVariableBlockComponent: FC = }) => { const [ref, isSelected] = useSelectOrDelete(nodeKey, DELETE_WORKFLOW_VARIABLE_BLOCK_COMMAND) const node = getWorkflowNode(variables[0]) + const outputVarNode = node.data const variablesLength = variables.length const lastVariable = variables[variablesLength - 1] return (
-
{node.data.title}
- / -
{lastVariable}
+
+
+ +
+
{outputVarNode?.title}
+ +
+
+ +
{lastVariable}
+
) }