fix(workflow): handle plugin run mode correctly by setting status

This commit is contained in:
zhsama
2025-10-13 14:50:12 +08:00
parent 0ec5d53e5b
commit ba88c7b25b
2 changed files with 3 additions and 14 deletions

View File

@@ -241,7 +241,7 @@ export const useWorkflowRun = () => {
setListeningTriggerNodeId,
} = workflowStore.getState()
if (runMode === 'webhook') {
if (runMode === 'webhook' || runMode === 'plugin') {
setIsListening(true)
setShowVariableInspectPanel(true)
setWorkflowRunningData({
@@ -255,18 +255,6 @@ export const useWorkflowRun = () => {
resultText: '',
})
}
else if (runMode === 'plugin') {
setIsListening(true)
setShowVariableInspectPanel(true)
setWorkflowRunningData({
result: {
status: WorkflowRunningStatus.Running,
inputs_truncated: false,
process_data_truncated: false,
outputs_truncated: false,
},
})
}
else {
setIsListening(false)
setListeningTriggerType(null)

View File

@@ -68,7 +68,8 @@ const RunMode = ({
handleWorkflowTriggerWebhookRunInWorkflow({ nodeId: option.nodeId })
}
else if (option.type === 'plugin') {
handleWorkflowTriggerPluginRunInWorkflow(option.nodeId)
if (option.nodeId)
handleWorkflowTriggerPluginRunInWorkflow(option.nodeId)
}
else {
// Placeholder for trigger-specific execution logic for schedule, webhook, plugin types