'use client'; import React, { useCallback } from 'react' import { curStepAtom, stepsNodesAtom, viewedStepAtom } from '../store'; import { useAtomValue } from 'jotai'; import { twMerge } from 'tailwind-merge'; import * as R from 'ramda' const Flow = () => { const stepsNodes = useAtomValue(stepsNodesAtom) const curStep = useAtomValue(curStepAtom) const viewedStep = useAtomValue(viewedStepAtom) const getNodeName = useCallback((node) => { return R.cond([ // Form Node [R.propEq('form_card', 'type'), R.always('表单卡片')], // Agent Node [R.propEq('UserTask', 'type'), R.path(['properties', 'item', 'assistantName'])], [R.T, R.prop('type')] ])(node) }, []) return (