In Workflow Settings, disable the "Generate Code" toggle, and always set it to true. (#3471)

This commit is contained in:
Jonathan Dobson
2025-09-18 20:40:01 -04:00
committed by GitHub
parent f283958a52
commit a39ff77bd9

View File

@@ -72,7 +72,7 @@ function StartNode({ id, data }: NodeProps<StartNode>) {
? data.maxScreenshotScrolls
: null,
extraHttpHeaders: data.withWorkflowSettings ? data.extraHttpHeaders : null,
useScriptCache: data.withWorkflowSettings ? data.useScriptCache : false,
useScriptCache: data.withWorkflowSettings ? data.useScriptCache : true, // TODO(jdo/always-generate): set to false
scriptCacheKey: data.withWorkflowSettings ? data.scriptCacheKey : null,
aiFallback: data.withWorkflowSettings ? data.aiFallback : true,
runSequentially: data.withWorkflowSettings ? data.runSequentially : false,
@@ -211,11 +211,14 @@ function StartNode({ id, data }: NodeProps<StartNode>) {
<Label>Generate Code</Label>
<HelpTooltip content="Generate & use cached code for faster execution." />
<Switch
disabled={true} // TODO(jdo/always-generate): remove
className="ml-auto"
checked={inputs.useScriptCache}
onCheckedChange={(value) => {
handleChange("useScriptCache", value);
}}
checked={true} // TODO(jdo/always-generate): set to `inputs.useScriptCache`
onCheckedChange={
(/*value*/) => {
// handleChange("useScriptCache", value); // TODO(jdo/always-generate): put back
}
}
/>
</div>
</div>