From d4de6a4d0946723b6fc4b871c6f043e80ffc257c Mon Sep 17 00:00:00 2001 From: Jonathan Dobson Date: Mon, 29 Sep 2025 18:59:31 -0400 Subject: [PATCH] migrate generate_script -> run_with (FE) (#3555) --- .../src/routes/workflows/RunWorkflowForm.tsx | 2 +- skyvern-frontend/src/routes/workflows/Workflows.tsx | 2 +- .../components/WorkflowVisualComparisonDrawer.tsx | 2 +- .../src/routes/workflows/debugger/Debugger.tsx | 2 +- .../src/routes/workflows/editor/WorkflowEditor.tsx | 2 +- .../src/routes/workflows/editor/Workspace.tsx | 2 +- .../workflows/editor/nodes/StartNode/StartNode.tsx | 9 +++------ .../src/routes/workflows/editor/nodes/StartNode/types.ts | 2 +- .../workflows/editor/panels/WorkflowComparisonPanel.tsx | 2 +- .../src/routes/workflows/editor/workflowEditorUtils.ts | 8 ++++---- .../src/routes/workflows/types/workflowTypes.ts | 4 ++-- .../src/routes/workflows/types/workflowYamlTypes.ts | 2 +- skyvern-frontend/src/store/WorkflowHasChangesStore.ts | 2 +- 13 files changed, 19 insertions(+), 22 deletions(-) diff --git a/skyvern-frontend/src/routes/workflows/RunWorkflowForm.tsx b/skyvern-frontend/src/routes/workflows/RunWorkflowForm.tsx index 6707cd4d..c24c785e 100644 --- a/skyvern-frontend/src/routes/workflows/RunWorkflowForm.tsx +++ b/skyvern-frontend/src/routes/workflows/RunWorkflowForm.tsx @@ -206,7 +206,7 @@ function RunWorkflowForm({ extraHttpHeaders: initialSettings.extraHttpHeaders ? JSON.stringify(initialSettings.extraHttpHeaders) : null, - runWithCode: workflow?.generate_script ?? false, + runWithCode: workflow?.run_with === "code", aiFallback: workflow?.ai_fallback ?? true, }, }); diff --git a/skyvern-frontend/src/routes/workflows/Workflows.tsx b/skyvern-frontend/src/routes/workflows/Workflows.tsx index 7372ef6e..2dfb94d8 100644 --- a/skyvern-frontend/src/routes/workflows/Workflows.tsx +++ b/skyvern-frontend/src/routes/workflows/Workflows.tsx @@ -50,7 +50,7 @@ const emptyWorkflowRequest: WorkflowCreateYAMLRequest = { title: "New Workflow", description: "", ai_fallback: true, - generate_script: false, + run_with: "agent", workflow_definition: { blocks: [], parameters: [], diff --git a/skyvern-frontend/src/routes/workflows/components/WorkflowVisualComparisonDrawer.tsx b/skyvern-frontend/src/routes/workflows/components/WorkflowVisualComparisonDrawer.tsx index 797b51f8..b723808e 100644 --- a/skyvern-frontend/src/routes/workflows/components/WorkflowVisualComparisonDrawer.tsx +++ b/skyvern-frontend/src/routes/workflows/components/WorkflowVisualComparisonDrawer.tsx @@ -124,7 +124,7 @@ function getWorkflowElements(version: WorkflowVersion) { extraHttpHeaders: version.extra_http_headers ? JSON.stringify(version.extra_http_headers) : null, - useScriptCache: version.generate_script, + runWith: version.run_with, scriptCacheKey: version.cache_key, aiFallback: version.ai_fallback ?? true, runSequentially: version.run_sequentially ?? false, diff --git a/skyvern-frontend/src/routes/workflows/debugger/Debugger.tsx b/skyvern-frontend/src/routes/workflows/debugger/Debugger.tsx index b001550d..e3fb415c 100644 --- a/skyvern-frontend/src/routes/workflows/debugger/Debugger.tsx +++ b/skyvern-frontend/src/routes/workflows/debugger/Debugger.tsx @@ -61,7 +61,7 @@ function Debugger() { extraHttpHeaders: workflow.extra_http_headers ? JSON.stringify(workflow.extra_http_headers) : null, - useScriptCache: workflow.generate_script, + runWith: workflow.run_with, scriptCacheKey: workflow.cache_key, aiFallback: workflow.ai_fallback ?? true, runSequentially: workflow.run_sequentially ?? false, diff --git a/skyvern-frontend/src/routes/workflows/editor/WorkflowEditor.tsx b/skyvern-frontend/src/routes/workflows/editor/WorkflowEditor.tsx index b7aae90f..fb8ebc9a 100644 --- a/skyvern-frontend/src/routes/workflows/editor/WorkflowEditor.tsx +++ b/skyvern-frontend/src/routes/workflows/editor/WorkflowEditor.tsx @@ -62,7 +62,7 @@ function WorkflowEditor() { extraHttpHeaders: workflow.extra_http_headers ? JSON.stringify(workflow.extra_http_headers) : null, - useScriptCache: workflow.generate_script, + runWith: workflow.run_with, scriptCacheKey: workflow.cache_key, aiFallback: workflow.ai_fallback ?? true, runSequentially: workflow.run_sequentially ?? false, diff --git a/skyvern-frontend/src/routes/workflows/editor/Workspace.tsx b/skyvern-frontend/src/routes/workflows/editor/Workspace.tsx index abaa7364..901b170d 100644 --- a/skyvern-frontend/src/routes/workflows/editor/Workspace.tsx +++ b/skyvern-frontend/src/routes/workflows/editor/Workspace.tsx @@ -720,7 +720,7 @@ function Workspace({ extraHttpHeaders: selectedVersion.extra_http_headers ? JSON.stringify(selectedVersion.extra_http_headers) : null, - useScriptCache: selectedVersion.generate_script, + runWith: selectedVersion.run_with, scriptCacheKey: selectedVersion.cache_key, aiFallback: selectedVersion.ai_fallback ?? true, runSequentially: selectedVersion.run_sequentially ?? false, 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 75231704..137ddb9a 100644 --- a/skyvern-frontend/src/routes/workflows/editor/nodes/StartNode/StartNode.tsx +++ b/skyvern-frontend/src/routes/workflows/editor/nodes/StartNode/StartNode.tsx @@ -79,7 +79,7 @@ function StartNode({ id, data }: NodeProps) { ? data.maxScreenshotScrolls : null, extraHttpHeaders: data.withWorkflowSettings ? data.extraHttpHeaders : null, - useScriptCache: data.withWorkflowSettings ? data.useScriptCache : false, + runWith: data.withWorkflowSettings ? data.runWith : "agent", scriptCacheKey: data.withWorkflowSettings ? data.scriptCacheKey : null, aiFallback: data.withWorkflowSettings ? data.aiFallback : true, runSequentially: data.withWorkflowSettings ? data.runSequentially : false, @@ -220,12 +220,9 @@ function StartNode({ id, data }: NodeProps) {