From 3ca5d2192d24c7e78a8069c01d4e9c37f89c1a67 Mon Sep 17 00:00:00 2001 From: Kailigithub <12250313+Kailigithub@users.noreply.github.com> Date: Tue, 7 Jul 2026 03:05:50 +0800 Subject: [PATCH] fix(stapp): raise Loop prompt textarea height from 1 to 68 to satisfy Streamlit minimum Streamlit enforces a minimum height of 68px on st.text_area; height=1 triggers StreamlitAPIException on every sidebar render, which collapses the whole page so the main chat input never appears (issue #632). --- frontends/stapp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontends/stapp.py b/frontends/stapp.py index 731e53ae6..46d2c58ed 100644 --- a/frontends/stapp.py +++ b/frontends/stapp.py @@ -142,7 +142,7 @@ def _pet_hook(ctx): field-sizing: content; min-height: 1.6em !important; height: auto !important; } """, unsafe_allow_html=True) - st.text_area("Loop prompt", value=st.session_state.get('loop_prompt_input', "继续" if LANG=='zh' else 'next'), key="loop_prompt_input", height=1) + st.text_area("Loop prompt", value=st.session_state.get('loop_prompt_input', "继续" if LANG=='zh' else 'next'), key="loop_prompt_input", height=68) if st.session_state.get('loop_enabled'): if st.button("⏹️ Stop Loop"): st.session_state.loop_enabled = False