feat(workflow): update listening descriptions when trigger nodes start test-run

This commit is contained in:
zhsama
2025-10-24 15:32:23 +08:00
parent 4597ab4efb
commit 29ec3c7d5c
5 changed files with 21 additions and 5 deletions

View File

@ -21,7 +21,8 @@ const resolveListeningDescription = (
if (nodeDescription)
return nodeDescription
return t('workflow.debug.variableInspect.listening.tip')
const nodeName = (triggerNode?.data as { title?: string })?.title
return t('workflow.debug.variableInspect.listening.tip', { nodeName })
}
const resolveMultipleListeningDescription = (
@ -29,16 +30,16 @@ const resolveMultipleListeningDescription = (
t: TFunction,
): string => {
if (!nodes.length)
return t('workflow.debug.variableInspect.listening.tip')
return t('workflow.debug.variableInspect.listening.tip', { nodeName: t('workflow.debug.variableInspect.listening.selectedTriggers') })
const titles = nodes
.map(node => (node.data as { title?: string })?.title)
.filter((title): title is string => Boolean(title))
if (titles.length)
return titles.join(', ')
return t('workflow.debug.variableInspect.listening.tip', { nodeName: titles.join(', ') })
return t('workflow.debug.variableInspect.listening.tip')
return t('workflow.debug.variableInspect.listening.tip', { nodeName: t('workflow.debug.variableInspect.listening.selectedTriggers') })
}
export type ListeningProps = {