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, setListeningTriggerNodeId,
} = workflowStore.getState() } = workflowStore.getState()
if (runMode === 'webhook') { if (runMode === 'webhook' || runMode === 'plugin') {
setIsListening(true) setIsListening(true)
setShowVariableInspectPanel(true) setShowVariableInspectPanel(true)
setWorkflowRunningData({ setWorkflowRunningData({
@ -255,18 +255,6 @@ export const useWorkflowRun = () => {
resultText: '', 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 { else {
setIsListening(false) setIsListening(false)
setListeningTriggerType(null) setListeningTriggerType(null)

View File

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