chore: refactor workflow

This commit is contained in:
zxhlyh
2025-04-24 16:29:58 +08:00
parent 5e09ac696c
commit f7de55364f
59 changed files with 695 additions and 1155 deletions

View File

@ -0,0 +1,28 @@
import { BlockClassificationEnum } from '@/app/components/workflow/block-selector/types'
import type { BlockEnum } from '@/app/components/workflow/types'
export type GenNodeMetaDataParams = {
classification?: BlockClassificationEnum
sort: number
type: BlockEnum
title?: string
author?: string
helpLinkUri?: string
}
export const genNodeMetaData = ({
classification = BlockClassificationEnum.Default,
sort,
type,
title = '',
author = 'Dify',
helpLinkUri,
}: GenNodeMetaDataParams) => {
return {
classification,
sort,
type,
title,
author,
helpLinkUri: helpLinkUri || type,
}
}

View File

@ -6,3 +6,4 @@ export * from './common'
export * from './tool'
export * from './workflow'
export * from './variable'
export * from './gen-node-meta-data'