mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-05-16 13:16:56 +08:00

Co-authored-by: StyleZhang <jasonapring2015@outlook.com> Co-authored-by: Yi <yxiaoisme@gmail.com> Co-authored-by: -LAN- <laipz8200@outlook.com>
22 lines
593 B
TypeScript
22 lines
593 B
TypeScript
import type { NodeDefault } from '../../types'
|
|
import type { IterationStartNodeType } from './types'
|
|
import { ALL_CHAT_AVAILABLE_BLOCKS, ALL_COMPLETION_AVAILABLE_BLOCKS } from '@/app/components/workflow/constants'
|
|
|
|
const nodeDefault: NodeDefault<IterationStartNodeType> = {
|
|
defaultValue: {},
|
|
getAvailablePrevNodes() {
|
|
return []
|
|
},
|
|
getAvailableNextNodes(isChatMode: boolean) {
|
|
const nodes = isChatMode ? ALL_CHAT_AVAILABLE_BLOCKS : ALL_COMPLETION_AVAILABLE_BLOCKS
|
|
return nodes
|
|
},
|
|
checkValid() {
|
|
return {
|
|
isValid: true,
|
|
}
|
|
},
|
|
}
|
|
|
|
export default nodeDefault
|