From 0e494667465c8d13f13dfd8fa08a608a7269e5a6 Mon Sep 17 00:00:00 2001 From: bruce Date: Thu, 4 Jun 2026 02:35:23 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=BC=BA=E5=A4=84=E7=90=86?= =?UTF-8?q?=E5=8E=86=E5=8F=B2=E5=AF=BC=E5=87=BA=E8=AE=B0=E5=BD=95=E6=91=98?= =?UTF-8?q?=E8=A6=81=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/audit/services.py | 8 ++++++ templates/audit/log_detail.html | 6 +++++ tests/test_audit.py | 48 +++++++++++++++++++++++++++++++++ 3 files changed, 62 insertions(+) diff --git a/apps/audit/services.py b/apps/audit/services.py index 1262555..7eb9013 100644 --- a/apps/audit/services.py +++ b/apps/audit/services.py @@ -151,6 +151,7 @@ def build_detail_summary(log: AgentAuditLog, conversation, notifications) -> dic 详情页模板只负责展示,字段拼装与优先级判断统一放在服务层。 """ structured_output = log.structured_output or {} + output_file = structured_output.get("output_file") or {} export_node = None if conversation and conversation.node_results: export_node = next( @@ -161,6 +162,13 @@ def build_detail_summary(log: AgentAuditLog, conversation, notifications) -> dic return { "export_status": structured_output.get("export_status") or (export_node or {}).get("status", "-"), "download_url": structured_output.get("download_url", ""), + "output_file_name": output_file.get("file_name", ""), + "output_file_relative_path": output_file.get("relative_path", ""), + "export_mode": output_file.get("export_mode", ""), + "template_name": structured_output.get("template_name", ""), + "template_version": structured_output.get("template_version", ""), + "draft_export_status": structured_output.get("draft_export_status", ""), + "formal_export_status": structured_output.get("formal_export_status", ""), "blocked_items": structured_output.get("blocked_items") or [], "notification_receipt": latest_notification.receipt if latest_notification else {}, } diff --git a/templates/audit/log_detail.html b/templates/audit/log_detail.html index 7a15396..e23020b 100644 --- a/templates/audit/log_detail.html +++ b/templates/audit/log_detail.html @@ -57,6 +57,12 @@

导出状态摘要