feat(workflow): expose workflow memory enable status in app share config API

This commit is contained in:
Eternity
2026-03-17 18:01:28 +08:00
parent 8ddacb7bc9
commit 3b8a806661
2 changed files with 9 additions and 0 deletions

View File

@@ -868,6 +868,14 @@ class WorkflowService:
return node.get("config", {}).get("variables", [])
raise BusinessException("workflow config error - start node not found")
@staticmethod
def is_memory_enable(config: dict) -> bool:
nodes = config.get("nodes", [])
for node in nodes:
if node.get("type") in [NodeType.MEMORY_READ, NodeType.MEMORY_WRITE]:
return True
return False
# ==================== 依赖注入函数 ====================