MCPcopy Create free account
hub / github.com/aws-samples/sample-devgenius-aws-solution-builder / welcome_sidebar

Function welcome_sidebar

chatbot/layout.py:89–141  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

87
88
89def welcome_sidebar():
90 logo_col, _ = st.columns([3, 1])
91
92 with logo_col:
93 # st.image("images/DevGenius.JPG", width=150)
94 st.title("✨ DevGenius App")
95 # Add a horizontal line for visual separation
96 st.divider()
97 # Add custom CSS for button styling and text handling
98 st.markdown("""
99 <style>
100 .stButton button {
101 background-color: #4CAF50; /* Blue background color */
102 color: black; /* Black text for contrast */
103 font-size: 18px; /* Set font size */
104 padding: 20px 50px; /* Add padding for larger button */
105 border-radius: 8px; /* Rounded corners */
106 width: auto; /* Let the width adjust based on the text */
107 text-align: center; /* Center the text inside the button */
108 white-space: nowrap; /* Prevent text from wrapping */
109 font-weight: bold; /* Make the text bold */
110 display: inline-block; /* Ensure the button is inline-block */
111 }
112 </style>
113 """, unsafe_allow_html=True)
114
115 if st.button("New Session", use_container_width=True):
116 st.session_state.user_authenticated = False
117 st.session_state.messages = []
118 st.session_state.mod_messages = []
119 st.rerun()
120
121 st.divider()
122 # Bottom divider and session ID
123 # st.divider()
124 # st.write(f"SessionID: {st.session_state.conversation_id}")
125 # Add the CSS style
126 st.markdown("""
127 <style>
128 .small-font {
129 font-size: 12px;
130 color: #666;
131 margin: 0;
132 }
133 </style>
134 """, unsafe_allow_html=True)
135
136 # Use the class
137 st.markdown(f"""
138 <p class='small-font'>
139 SessionID: {st.session_state.conversation_id}
140 </p>
141 """, unsafe_allow_html=True)
142
143
144def create_tabs():

Callers 1

agent.pyFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected