ใ……ใ…Žใ…‡ commited on
Commit
40e39e0
ยท
1 Parent(s): 1ffb9f7

Fix: Clear chatbot and textbox when clearing chat - Update clear button to reset chatbot, session_id, and textbox - Fix issue where only session_id was being reset

Browse files
Files changed (1) hide show
  1. CodeWeaver/ui/app.py +3 -4
CodeWeaver/ui/app.py CHANGED
@@ -174,14 +174,13 @@ def create_demo() -> gr.Blocks:
174
 
175
  def clear_chat_and_reset():
176
  # ๋Œ€ํ™” ์ดˆ๊ธฐํ™” ๋ฐ ์„ธ์…˜ ID ๋ฆฌ์…‹
177
- return [], str(uuid.uuid4())
178
 
179
- # Clear ๋ฒ„ํŠผ ํด๋ฆญ ์‹œ ๋Œ€ํ™”์™€ ์„ธ์…˜ ID ๋ชจ๋‘ ๋ฆฌ์…‹
180
- # ChatInterface์˜ chatbot_value ์‚ฌ์šฉ (๊ณต์‹ ๋ฌธ์„œ ํŒจํ„ด)
181
  clear_chat_btn.click(
182
  clear_chat_and_reset,
183
  None,
184
- [chatbot_interface.chatbot_value, session_id_input],
185
  queue=False
186
  )
187
 
 
174
 
175
  def clear_chat_and_reset():
176
  # ๋Œ€ํ™” ์ดˆ๊ธฐํ™” ๋ฐ ์„ธ์…˜ ID ๋ฆฌ์…‹
177
+ return [], str(uuid.uuid4()), ""
178
 
179
+ # Clear ๋ฒ„ํŠผ ํด๋ฆญ ์‹œ ๋Œ€ํ™”, ์„ธ์…˜ ID, ์ž…๋ ฅ์ฐฝ ๋ชจ๋‘ ๋ฆฌ์…‹
 
180
  clear_chat_btn.click(
181
  clear_chat_and_reset,
182
  None,
183
+ [chatbot, session_id_input, chatbot_interface.textbox],
184
  queue=False
185
  )
186