Skip to content

LLM-Driven Extraction of Unstructured Data — Built for API Deployments & ETL Pipeline Workflows

Fixed tool deletion and reordering (#296)

jagadeeswaran-zipstack85c5dd5d4be0
diff --git a/frontend/src/components/agency/agency/Agency.jsx b/frontend/src/components/agency/agency/Agency.jsx
index 269d11cc0..92ae5f4c1 100644
--- a/frontend/src/components/agency/agency/Agency.jsx
+++ b/frontend/src/components/agency/agency/Agency.jsx
@@ -188,7 +188,6 @@ function Agency() {
<Layout className="agency-sider-layout">
<IslandLayout>
<WorkflowExecution
- steps={steps}
setSteps={setSteps}
activeToolId={activeToolId}
inputMd={inputMd}
diff --git a/frontend/src/components/agency/steps/Steps.jsx b/frontend/src/components/agency/steps/Steps.jsx
index ef14fd5a0..5a8cac5b6 100644
--- a/frontend/src/components/agency/steps/Steps.jsx
+++ b/frontend/src/components/agency/steps/Steps.jsx
@@ -15,7 +15,7 @@ import { StepCard } from "../step-card/StepCard.jsx";
import "./Steps.css";
import { useExceptionHandler } from "../../../hooks/useExceptionHandler.jsx";
-function Steps({ steps, setSteps, activeToolId, sourceMsg, destinationMsg }) {
+function Steps({ setSteps, activeToolId, sourceMsg, destinationMsg }) {
const workflowStore = useWorkflowStore();
const {
projectId,
@@ -58,11 +58,12 @@ function Steps({ steps, setSteps, activeToolId, sourceMsg, destinationMsg }) {
};
const moveItem = (fromIndex, toIndex, funcName, dragging) => {
+ const toolInstance = details?.tool_instances || [];
if (fromIndex === undefined && funcName) {
handleAddToolInstance(funcName)
.then((res) => {
const data = res?.data;
- const newList = [...steps];
+ const newList = [...toolInstance];
newList.push(data);
addNewTool(data);
return rearrangeTools(newList);
@@ -75,11 +76,11 @@ function Steps({ steps, setSteps, activeToolId, sourceMsg, destinationMsg }) {
setAlertDetails(handleException(err, msg));
});
} else {
- const updatedSteps = [...steps];
+ const updatedSteps = [...toolInstance];
const [movedStep] = updatedSteps.splice(fromIndex, 1);
updatedSteps.splice(toIndex, 0, movedStep);
if (!dragging) {
- rearrangeTools(steps).then((res) => {
+ rearrangeTools(toolInstance).then((res) => {
setSteps(res);
});
} else {
@@ -190,7 +191,7 @@ function Steps({ steps, setSteps, activeToolId, sourceMsg, destinationMsg }) {
) : (
<DndProvider backend={HTML5Backend}>
<StepCard
- steps={steps}
+ steps={details?.tool_instances}
activeTool={activeToolId}
moveItem={moveItem}
/>
@@ -211,7 +212,6 @@ function Steps({ steps, setSteps, activeToolId, sourceMsg, destinationMsg }) {
}
Steps.propTypes = {
- steps: PropTypes.array,
setSteps: PropTypes.func,
activeToolId: PropTypes.string,
sourceMsg: PropTypes.string,
diff --git a/frontend/src/components/agency/workflow-execution-layout/WorkflowExecutionMain.jsx b/frontend/src/components/agency/workflow-execution-layout/WorkflowExecutionMain.jsx
index 7748ebbbb..fb5acdaec 100644
--- a/frontend/src/components/agency/workflow-execution-layout/WorkflowExecutionMain.jsx
+++ b/frontend/src/components/agency/workflow-execution-layout/WorkflowExecutionMain.jsx
@@ -7,7 +7,6 @@ import "./WorkflowExecutionMain.css";
import { InputOutput } from "../input-output/InputOutput";
function WorkflowExecutionMain({
- steps,
setSteps,
activeToolId,
inputMd,
@@ -25,7 +24,6 @@ function WorkflowExecutionMain({
</div>
<div className="wf-exec-main-steps">
<Steps
- steps={steps}
setSteps={setSteps}
activeToolId={activeToolId}
sourceMsg={sourceMsg}
@@ -45,7 +43,6 @@ function WorkflowExecutionMain({
}
WorkflowExecutionMain.propTypes = {
- steps: PropTypes.array,
setSteps: PropTypes.func,
activeToolId: PropTypes.string,
inputMd: PropTypes.string,
diff --git a/frontend/src/components/agency/workflow-execution/WorkflowExecution.jsx b/frontend/src/components/agency/workflow-execution/WorkflowExecution.jsx
index 7e2edf26a..8fa9943ce 100644
--- a/frontend/src/components/agency/workflow-execution/WorkflowExecution.jsx
+++ b/frontend/src/components/agency/workflow-execution/WorkflowExecution.jsx
@@ -5,7 +5,6 @@ import "./WorkflowExecution.css";
import { WorkflowExecutionMain } from "../workflow-execution-layout/WorkflowExecutionMain";
function WorkflowExecution({
- steps,
setSteps,
activeToolId,
inputMd,
@@ -22,7 +21,6 @@ function WorkflowExecution({
</div>
<div className="wf-exec-main">
<WorkflowExecutionMain
- steps={steps}
setSteps={setSteps}
activeToolId={activeToolId}
inputMd={inputMd}
@@ -36,7 +34,6 @@ function WorkflowExecution({
}
WorkflowExecution.propTypes = {
- steps: PropTypes.array,
setSteps: PropTypes.func,
activeToolId: PropTypes.string,
inputMd: PropTypes.string,