From 613e8ec3ffa8625e9a867a7415c5d42b39ab2fc7 Mon Sep 17 00:00:00 2001 From: Peanut Date: Mon, 25 May 2026 22:46:11 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=AF=A6=E6=83=85=E5=BC=B9=E7=AA=97?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E4=BF=A1=E6=81=AF=E6=94=B9=E4=B8=BA=E6=98=B5?= =?UTF-8?q?=E7=A7=B0+ID=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.7 --- .../aiconfig/components/AiCallLogDetailDialog.vue | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/web-admin/src/views/aiconfig/components/AiCallLogDetailDialog.vue b/web-admin/src/views/aiconfig/components/AiCallLogDetailDialog.vue index 44a0a81..9bc8a01 100644 --- a/web-admin/src/views/aiconfig/components/AiCallLogDetailDialog.vue +++ b/web-admin/src/views/aiconfig/components/AiCallLogDetailDialog.vue @@ -48,8 +48,8 @@ {{ log.streamChunks ?? '-' }}
- 用户 ID - {{ log.userId || '-' }} + 调用用户 + {{ userDisplay(log) }}
请求 ID @@ -112,6 +112,15 @@ function formatMs(ms?: number) { if (ms == null) return '-' return ms >= 1000 ? `${(ms / 1000).toFixed(2)}s` : `${ms}ms` } + +function userDisplay(log: AiCallLog): string { + const name = log.userName + const id = log.userId + if (name && id) return `${name}(${id})` + if (name) return name + if (id) return `-(ID: ${id})` + return '-' +}