mirror of
https://github.com/langgenius/dify.git
synced 2026-08-28 19:16:51 +08:00
chore: new block enum
This commit is contained in:
parent
ada558bedc
commit
2386eed703
@ -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
|
||||
|
||||
|
||||
@ -29,8 +29,7 @@ const Panel: FC = () => {
|
||||
// const isChatMode = modelMode === 'chat'
|
||||
|
||||
return (
|
||||
<BasePanel
|
||||
inputsElement={
|
||||
<BasePanel>
|
||||
<div className='mt-2 px-4 space-y-4'>
|
||||
<Field
|
||||
title={t(`${i18nPrefix}.model`)}
|
||||
@ -98,9 +97,7 @@ const Panel: FC = () => {
|
||||
Functions
|
||||
</Field> */}
|
||||
</div>
|
||||
}
|
||||
outputsElement={<div>start panel outputs</div>}
|
||||
/>
|
||||
</BasePanel>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user