diff --git a/web/app/(commonLayout)/workflow/page.tsx b/web/app/(commonLayout)/workflow/page.tsx index 2da702befd..a9fd6f66a8 100644 --- a/web/app/(commonLayout)/workflow/page.tsx +++ b/web/app/(commonLayout)/workflow/page.tsx @@ -33,13 +33,13 @@ const initialNodes = [ id: '3', type: 'custom', position: { x: 738, y: 130 }, - data: { type: 'llm', sortIndexInBranches: 0 }, + data: { type: 'question-classifier', sortIndexInBranches: 0 }, }, { id: '4', type: 'custom', position: { x: 738, y: 330 }, - data: { type: 'llm', sortIndexInBranches: 1 }, + data: { type: 'variable-assigner', sortIndexInBranches: 1 }, }, // { // id: '5', diff --git a/web/app/components/workflow/hooks.ts b/web/app/components/workflow/hooks.ts index 9a4a45c2d7..b0b5329928 100644 --- a/web/app/components/workflow/hooks.ts +++ b/web/app/components/workflow/hooks.ts @@ -106,6 +106,7 @@ export const useWorkflow = () => { filtered.push({ id: `${source}-${target}`, + type: 'custom', source: source!, target: target!, sourceHandle, diff --git a/web/app/components/workflow/nodes/index.tsx b/web/app/components/workflow/nodes/index.tsx index 38a8b15fdb..c1320b6af7 100644 --- a/web/app/components/workflow/nodes/index.tsx +++ b/web/app/components/workflow/nodes/index.tsx @@ -32,7 +32,7 @@ const CustomNode = memo((props: NodeProps) => { { - nodeData.type !== BlockEnum.IfElse && ( + nodeData.type !== BlockEnum.IfElse && nodeData.type !== BlockEnum.QuestionClassifier && ( { +const Node: FC> = (props) => { const { provider, name: modelId } = mockData.model const tempTopics = mockData.topics const [topics, setTopics] = useState(tempTopics) @@ -23,11 +25,20 @@ const Node: FC = () => { />
{topics.map(topic => ( - + className='relative' + > + + +
))} {/* For test */}
{ +const Node: FC> = (props) => { const { t } = useTranslation() const { variables: tempVar, output_type } = mockData const [variables, setVariables] = useState(tempVar) @@ -35,7 +37,12 @@ const Node: FC = () => { const node = getNodeInfoById(item[0]) const varName = item[item.length - 1] return ( -
+
+