diff --git a/web/app/(commonLayout)/workflow/nodes/page.tsx b/web/app/(commonLayout)/workflow/nodes/page.tsx index 4c83f79656..0ea0be9bda 100644 --- a/web/app/(commonLayout)/workflow/nodes/page.tsx +++ b/web/app/(commonLayout)/workflow/nodes/page.tsx @@ -3,15 +3,16 @@ import type { FC } from 'react' import { memo } from 'react' import Workflow from '@/app/components/workflow' +import { BlockEnum } from '@/app/components/workflow/types' const nodes = [ - 'start', 'directAnswer', 'llm', 'knowledgeRetrieval', 'questionClassifier', - 'questionClassifier', 'ifElse', 'code', 'templateTransform', 'http', - 'tool', + BlockEnum.Start, BlockEnum.DirectAnswer, BlockEnum.LLM, BlockEnum.KnowledgeRetrieval, BlockEnum.QuestionClassifier, + BlockEnum.QuestionClassifier, BlockEnum.IfElse, BlockEnum.Code, BlockEnum.TemplateTransform, BlockEnum.HttpRequest, + BlockEnum.Tool, ].map((item, i) => ({ id: `${i + 1}`, type: 'custom', position: { x: 330, y: 30 + i * 200 }, - data: { type: item }, + data: { type: item, name: item }, })) const initialNodes = nodes diff --git a/web/app/components/workflow/nodes/llm/panel.tsx b/web/app/components/workflow/nodes/llm/panel.tsx index 0a2266149a..4557d4f690 100644 --- a/web/app/components/workflow/nodes/llm/panel.tsx +++ b/web/app/components/workflow/nodes/llm/panel.tsx @@ -29,78 +29,75 @@ const Panel: FC = () => { // const isChatMode = modelMode === 'chat' return ( - - - - + +
+ + + - - } - > - - + + } + > + + - - } - > - {inputs.context.enabled - ? ( -
Context
- ) - : null} -
- - Prompt - - - - Vision - - {/* This version not support function */} - {/* + } + > + {inputs.context.enabled + ? ( +
Context
+ ) + : null} +
+ + Prompt + + + + Vision + + {/* This version not support function */} + {/* Functions */} -
- } - outputsElement={
start panel outputs
} - /> + +
) }