Spaces:
Runtime error
Runtime error
Update ui/agent_workflow.py
Browse files- ui/agent_workflow.py +2 -12
ui/agent_workflow.py
CHANGED
|
@@ -1,4 +1,3 @@
|
|
| 1 |
-
# agent_workflow.py
|
| 2 |
"""
|
| 3 |
Agent workflow UI component for the pharmaceutical data management agent.
|
| 4 |
"""
|
|
@@ -14,17 +13,8 @@ def render_workflow_tab(session_state):
|
|
| 14 |
"""
|
| 15 |
st.subheader("Agent Workflow Visualization")
|
| 16 |
|
| 17 |
-
# Display current agent and status
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
# Handle both string and list types for current_agent
|
| 21 |
-
if isinstance(current_agent_raw, list):
|
| 22 |
-
# Get the last agent in the list if it's not empty
|
| 23 |
-
current_agent = current_agent_raw[-1] if current_agent_raw else "understanding_agent"
|
| 24 |
-
else:
|
| 25 |
-
# If it's already a string, use it directly
|
| 26 |
-
current_agent = current_agent_raw
|
| 27 |
-
|
| 28 |
status = session_state.conversation.get("status", "planning")
|
| 29 |
|
| 30 |
st.markdown(f"**Current State:** {status.title()}")
|
|
|
|
|
|
|
| 1 |
"""
|
| 2 |
Agent workflow UI component for the pharmaceutical data management agent.
|
| 3 |
"""
|
|
|
|
| 13 |
"""
|
| 14 |
st.subheader("Agent Workflow Visualization")
|
| 15 |
|
| 16 |
+
# Display current agent and status - ensure it's consistent
|
| 17 |
+
current_agent = session_state.conversation.get("current_agent", "understanding_agent")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
status = session_state.conversation.get("status", "planning")
|
| 19 |
|
| 20 |
st.markdown(f"**Current State:** {status.title()}")
|