2024-09-10 15:23:16 +08:00
|
|
|
import type { NodeDefault } from '../../types'
|
|
|
|
import type { IterationStartNodeType } from './types'
|
2025-02-04 03:26:01 +02:00
|
|
|
import { ALL_CHAT_AVAILABLE_BLOCKS, ALL_COMPLETION_AVAILABLE_BLOCKS } from '@/app/components/workflow/blocks'
|
2024-09-10 15:23:16 +08:00
|
|
|
|
|
|
|
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
|