ADMP-LS / client /ui_components /main_components.py
jackkuo's picture
reinit repo
82bf89e
import streamlit as st
import json
# Function to display tool execution details
def display_tool_executions():
if st.session_state.tool_executions:
with st.expander("Tool Execution History", expanded=False):
for i, exec_record in enumerate(st.session_state.tool_executions):
st.markdown(f"### Execution #{i+1}: `{exec_record['tool_name']}`")
st.markdown(f"**Input:** ```json{json.dumps(exec_record['input'])}```")
st.markdown(f"**Output:** ```{exec_record['output'][:250]}...```")
st.markdown(f"**Time:** {exec_record['timestamp']}")
st.divider()