Skip to content

Commit

Permalink
[AutoGen Studio] Fix the process of new workflow (microsoft#1181)
Browse files Browse the repository at this point in the history
Co-authored-by: Victor Dibia <victordibia@microsoft.com>
  • Loading branch information
shhdgit and victordibia authored Jan 17, 2024
1 parent 611396a commit 5a71b71
Showing 1 changed file with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@ const WorkflowView = ({}: any) => {
React.useState<IFlowConfig | null>(null);

const defaultConfig = sampleWorkflowConfig();
const [newWorkflow, setNewWorkflow] = React.useState<IFlowConfig | null>(
defaultConfig
);
const [newWorkflow] = React.useState<IFlowConfig | null>(defaultConfig);

const [showWorkflowModal, setShowWorkflowModal] = React.useState(false);
const [showNewWorkflowModal, setShowNewWorkflowModal] = React.useState(false);
Expand Down Expand Up @@ -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;
Expand All @@ -207,7 +205,7 @@ const WorkflowView = ({}: any) => {
<Modal
title={
<>
Agent Specification{" "}
Workflow Specification{" "}
<span className="text-accent font-normal">
{localWorkflow?.name}
</span>{" "}
Expand All @@ -223,7 +221,7 @@ const WorkflowView = ({}: any) => {
}}
onCancel={() => {
setShowWorkflowModal(false);
setWorkflow(null);
setWorkflow?.(null);
}}
>
{localWorkflow && (
Expand Down Expand Up @@ -251,7 +249,6 @@ const WorkflowView = ({}: any) => {

<WorkflowModal
workflow={newWorkflow}
setWorkflow={setNewWorkflow}
showWorkflowModal={showNewWorkflowModal}
setShowWorkflowModal={setShowNewWorkflowModal}
handler={(workflow: IFlowConfig) => {
Expand Down

0 comments on commit 5a71b71

Please sign in to comment.