diff --git a/skyvern-frontend/src/routes/workflows/Workflows.tsx b/skyvern-frontend/src/routes/workflows/Workflows.tsx index 3534f574..9a585690 100644 --- a/skyvern-frontend/src/routes/workflows/Workflows.tsx +++ b/skyvern-frontend/src/routes/workflows/Workflows.tsx @@ -49,7 +49,11 @@ import { WorkflowTemplates } from "../discover/WorkflowTemplates"; const emptyWorkflowRequest: WorkflowCreateYAMLRequest = { title: "New Workflow", description: "", - workflow_definition: { blocks: [], parameters: [] }, + ai_fallback: true, + workflow_definition: { + blocks: [], + parameters: [], + }, }; function Workflows() { diff --git a/skyvern-frontend/src/routes/workflows/debugger/Debugger.tsx b/skyvern-frontend/src/routes/workflows/debugger/Debugger.tsx index 754df29f..d7e7a1aa 100644 --- a/skyvern-frontend/src/routes/workflows/debugger/Debugger.tsx +++ b/skyvern-frontend/src/routes/workflows/debugger/Debugger.tsx @@ -63,7 +63,7 @@ function Debugger() { : null, useScriptCache: workflow.generate_script, scriptCacheKey: workflow.cache_key, - aiFallback: workflow.ai_fallback, + aiFallback: workflow.ai_fallback ?? true, }; const elements = getElements( diff --git a/skyvern-frontend/src/routes/workflows/editor/WorkflowEditor.tsx b/skyvern-frontend/src/routes/workflows/editor/WorkflowEditor.tsx index 2e60d198..87678e1a 100644 --- a/skyvern-frontend/src/routes/workflows/editor/WorkflowEditor.tsx +++ b/skyvern-frontend/src/routes/workflows/editor/WorkflowEditor.tsx @@ -64,7 +64,7 @@ function WorkflowEditor() { : null, useScriptCache: workflow.generate_script, scriptCacheKey: workflow.cache_key, - aiFallback: workflow.ai_fallback, + aiFallback: workflow.ai_fallback ?? true, }; const elements = getElements( diff --git a/skyvern-frontend/src/routes/workflows/editor/nodes/StartNode/StartNode.tsx b/skyvern-frontend/src/routes/workflows/editor/nodes/StartNode/StartNode.tsx index 3d9ac490..ff61bc42 100644 --- a/skyvern-frontend/src/routes/workflows/editor/nodes/StartNode/StartNode.tsx +++ b/skyvern-frontend/src/routes/workflows/editor/nodes/StartNode/StartNode.tsx @@ -82,7 +82,7 @@ function StartNode({ id, data }: NodeProps) { extraHttpHeaders: data.withWorkflowSettings ? data.extraHttpHeaders : null, useScriptCache: data.withWorkflowSettings ? data.useScriptCache : false, scriptCacheKey: data.withWorkflowSettings ? data.scriptCacheKey : null, - aiFallback: data.withWorkflowSettings ? data.aiFallback : false, + aiFallback: data.withWorkflowSettings ? data.aiFallback : true, }); const [facing, setFacing] = useState<"front" | "back">("front"); diff --git a/skyvern-frontend/src/routes/workflows/editor/workflowEditorUtils.ts b/skyvern-frontend/src/routes/workflows/editor/workflowEditorUtils.ts index 56c2bb2c..c1bbf866 100644 --- a/skyvern-frontend/src/routes/workflows/editor/workflowEditorUtils.ts +++ b/skyvern-frontend/src/routes/workflows/editor/workflowEditorUtils.ts @@ -705,7 +705,7 @@ function getElements( editable, useScriptCache: settings.useScriptCache, scriptCacheKey: settings.scriptCacheKey, - aiFallback: settings.aiFallback ?? false, + aiFallback: settings.aiFallback ?? true, label: "__start_block__", showCode: false, }), @@ -1417,7 +1417,7 @@ function getWorkflowSettings(nodes: Array): WorkflowSettings { extraHttpHeaders: null, useScriptCache: false, scriptCacheKey: null, - aiFallback: false, + aiFallback: true, }; const startNodes = nodes.filter(isStartNode); const startNodeWithWorkflowSettings = startNodes.find( diff --git a/skyvern-frontend/src/store/WorkflowHasChangesStore.ts b/skyvern-frontend/src/store/WorkflowHasChangesStore.ts index 0353bfb9..991a5af2 100644 --- a/skyvern-frontend/src/store/WorkflowHasChangesStore.ts +++ b/skyvern-frontend/src/store/WorkflowHasChangesStore.ts @@ -116,7 +116,7 @@ const useWorkflowSave = () => { extra_http_headers: extraHttpHeaders, generate_script: saveData.settings.useScriptCache, cache_key: normalizedKey, - ai_fallback: saveData.settings.aiFallback ?? undefined, + ai_fallback: saveData.settings.aiFallback ?? true, workflow_definition: { parameters: saveData.parameters, blocks: saveData.blocks,