feat: show feishu notification status

This commit is contained in:
2026-06-07 22:13:56 +08:00
parent cbc7493df8
commit 1a1b3ee9d4
9 changed files with 191 additions and 5 deletions

View File

@@ -9,6 +9,7 @@ from django.views.decorators.http import require_http_methods
from review_agent.models import ApplicationFormFillBatch, Conversation, ExportedSummaryFile, FileAttachment, Message
from review_agent.models import FileSummaryBatch, WorkflowEvent
from review_agent.notifications.presenter import serialize_notification_records
from .events import serialize_event
from .paths import resolve_storage_path
@@ -225,6 +226,7 @@ def batch_status(request, batch_id: int):
batch = FileSummaryBatch.objects.filter(pk=batch_id, user=request.user).first()
if not batch:
raise Http404("批次不存在。")
notifications = serialize_notification_records("file_summary", batch.pk)
return JsonResponse(
{
"batch": {
@@ -249,6 +251,8 @@ def batch_status(request, batch_id: int):
}
for node in batch.node_runs.order_by("id")
],
"notifications": notifications,
"latest_notification": notifications[0] if notifications else None,
}
)