fix: Token趋势图数值区分输入/输出颜色
This commit is contained in:
@@ -148,7 +148,10 @@ function renderDashboard(): void {
|
||||
const tooltip = `第${r.round}轮 · 输入 ${formatTokenCount(r.prompt_eval_count)} + 输出 ${formatTokenCount(r.eval_count)} = ${formatTokenCount(total)} tokens · ${formatDuration(r.total_duration)}`;
|
||||
return `
|
||||
<div class="td-bar-col" title="${tooltip}">
|
||||
<div class="td-bar-value">${formatTokenCount(total)}</div>
|
||||
<div class="td-bar-values">
|
||||
<span class="td-val-output">${formatTokenCount(r.eval_count)}</span>
|
||||
<span class="td-val-input">${formatTokenCount(r.prompt_eval_count)}</span>
|
||||
</div>
|
||||
<div class="td-bar" style="height:${heightPct}%;">
|
||||
<div class="td-bar-fill">
|
||||
<div class="td-bar-input" style="height:${inputPct}%;"></div>
|
||||
|
||||
@@ -3595,14 +3595,25 @@ html, body {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.td-bar-value {
|
||||
.td-bar-values {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 1px;
|
||||
margin-bottom: 2px;
|
||||
font-size: 9px;
|
||||
font-family: var(--font-mono);
|
||||
color: var(--text-secondary);
|
||||
margin-bottom: 2px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.td-val-output {
|
||||
color: #E8734A;
|
||||
}
|
||||
|
||||
.td-val-input {
|
||||
color: #9B7ED8;
|
||||
}
|
||||
|
||||
.td-bar {
|
||||
width: 100%;
|
||||
border-radius: 4px 4px 0 0;
|
||||
|
||||
Reference in New Issue
Block a user