Commit 2386eed7 authored by Joel's avatar Joel

chore: new block enum

parent ada558be
...@@ -3,15 +3,16 @@ ...@@ -3,15 +3,16 @@
import type { FC } from 'react' import type { FC } from 'react'
import { memo } from 'react' import { memo } from 'react'
import Workflow from '@/app/components/workflow' import Workflow from '@/app/components/workflow'
import { BlockEnum } from '@/app/components/workflow/types'
const nodes = [ const nodes = [
'start', 'directAnswer', 'llm', 'knowledgeRetrieval', 'questionClassifier', BlockEnum.Start, BlockEnum.DirectAnswer, BlockEnum.LLM, BlockEnum.KnowledgeRetrieval, BlockEnum.QuestionClassifier,
'questionClassifier', 'ifElse', 'code', 'templateTransform', 'http', BlockEnum.QuestionClassifier, BlockEnum.IfElse, BlockEnum.Code, BlockEnum.TemplateTransform, BlockEnum.HttpRequest,
'tool', BlockEnum.Tool,
].map((item, i) => ({ ].map((item, i) => ({
id: `${i + 1}`, id: `${i + 1}`,
type: 'custom', type: 'custom',
position: { x: 330, y: 30 + i * 200 }, position: { x: 330, y: 30 + i * 200 },
data: { type: item }, data: { type: item, name: item },
})) }))
const initialNodes = nodes const initialNodes = nodes
......
...@@ -29,8 +29,7 @@ const Panel: FC = () => { ...@@ -29,8 +29,7 @@ const Panel: FC = () => {
// const isChatMode = modelMode === 'chat' // const isChatMode = modelMode === 'chat'
return ( return (
<BasePanel <BasePanel>
inputsElement={
<div className='mt-2 px-4 space-y-4'> <div className='mt-2 px-4 space-y-4'>
<Field <Field
title={t(`${i18nPrefix}.model`)} title={t(`${i18nPrefix}.model`)}
...@@ -98,9 +97,7 @@ const Panel: FC = () => { ...@@ -98,9 +97,7 @@ const Panel: FC = () => {
Functions Functions
</Field> */} </Field> */}
</div> </div>
} </BasePanel>
outputsElement={<div>start panel outputs</div>}
/>
) )
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment