Enhance workflow engine and integration in backend and frontend

- Introduce a new WorkflowEngine class to manage workflow graphs, enabling dynamic node-based interactions.
- Update AssistantConfig to include a graph field for workflow definitions, allowing for flexible configuration.
- Modify pipeline execution to support workflow-driven dialogue, integrating node transitions and system prompts based on active nodes.
- Enhance frontend components to visualize active nodes and provide debugging capabilities, including highlighting the current node during interactions.
- Refactor existing components to accommodate new workflow functionalities and improve overall user experience.
This commit is contained in:
Xin Wang
2026-06-15 15:32:10 +08:00
parent c2a39257ff
commit aae0342a57
10 changed files with 361 additions and 16 deletions

View File

@@ -23,7 +23,7 @@ NODE_SPECS: list[dict[str, Any]] = [
"name": "startCall",
"displayName": "开始",
"category": "call_node",
"description": "工作流入口,每个流程有且仅有一个。播放开场白并进入首个节点",
"description": "工作流入口,每个流程有且仅有一个。播放开场白,并用自己的提示词进行多轮对话,满足出边条件后流转",
"icon": "Play",
"accent": "mint",
"addable": False,
@@ -31,7 +31,7 @@ NODE_SPECS: list[dict[str, Any]] = [
"fields": [
{"key": "name", "label": "节点名称", "type": "text"},
{"key": "greeting", "label": "开场白", "type": "textarea"},
{"key": "prompt", "label": "全局提示词", "type": "textarea"},
{"key": "prompt", "label": "节点提示词", "type": "textarea"},
],
},
{