mirror of
https://github.com/langgenius/dify.git
synced 2026-02-01 16:41:58 +08:00
29 lines
651 B
TypeScript
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
|