mirror of
https://github.com/langgenius/dify.git
synced 2026-05-05 09:58:04 +08:00
feat(trigger): add PluginTrigger node support and enhance output variable handling
This commit is contained in:
@ -40,6 +40,8 @@ import type { VariableAssignerNodeType } from '@/app/components/workflow/nodes/v
|
||||
import type { Field as StructField } from '@/app/components/workflow/nodes/llm/types'
|
||||
import type { RAGPipelineVariable } from '@/models/pipeline'
|
||||
import type { WebhookTriggerNodeType } from '@/app/components/workflow/nodes/trigger-webhook/types'
|
||||
import type { PluginTriggerNodeType } from '@/app/components/workflow/nodes/trigger-plugin/types'
|
||||
import PluginTriggerNodeDefault from '@/app/components/workflow/nodes/trigger-plugin/default'
|
||||
|
||||
import {
|
||||
AGENT_OUTPUT_STRUCT,
|
||||
@ -633,6 +635,17 @@ const formatItem = (
|
||||
break
|
||||
}
|
||||
|
||||
case BlockEnum.TriggerPlugin: {
|
||||
const outputSchema = PluginTriggerNodeDefault.getOutputVars?.(
|
||||
data as PluginTriggerNodeType,
|
||||
allPluginInfoList,
|
||||
[],
|
||||
{ schemaTypeDefinitions },
|
||||
) || []
|
||||
res.vars = outputSchema
|
||||
break
|
||||
}
|
||||
|
||||
case 'env': {
|
||||
res.vars = data.envList.map((env: EnvironmentVariable) => {
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user