feat(conversations): 支持删除对话并优化侧栏
This commit is contained in:
@@ -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):
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user