From 39182ccb6b9244039470dd548256c63bfc5a99d2 Mon Sep 17 00:00:00 2001 From: Suhaha Date: Wed, 17 Jan 2024 09:59:21 +0800 Subject: [PATCH] [AutoGen Studio] Fix the process of new workflow (#1181) Co-authored-by: Victor Dibia --- .../src/components/views/builder/workflow.tsx | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/samples/apps/autogen-studio/frontend/src/components/views/builder/workflow.tsx b/samples/apps/autogen-studio/frontend/src/components/views/builder/workflow.tsx index 6b08e4a6a4d..52eda8d551a 100644 --- a/samples/apps/autogen-studio/frontend/src/components/views/builder/workflow.tsx +++ b/samples/apps/autogen-studio/frontend/src/components/views/builder/workflow.tsx @@ -38,9 +38,7 @@ const WorkflowView = ({}: any) => { React.useState(null); const defaultConfig = sampleWorkflowConfig(); - const [newWorkflow, setNewWorkflow] = React.useState( - defaultConfig - ); + const [newWorkflow] = React.useState(defaultConfig); const [showWorkflowModal, setShowWorkflowModal] = React.useState(false); const [showNewWorkflowModal, setShowNewWorkflowModal] = React.useState(false); @@ -195,7 +193,7 @@ const WorkflowView = ({}: any) => { handler, }: { workflow: IFlowConfig | null; - setWorkflow: (workflow: IFlowConfig | null) => void; + setWorkflow?: (workflow: IFlowConfig | null) => void; showWorkflowModal: boolean; setShowWorkflowModal: (show: boolean) => void; handler?: (workflow: IFlowConfig) => void; @@ -207,7 +205,7 @@ const WorkflowView = ({}: any) => { - Agent Specification{" "} + Workflow Specification{" "} {localWorkflow?.name} {" "} @@ -223,7 +221,7 @@ const WorkflowView = ({}: any) => { }} onCancel={() => { setShowWorkflowModal(false); - setWorkflow(null); + setWorkflow?.(null); }} > {localWorkflow && ( @@ -251,7 +249,6 @@ const WorkflowView = ({}: any) => { {