feat: KB Accelerator — convert KB articles into interactive flows #104
@@ -51,7 +51,15 @@ def _build_flow_context(tree: Tree, current_node_id: Optional[str]) -> str:
|
||||
node = _find_node(tree.tree_structure, current_node_id)
|
||||
if node:
|
||||
parts.append(f"Current node type: {node.get('type', 'unknown')}")
|
||||
parts.append(f"Current node: {node.get('content', node.get('label', 'Unknown'))}")
|
||||
node_label = (
|
||||
node.get('title')
|
||||
or node.get('question')
|
||||
or node.get('description')
|
||||
or node.get('content')
|
||||
or node.get('label')
|
||||
or 'Unknown'
|
||||
)
|
||||
parts.append(f"Current node: {node_label}")
|
||||
# Add options if it's a question/decision node
|
||||
children = node.get("children", [])
|
||||
if children and isinstance(children, list):
|
||||
|
||||
Reference in New Issue
Block a user