feat(chat): 会话列表支持批量删除 - #3792
Merged
Merged
Conversation
实现批量删除会话的接口,包含请求模型、API路由、业务服务和数据库批量删除操作,支持级联软删除关联数据并返回删除结果统计
1. 新增批量删除会话的API端点和服务方法 2. 添加多语言的批量管理相关文案 3. 重构会话列表侧边栏,加入批量选择功能 4. 优化侧边栏样式细节,修复缩进问题
新增了批量删除对话的数据库层、业务层测试,以及对应的API接口端点,覆盖正常成功场景、无权限场景和异常报错场景,完善批量删除对话的全流程测试覆盖
修复聊天列表侧边栏和批量操作按钮无背景色导致的视觉不协调问题,统一按钮背景样式
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
1. 将两处普通error日志替换为exception日志以打印堆栈信息 2. 更新测试用例中的日志断言匹配 3. 新增批量删除对话的自动化钩子相关测试,包括正常调用、失败不阻塞、导入失败场景
…github.com/ModelEngine-Group/nexent into dc/feat/conversation-batch-delete-20260827
补充验证当不传入user_id时,delete_conversations_batch会跳过updated_by相关的更新跟踪逻辑,确保该场景下功能正常运行
charmingchi1
marked this pull request as ready for review
August 28, 2026 03:05
charmingchi1
requested review from
Dallas98,
WMC001 and
jeffwu-1999
as code owners
August 28, 2026 03:05
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概述
为对话侧边栏的会话列表新增批量删除能力:用户可进入"批量管理"模式多选会话一次性删除,替代逐条删除的低效操作。
变更内容
后端
POST /conversation/batch-delete接口,请求体为BatchDeleteConversationRequest { conversation_ids: List[int] }created_by过滤),不存在的 ID 或他人的 ID 返回到failed_ids{ deleted_count, failed_ids }前端