feat: 详情弹窗用户信息改为昵称+ID格式
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -48,8 +48,8 @@
|
||||
<span class="info-value">{{ log.streamChunks ?? '-' }}</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="info-label">用户 ID</span>
|
||||
<span class="info-value">{{ log.userId || '-' }}</span>
|
||||
<span class="info-label">调用用户</span>
|
||||
<span class="info-value">{{ userDisplay(log) }}</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="info-label">请求 ID</span>
|
||||
@@ -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 '-'
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
Reference in New Issue
Block a user