feat: expose workflow execution modes in editor
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user