feat(conversations): 支持删除对话并优化侧栏

This commit is contained in:
2026-06-08 21:39:38 +08:00
parent 2244b69d62
commit ef0a9ee13e
7 changed files with 918 additions and 17 deletions

View File

@@ -148,6 +148,14 @@ def conversation_list(request):
)
@require_http_methods(["DELETE"])
@login_required
def conversation_detail(request, conversation_id: int):
conversation = _conversation_for_user(request.user, conversation_id)
conversation.delete()
return JsonResponse({"ok": True, "conversation_id": conversation_id})
@require_http_methods(["GET"])
@login_required
def attachment_download(request, conversation_id: int, attachment_id: int):

View File

@@ -6,6 +6,7 @@ from .file_summary.views import (
attachments,
batch_events,
batch_status,
conversation_detail,
conversation_list,
conversation_messages,
export_download,
@@ -35,6 +36,11 @@ urlpatterns = [
conversation_list,
name="review_agent_conversation_list",
),
path(
"api/review-agent/conversations/<int:conversation_id>/",
conversation_detail,
name="review_agent_conversation_detail",
),
path(
"api/review-agent/conversations/<int:conversation_id>/attachments/",
attachments,