From c7eb9a82b5197d72345ef6e7923b1b2c6998ff01 Mon Sep 17 00:00:00 2001 From: Neermita18 Date: Sat, 26 Jul 2025 20:55:45 +0530 Subject: [PATCH 1/2] UI-Enhancements #39 --- TalkHeal.py | 6 +++++- components/sidebar.py | 16 +++++++++++++--- css/styles.py | 2 +- streamlit.toml | 1 - 4 files changed, 19 insertions(+), 6 deletions(-) delete mode 100644 streamlit.toml diff --git a/TalkHeal.py b/TalkHeal.py index f99cfb6..aa4fdd2 100644 --- a/TalkHeal.py +++ b/TalkHeal.py @@ -93,7 +93,11 @@ def get_tone_prompt(): else: with main_area: render_header() - st.subheader(f"🗣️ Current Chatbot Tone: **{st.session_state['selected_tone']}**") + st.markdown(f""" +
+

🗣️ Current Chatbot Tone: {st.session_state['selected_tone']}

+
+""", unsafe_allow_html=True) render_chat_interface() handle_chat_input(model, system_prompt=get_tone_prompt()) diff --git a/components/sidebar.py b/components/sidebar.py index 208d066..f90f7a7 100644 --- a/components/sidebar.py +++ b/components/sidebar.py @@ -125,9 +125,19 @@ def render_sidebar(): st.session_state.active_conversation = i st.rerun() with col2: - if st.button("🗑️", key=f"delete_{i}", type="primary"): - st.session_state.delete_candidate = i - st.rerun() + if convo["messages"]: + if st.button("🗑️", key=f"delete_{i}", type="primary", use_container_width=True): + st.session_state.delete_candidate = i + st.rerun() + else: + st.button( + "🗑️", + key=f"delete_{i}", + type="primary", + use_container_width=True, + disabled=not convo["messages"] # Disable if it's a new/empty conversation + ) + else: st.warning( diff --git a/css/styles.py b/css/styles.py index b4ee017..525f831 100644 --- a/css/styles.py +++ b/css/styles.py @@ -498,7 +498,7 @@ def apply_custom_css(): .stTextInput > div > div > input, .stTextArea > div > div > textarea {{ background: var(--glass-effect) !important; - background-color: #FFFFD0 !important; + background-color: #FFDDEE !important; border: 2px solid var(--border) !important; border-radius: var(--radius) !important; font-size: 1em !important; diff --git a/streamlit.toml b/streamlit.toml deleted file mode 100644 index 0a23a05..0000000 --- a/streamlit.toml +++ /dev/null @@ -1 +0,0 @@ -GEMINI_API_KEY = "AIzaSyDsLJgA58LvgFtnUdVBLFb08GZQV0wXYjQ" From f8e2c90d7e8cfaf259893c6db647dd99bf4c6ddc Mon Sep 17 00:00:00 2001 From: Neermita18 Date: Sun, 27 Jul 2025 14:02:44 +0530 Subject: [PATCH 2/2] add streamlit.toml --- streamlit.toml | 1 + 1 file changed, 1 insertion(+) create mode 100644 streamlit.toml diff --git a/streamlit.toml b/streamlit.toml new file mode 100644 index 0000000..9aa7542 --- /dev/null +++ b/streamlit.toml @@ -0,0 +1 @@ +GEMINI_API_KEY = "AIzaSyDsLJgA58LvgFtnUdVBLFb08GZQV0wXYjQ" \ No newline at end of file