fix: Add human-readable labels to workflow nodes in debug output
- workflow_executor.py: Store prompt_slug or generated label in debug_prompt_slug for all nodes - This makes it easy to identify nodes in the debug panel - Example: 'wf_nutrition_basis' instead of 'node_5' - Helps identify which node is which when debugging workflows
This commit is contained in:
parent
a515a5d563
commit
7388776b29
|
|
@ -166,13 +166,16 @@ async def execute_workflow(
|
||||||
enable_debug=enable_debug
|
enable_debug=enable_debug
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Add human-readable label to node_state for debug UI
|
||||||
|
node_label = node.prompt_slug if hasattr(node, 'prompt_slug') and node.prompt_slug else f"{node.type.value}-{node_id[:8]}"
|
||||||
|
if not node_state.debug_prompt_slug:
|
||||||
|
node_state.debug_prompt_slug = node_label
|
||||||
|
|
||||||
node_states.append(node_state)
|
node_states.append(node_state)
|
||||||
context["node_results"][node_id] = node_state
|
context["node_results"][node_id] = node_state
|
||||||
|
|
||||||
# NEW: Progress-Callback aufrufen (für SSE Streaming)
|
# NEW: Progress-Callback aufrufen (für SSE Streaming)
|
||||||
if progress_callback:
|
if progress_callback:
|
||||||
# Create a meaningful label for the node
|
|
||||||
node_label = node.prompt_slug if hasattr(node, 'prompt_slug') and node.prompt_slug else f"{node.type.value}-{node_id[:8]}"
|
|
||||||
await progress_callback("node_complete", {
|
await progress_callback("node_complete", {
|
||||||
"node_id": node_id,
|
"node_id": node_id,
|
||||||
"node_type": node.type,
|
"node_type": node.type,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user