dify/web/app/components/workflow/nodes/human-input/default.ts
2025-07-25 08:54:43 +08:00

29 lines
651 B
TypeScript

import type { NodeDefault } from '../../types'
import type { HumanInputNodeType } from './types'
import { ALL_CHAT_AVAILABLE_BLOCKS } from '@/app/components/workflow/blocks'
const nodeDefault: NodeDefault<HumanInputNodeType> = {
defaultValue: {
deliveryMethod: [],
userActions: [],
},
getAvailablePrevNodes(isChatMode: boolean) {
const nodes = isChatMode
? ALL_CHAT_AVAILABLE_BLOCKS
: []
return nodes
},
getAvailableNextNodes() {
const nodes = ALL_CHAT_AVAILABLE_BLOCKS
return nodes
},
checkValid() {
return {
isValid: true,
errorMessage: '',
}
},
}
export default nodeDefault