Skip to content

Commit

Permalink
bugfix: 修复重命名/删除历史记录时遗留多余的md文件的问题 fix #950
Browse files Browse the repository at this point in the history
  • Loading branch information
GaiZhenbiao committed Nov 17, 2023
1 parent 4469696 commit 9e09956
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modules/models/base_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -811,8 +811,10 @@ def delete_chat_history(self, filename, user_name):
history_file_path = os.path.join(HISTORY_DIR, user_name, filename)
else:
history_file_path = filename
md_history_file_path = history_file_path[:-5] + ".md"
try:
os.remove(history_file_path)
os.remove(md_history_file_path)
return i18n("删除对话历史成功"), get_history_list(user_name), []
except:
logging.info(f"删除对话历史失败 {history_file_path}")
Expand Down

0 comments on commit 9e09956

Please sign in to comment.