fix: bug when delete chat session

This commit is contained in:
liunux4odoo 2023-08-10 13:06:30 +08:00
parent d89fcb3b2e
commit 7a57f67587
1 changed files with 3 additions and 2 deletions

View File

@ -59,8 +59,9 @@ def dialogue_page(api: ApiRequest):
if cols[1].button("Clear"):
chat_box.reset_history()
if cols[2].button("Delete"):
chat_box.del_chat_name(cur_chat_name, disabled=len(chat_list) <= 1)
if cols[2].button("Delete", disabled=len(chat_list) <= 1):
chat_box.del_chat_name(cur_chat_name)
st.experimental_rerun()
def on_mode_change():
mode = st.session_state.dialogue_mode