mirror of
https://github.com/langgenius/dify.git
synced 2025-07-19 07:31:09 +00:00
29 lines
628 B
TypeScript
29 lines
628 B
TypeScript
![]() |
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,
|
||
|
}
|
||
|
}
|