From 24a0c813e23afceb74f0c1daece810bc2900a287 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AC=E6=98=8E?= <83812544+Ed1s0nZ@users.noreply.github.com> Date: Wed, 6 May 2026 17:50:59 +0800 Subject: [PATCH] Add files via upload --- web/static/js/chat.js | 6 +++++- web/templates/index.html | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/web/static/js/chat.js b/web/static/js/chat.js index 53dda90f..ec1b04f3 100644 --- a/web/static/js/chat.js +++ b/web/static/js/chat.js @@ -2852,7 +2852,11 @@ async function loadConversation(conversationId) { } } - const messageId = addMessage(msg.role, displayContent, msg.mcpExecutionIds || [], null, msg.createdAt); + // 消息时间口径: + // - user: createdAt 即可(发送后不会再更新) + // - assistant: 如果后端提供 updatedAt(任务完成时写回),优先用它,避免占位消息“任务开始时间”误导 + const msgTime = (msg && msg.role === 'assistant' && msg.updatedAt) ? msg.updatedAt : (msg ? msg.createdAt : null); + const messageId = addMessage(msg.role, displayContent, msg.mcpExecutionIds || [], null, msgTime); const messageEl = document.getElementById(messageId); if (messageEl && msg && msg.id) { messageEl.dataset.backendMessageId = String(msg.id); diff --git a/web/templates/index.html b/web/templates/index.html index 981ceded..40151d9c 100644 --- a/web/templates/index.html +++ b/web/templates/index.html @@ -170,6 +170,14 @@ 漏洞管理 +
-