make ai fallback true by default (#3380)

This commit is contained in:
Jonathan Dobson
2025-09-06 08:51:11 -07:00
committed by GitHub
parent fe18b307c4
commit 21b3f6d36a
6 changed files with 11 additions and 7 deletions

View File

@@ -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() {

View File

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

View File

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

View File

@@ -82,7 +82,7 @@ function StartNode({ id, data }: NodeProps<StartNode>) {
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");

View File

@@ -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<AppNode>): WorkflowSettings {
extraHttpHeaders: null,
useScriptCache: false,
scriptCacheKey: null,
aiFallback: false,
aiFallback: true,
};
const startNodes = nodes.filter(isStartNode);
const startNodeWithWorkflowSettings = startNodes.find(

View File

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