优化管理后台对话显示样式

This commit is contained in:
RockYang
2025-05-28 22:55:53 +08:00
parent eea57790de
commit 97e489901a
5 changed files with 210 additions and 136 deletions

View File

@@ -104,8 +104,6 @@ func (h *ChatHandler) Clear(c *gin.Context) {
var chatIds = make([]string, 0)
for _, chat := range chats {
chatIds = append(chatIds, chat.ChatId)
// 清空会话上下文
h.ChatContexts.Delete(chat.ChatId)
}
err = h.DB.Transaction(func(tx *gorm.DB) error {
res := h.DB.Where("user_id =?", user.Id).Delete(&model.ChatItem{})
@@ -187,10 +185,6 @@ func (h *ChatHandler) Remove(c *gin.Context) {
return
}
// TODO: 是否要删除 MidJourney 绘画记录和图片文件?
// 清空会话上下文
h.ChatContexts.Delete(chatId)
resp.SUCCESS(c, types.OkMsg)
}