mirror of
https://github.com/langgenius/dify.git
synced 2026-02-11 21:44:05 +08:00
- Introduced GroupDefault node with metadata and default values for group nodes. - Enhanced useNodeMetaData hook to handle group node author and description using translations. - Added translations for group node functionality in English, Japanese, Simplified Chinese, and Traditional Chinese.
27 lines
550 B
TypeScript
27 lines
550 B
TypeScript
import type { NodeDefault } from '../../types'
|
|
import type { GroupNodeData } from './types'
|
|
import { BlockEnum } from '@/app/components/workflow/types'
|
|
import { genNodeMetaData } from '@/app/components/workflow/utils'
|
|
|
|
const metaData = genNodeMetaData({
|
|
sort: 100,
|
|
type: BlockEnum.Group,
|
|
})
|
|
|
|
const nodeDefault: NodeDefault<GroupNodeData> = {
|
|
metaData,
|
|
defaultValue: {
|
|
members: [],
|
|
handlers: [],
|
|
headNodeIds: [],
|
|
leafNodeIds: [],
|
|
},
|
|
checkValid() {
|
|
return {
|
|
isValid: true,
|
|
}
|
|
},
|
|
}
|
|
|
|
export default nodeDefault
|