Yasu777 commited on
Commit
c7d80b8
·
verified ·
1 Parent(s): c513a58

Update chat.py

Browse files
Files changed (1) hide show
  1. chat.py +7 -0
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: