dify/web/app/components/workflow/nodes/start/default.ts
lyzno1 b4801adfbd refactor(workflow): Remove Start node from isRequired mechanism
- Set Start node isRequired: false since entry node validation is handled by unified logic
- Remove conditional skip logic in checklist since Start is no longer in isRequiredNodesType
- Cleaner separation of concerns: unified entry node check vs individual required nodes
- Eliminates architectural inconsistency where Start was both individually required and part of group validation
2025-09-26 21:09:48 +08:00

27 lines
571 B
TypeScript

import type { NodeDefault } from '../../types'
import type { StartNodeType } from './types'
import { genNodeMetaData } from '@/app/components/workflow/utils'
import { BlockEnum } from '@/app/components/workflow/types'
const metaData = genNodeMetaData({
sort: 0.1,
type: BlockEnum.Start,
isStart: true,
isRequired: false,
isSingleton: true,
isTypeFixed: true,
})
const nodeDefault: NodeDefault<StartNodeType> = {
metaData,
defaultValue: {
variables: [],
},
checkValid() {
return {
isValid: true,
}
},
}
export default nodeDefault