Spaces:
Sleeping
Sleeping
Update chat.py
Browse files
chat.py
CHANGED
|
@@ -199,6 +199,13 @@ def process_normal_query(prompt, api_key):
|
|
| 199 |
if code_blocks and len(code_blocks) > 0:
|
| 200 |
st.session_state.last_generated_code = code_blocks[0]
|
| 201 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 202 |
except Exception as e:
|
| 203 |
st.error(f"エラーが発生しました: {str(e)}")
|
| 204 |
else:
|
|
|
|
| 199 |
if code_blocks and len(code_blocks) > 0:
|
| 200 |
st.session_state.last_generated_code = code_blocks[0]
|
| 201 |
|
| 202 |
+
# 明示的に表示を更新するために変数を設定
|
| 203 |
+
st.session_state.ui_needs_update = True
|
| 204 |
+
|
| 205 |
+
# モバイルでは自動的にUI更新のためのフラグを設定
|
| 206 |
+
if st.session_state.mobile_mode:
|
| 207 |
+
st.rerun() # モバイルでは即座に画面を更新
|
| 208 |
+
|
| 209 |
except Exception as e:
|
| 210 |
st.error(f"エラーが発生しました: {str(e)}")
|
| 211 |
else:
|