feat: comprehensive trigger node system with Schedule Trigger implementation (#24039)

Co-authored-by: zhangxuhe1 <xuhezhang6@gmail.com>
This commit is contained in:
lyzno1
2025-08-18 09:23:16 +08:00
committed by GitHub
parent f214eeb7b1
commit 74ad21b145
52 changed files with 3709 additions and 48 deletions

View File

@ -0,0 +1,30 @@
import { BlockEnum } from '../../types'
import type { NodeDefault } from '../../types'
import type { PluginTriggerNodeType } from './types'
import { ALL_CHAT_AVAILABLE_BLOCKS, ALL_COMPLETION_AVAILABLE_BLOCKS } from '@/app/components/workflow/blocks'
const nodeDefault: NodeDefault<PluginTriggerNodeType> = {
defaultValue: {
plugin_id: '',
plugin_name: '',
event_type: '',
config: {},
},
getAvailablePrevNodes(isChatMode: boolean) {
return []
},
getAvailableNextNodes(isChatMode: boolean) {
const nodes = isChatMode
? ALL_CHAT_AVAILABLE_BLOCKS
: ALL_COMPLETION_AVAILABLE_BLOCKS.filter(type => type !== BlockEnum.End)
return nodes.filter(type => type !== BlockEnum.Start)
},
checkValid(payload: PluginTriggerNodeType, t: any) {
return {
isValid: true,
errorMessage: '',
}
},
}
export default nodeDefault