mirror of
https://github.com/langgenius/dify.git
synced 2026-03-05 15:47:06 +08:00
Merge remote-tracking branch 'origin/main' into feat/trigger
This commit is contained in:
@ -1,24 +1,21 @@
|
||||
import { BlockEnum } from '../../types'
|
||||
import type { NodeDefault } from '../../types'
|
||||
import { genNodeMetaData } from '../../utils'
|
||||
import type { PluginTriggerNodeType } from './types'
|
||||
import { ALL_COMPLETION_AVAILABLE_BLOCKS } from '@/app/components/workflow/blocks'
|
||||
|
||||
const metaData = genNodeMetaData({
|
||||
sort: 1,
|
||||
type: BlockEnum.TriggerPlugin,
|
||||
})
|
||||
|
||||
const nodeDefault: NodeDefault<PluginTriggerNodeType> = {
|
||||
metaData,
|
||||
defaultValue: {
|
||||
plugin_id: '',
|
||||
trigger_name: '',
|
||||
event_type: '',
|
||||
// event_type: '',
|
||||
config: {},
|
||||
},
|
||||
getAvailablePrevNodes(_isChatMode: boolean) {
|
||||
return []
|
||||
},
|
||||
getAvailableNextNodes(isChatMode: boolean) {
|
||||
const nodes = isChatMode
|
||||
? []
|
||||
: ALL_COMPLETION_AVAILABLE_BLOCKS
|
||||
return nodes.filter(type => type !== BlockEnum.Start)
|
||||
},
|
||||
checkValid(_payload: PluginTriggerNodeType, _t: any) {
|
||||
return {
|
||||
isValid: true,
|
||||
|
||||
Reference in New Issue
Block a user