INNER CODE UNIT · Python
initialize_session_state
VersusControl/devops-ai-guidelines · 03-ai-agent-for-devops/code/08/app.py:28
def initialize_session_state():
"""Initialize Streamlit session state variables"""
if 'messages' not in st.session_state:
st.session_state.messages = []
if 'agent' not in st.session_state:
try:
Config.validate()
st.session_state.agent = LogAnalyzerAgent()
except ValueError as e:
st.error(f"Configuration error: {e}")
st.stop()
def display_sidebar():
"""Display sidebar with information and controls"""
with st.sidebar:
st.title("🔍 AI Log Analyzer")