From d500a631f0c00125d693be38c9f62a039a95978e Mon Sep 17 00:00:00 2001 From: JzoNg Date: Tue, 6 Jan 2026 15:20:31 +0800 Subject: [PATCH] add node title in content wrapper --- .../panel/human-input-filled-form-list.tsx | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/web/app/components/workflow/panel/human-input-filled-form-list.tsx b/web/app/components/workflow/panel/human-input-filled-form-list.tsx index 45d8e4c3ee..02a03ce2aa 100644 --- a/web/app/components/workflow/panel/human-input-filled-form-list.tsx +++ b/web/app/components/workflow/panel/human-input-filled-form-list.tsx @@ -1,6 +1,9 @@ import type { HumanInputFilledFormData } from '@/types/workflow' +import { useCallback } from 'react' +import { useStoreApi } from 'reactflow' import ContentWrapper from '@/app/components/base/chat/chat/answer/human-input-content/content-wrapper' import { SubmittedHumanInputContent } from '@/app/components/base/chat/chat/answer/human-input-content/submitted' +import { CUSTOM_NODE } from '@/app/components/workflow/constants' type HumanInputFilledFormListProps = { humanInputFilledFormDataList: HumanInputFilledFormData[] @@ -9,13 +12,24 @@ type HumanInputFilledFormListProps = { const HumanInputFilledFormList = ({ humanInputFilledFormDataList, }: HumanInputFilledFormListProps) => { + const store = useStoreApi() + + const getHumanInputNodeTitle = useCallback((nodeID: string) => { + const { + getNodes, + } = store.getState() + const nodes = getNodes().filter(node => node.type === CUSTOM_NODE) + const node = nodes.find(n => n.id === nodeID) + return node?.data.title + }, [store]) + return ( -
+
{ humanInputFilledFormDataList.map(formData => (