diff --git a/src/renderer/components/chat-area.ts b/src/renderer/components/chat-area.ts
index 15c4a0f..40f2bc0 100644
--- a/src/renderer/components/chat-area.ts
+++ b/src/renderer/components/chat-area.ts
@@ -158,11 +158,12 @@ export function appendMessageDOM(msg: ChatMessage, index: number): void {
}
const stats: string[] = [];
- if (msg.timestamp) stats.push(formatTime(msg.timestamp));
- if (msg.eval_count != null && msg.eval_count > 0) stats.push(`${msg.eval_count} tokens`);
- if (msg.total_duration != null && msg.total_duration > 0) stats.push(`${(msg.total_duration / 1e9).toFixed(1)}s`);
+ const statClasses: string[] = [];
+ if (msg.timestamp) { stats.push(formatTime(msg.timestamp)); statClasses.push(''); }
+ if (msg.eval_count != null && msg.eval_count > 0) { stats.push(`${msg.eval_count} tokens`); statClasses.push('stat-tokens'); }
+ if (msg.total_duration != null && msg.total_duration > 0) { stats.push(`${(msg.total_duration / 1e9).toFixed(1)}s`); statClasses.push('stat-duration'); }
if (stats.length > 0) {
- contentHtml += `
${stats.map(s => `${s}`).join(' · ')}
`;
+ contentHtml += `${stats.map((s, i) => `${s}`).join(' · ')}
`;
}
if (msg.role === 'assistant' && msg.ragSources && msg.ragSources.length > 0) {
@@ -337,8 +338,8 @@ export function updateLastAssistantMessage(content: string, think: string | null
lastMsg.querySelector('.msg-body')!.appendChild(statsDiv);
}
const parts: string[] = [];
- if (stats.eval_count != null && stats.eval_count > 0) parts.push(`${stats.eval_count} tokens`);
- if (stats.total_duration != null && stats.total_duration > 0) parts.push(`${(stats.total_duration / 1e9).toFixed(1)}s`);
+ if (stats.eval_count != null && stats.eval_count > 0) parts.push(`${stats.eval_count} tokens`);
+ if (stats.total_duration != null && stats.total_duration > 0) parts.push(`${(stats.total_duration / 1e9).toFixed(1)}s`);
if (parts.length) statsDiv.innerHTML = parts.join(' · ');
}
diff --git a/src/renderer/styles/style.css b/src/renderer/styles/style.css
index 3271b7d..eb874df 100644
--- a/src/renderer/styles/style.css
+++ b/src/renderer/styles/style.css
@@ -376,8 +376,9 @@ html, body {
margin-left: 8px;
padding: 2px 8px;
font-size: 11px;
- color: var(--text-secondary);
- background: var(--bg-subtle, rgba(255,255,255,0.04));
+ color: #FFD580;
+ background: rgba(255, 213, 128, 0.06);
+ border: 1px solid rgba(255, 213, 128, 0.12);
border-radius: 10px;
white-space: nowrap;
user-select: none;
@@ -387,7 +388,7 @@ html, body {
width: 14px;
height: 14px;
flex-shrink: 0;
- opacity: 0.8;
+ color: #FFD580;
}
/* ═══ 模型选择栏 ═══ */
@@ -1004,6 +1005,14 @@ html, body {
color: var(--text-tertiary);
}
+.msg-stats .stat-tokens {
+ color: #FFD580;
+}
+
+.msg-stats .stat-duration {
+ color: var(--accent);
+}
+
/* RAG 知识库来源 */
.rag-sources {
margin-top: 8px;