feat: expose workflow execution modes in editor

This commit is contained in:
2026-04-07 11:10:58 +02:00
parent f9d4da52b9
commit 26046fb2d6
7 changed files with 147 additions and 16 deletions
@@ -171,7 +171,10 @@ def build_preset_workflow_config(
"version": 1,
"nodes": nodes,
"edges": edges,
"ui": {"preset": preset_type},
"ui": {
"preset": preset_type,
"execution_mode": "legacy",
},
}
@@ -214,7 +217,10 @@ def _canonicalize_legacy_custom_config(raw: dict[str, Any]) -> dict[str, Any]:
"version": 1,
"nodes": nodes,
"edges": edges,
"ui": {"preset": "custom"},
"ui": {
"preset": "custom",
"execution_mode": "legacy",
},
}
@@ -225,6 +231,11 @@ def canonicalize_workflow_config(raw: dict[str, Any]) -> dict[str, Any]:
if "version" in raw and "nodes" in raw:
normalized = deepcopy(raw)
normalized.setdefault("edges", [])
ui = normalized.get("ui")
if not isinstance(ui, dict):
ui = {}
normalized["ui"] = dict(ui)
normalized["ui"].setdefault("execution_mode", "legacy")
return normalized
workflow_type = raw.get("type")