refactor(workflow): simplify edge configuration

This commit is contained in:
Xin Wang
2026-08-03 15:17:01 +08:00
parent dd40bfb90a
commit 8064bb7152
10 changed files with 53 additions and 205 deletions

View File

@@ -132,6 +132,17 @@ class WorkflowGraphTests(unittest.TestCase):
self.assertEqual(cleaned_agent["data"]["entryMode"], "wait_user")
self.assertNotIn("entrySpeech", cleaned_agent["data"])
def test_edge_speech_fields_are_removed(self):
graph = valid_graph()
graph["edges"][0]["data"]["transitionSpeech"] = "不再播放"
graph["edges"][1]["data"]["transition_speech"] = "旧字段也不再播放"
normalized = normalize_graph(graph)
for edge in normalized["edges"]:
self.assertNotIn("transitionSpeech", edge["data"])
self.assertNotIn("transition_speech", edge["data"])
def test_action_defaults_preserve_legacy_result_assignment_behavior(self):
graph = valid_graph()
graph["nodes"].extend(