migrate generate_script -> run_with (FE) (#3555)

This commit is contained in:
Jonathan Dobson
2025-09-29 18:59:31 -04:00
committed by GitHub
parent c7ba5a5911
commit d4de6a4d09
13 changed files with 19 additions and 22 deletions

View File

@@ -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,

View File

@@ -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,

View File

@@ -79,7 +79,7 @@ function StartNode({ id, data }: NodeProps<StartNode>) {
? 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<StartNode>) {
<HelpTooltip content="If code has been generated and saved from a previously successful run, set this to 'Code' to use that code when executing the workflow. To avoid using code, set this to 'Skyvern Agent'." />
</div>
<Select
value={!inputs.useScriptCache ? "ai" : "code"}
value={inputs.runWith ?? "agent"}
onValueChange={(value) => {
handleChange(
"useScriptCache",
value === "code",
);
handleChange("runWith", value);
}}
>
<SelectTrigger className="w-48">

View File

@@ -12,7 +12,7 @@ export type WorkflowStartNodeData = {
maxScreenshotScrolls: number | null;
extraHttpHeaders: string | null;
editable: boolean;
useScriptCache: boolean;
runWith: string | null;
scriptCacheKey: string | null;
aiFallback: boolean;
runSequentially: boolean;

View File

@@ -149,7 +149,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,

View File

@@ -703,7 +703,7 @@ function getElements(
maxScreenshotScrolls: settings.maxScreenshotScrolls,
extraHttpHeaders: settings.extraHttpHeaders,
editable,
useScriptCache: settings.useScriptCache,
runWith: settings.runWith,
scriptCacheKey: settings.scriptCacheKey,
aiFallback: settings.aiFallback ?? true,
label: "__start_block__",
@@ -1417,7 +1417,7 @@ function getWorkflowSettings(nodes: Array<AppNode>): WorkflowSettings {
model: null,
maxScreenshotScrolls: null,
extraHttpHeaders: null,
useScriptCache: false,
runWith: "agent",
scriptCacheKey: null,
aiFallback: true,
runSequentially: false,
@@ -1439,7 +1439,7 @@ function getWorkflowSettings(nodes: Array<AppNode>): WorkflowSettings {
model: data.model,
maxScreenshotScrolls: data.maxScreenshotScrolls,
extraHttpHeaders: data.extraHttpHeaders,
useScriptCache: data.useScriptCache,
runWith: data.runWith,
scriptCacheKey: data.scriptCacheKey,
aiFallback: data.aiFallback,
runSequentially: data.runSequentially,
@@ -2133,7 +2133,7 @@ function convert(workflow: WorkflowApiResponse): WorkflowCreateYAMLRequest {
blocks: convertBlocksToBlockYAML(workflow.workflow_definition.blocks),
},
is_saved_task: workflow.is_saved_task,
generate_script: workflow.generate_script,
run_with: workflow.run_with,
cache_key: workflow.cache_key,
ai_fallback: workflow.ai_fallback ?? undefined,
run_sequentially: workflow.run_sequentially ?? undefined,