This commit is contained in:
@@ -60,6 +60,8 @@ class AppState:
|
||||
"""
|
||||
st.session_state.user_id = username.strip() if username.strip() else config.default_user_id
|
||||
st.session_state.logged_in = True
|
||||
# 登录后必须开启一个干净的新对话
|
||||
AppState.start_new_thread()
|
||||
|
||||
@staticmethod
|
||||
def logout():
|
||||
@@ -67,6 +69,8 @@ class AppState:
|
||||
st.session_state.logged_in = False
|
||||
st.session_state.user_id = config.default_user_id
|
||||
st.session_state.threads = []
|
||||
# 登出后必须开启一个干净的新对话
|
||||
AppState.start_new_thread()
|
||||
|
||||
# ==================== 线程相关 ====================
|
||||
|
||||
|
||||
Reference in New Issue
Block a user