diff --git a/backend/adapter_processor/adapter_processor.py b/backend/adapter_processor/adapter_processor.py index ba4ef14101..688afc6e40 100644 --- a/backend/adapter_processor/adapter_processor.py +++ b/backend/adapter_processor/adapter_processor.py @@ -144,6 +144,8 @@ def set_default_triad(default_triad: dict[str, str], user: User) -> None: adapter_type = AdapterTypes.EMBEDDING.name elif key == AdapterKeys.VECTOR_DB_DEFAULT: adapter_type = AdapterTypes.VECTOR_DB.name + elif key == AdapterKeys.X2TEXT_DEFAULT: + adapter_type = AdapterTypes.X2TEXT.name filter_params["adapter_type"] = adapter_type filter_params["is_default"] = True diff --git a/backend/adapter_processor/constants.py b/backend/adapter_processor/constants.py index 5a6296f53c..2cd8f010b0 100644 --- a/backend/adapter_processor/constants.py +++ b/backend/adapter_processor/constants.py @@ -18,6 +18,7 @@ class AdapterKeys: LLM_DEFAULT = "llm_default" VECTOR_DB_DEFAULT = "vector_db_default" EMBEDDING_DEFAULT = "embedding_default" + X2TEXT_DEFAULT = "x2text_default" ADAPTER_NAME_EXISTS = ( "Configuration with this ID already exists. " "Please try with a different ID" diff --git a/frontend/src/components/agency/actions/Actions.jsx b/frontend/src/components/agency/actions/Actions.jsx index 216f18db4a..6cf7405444 100644 --- a/frontend/src/components/agency/actions/Actions.jsx +++ b/frontend/src/components/agency/actions/Actions.jsx @@ -264,6 +264,28 @@ function Actions({ statusBarMsg, initializeWfComp, stepLoader }) { setExecutionId(""); }; + const isIncompleteWorkflow = () => { + if (details?.tool_instances.length === 0) { + return true; + } + }; + + // Disable Run & Step execution - + // when NO tool present in the workflow + // When source OR destination is NOT configured + const disableAction = () => { + if (isIncompleteWorkflow()) { + return true; + } + if ( + source?.connection_type === "API" && + destination?.connection_type === "API" + ) { + return false; + } + return !source?.connector_instance || !destination?.connector_instance; + }; + const createDeployment = (type) => { const workflowId = details?.id; if (!workflowId) { @@ -361,7 +383,7 @@ function Actions({ statusBarMsg, initializeWfComp, stepLoader }) { ? getInputFile(true, false, 4) : handleWfExecution(true, false, 4) } - disabled={handleDisable(4)} + disabled={disableAction() || handleDisable(4)} loading={execType === "NORMAL"} > @@ -375,7 +397,7 @@ function Actions({ statusBarMsg, initializeWfComp, stepLoader }) { ? getInputFile(true, true, 0) : handleWfExecution(true, true, 0) } - disabled={handleDisable(0)} + disabled={disableAction() || handleDisable(0)} loading={execType === "STEP"} > @@ -414,7 +436,7 @@ function Actions({ statusBarMsg, initializeWfComp, stepLoader }) { - + @@ -422,7 +444,7 @@ function Actions({ statusBarMsg, initializeWfComp, stepLoader }) {