Skip to content

Commit e973040

Browse files
committed
fix: replace Unicode symbols in cache stats with plain text labels
Terminal renderer and WebUI now use 'in', 'out', 'created', 'read', 'cached' text labels instead of ⌂, ⎇, ⊕, ⊙, ⊡ symbols that don't render on all terminals/devices.
1 parent ad16186 commit e973040

2 files changed

Lines changed: 12 additions & 11 deletions

File tree

cmd/odek/ui/index.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1397,20 +1397,20 @@ <h3>Delete session?</h3>
13971397
stats.className = 'msg-stats';
13981398
const parts = [];
13991399
parts.push('⚡ ' + (event.latency < 1 ? (event.latency * 1000).toFixed(0) + 'ms' : event.latency.toFixed(1) + 's'));
1400-
if (event.contextTokens != null) parts.push('⌂ ' + formatNum(event.contextTokens));
1401-
if (event.outputTokens != null) parts.push('⎇ ' + formatNum(event.outputTokens));
1400+
if (event.contextTokens != null) parts.push(formatNum(event.contextTokens) + ' in');
1401+
if (event.outputTokens != null) parts.push(formatNum(event.outputTokens) + ' out');
14021402
// Cache metrics — show only when non-zero
1403-
if (event.cacheCreationTokens > 0) parts.push('⊕ ' + formatNum(event.cacheCreationTokens));
1404-
if (event.cacheReadTokens > 0) parts.push('⊙ ' + formatNum(event.cacheReadTokens));
1405-
if (event.cachedTokens > 0) parts.push('⊡ ' + formatNum(event.cachedTokens));
1403+
if (event.cacheCreationTokens > 0) parts.push(formatNum(event.cacheCreationTokens) + ' created');
1404+
if (event.cacheReadTokens > 0) parts.push(formatNum(event.cacheReadTokens) + ' read');
1405+
if (event.cachedTokens > 0) parts.push(formatNum(event.cachedTokens) + ' cached');
14061406
stats.textContent = parts.join(' · ');
14071407
lastAssistant.appendChild(stats);
14081408
}
14091409
}
14101410
// Update session-level token stats in top bar
14111411
const sessionStatsEl = document.getElementById('session-stats');
14121412
if (event.sessionContextTokens != null && event.sessionOutputTokens != null) {
1413-
const sessParts = ['∑ ' + formatNum(event.sessionContextTokens) + ' · ' + formatNum(event.sessionOutputTokens)];
1413+
const sessParts = ['∑ ' + formatNum(event.sessionContextTokens) + ' in · ' + formatNum(event.sessionOutputTokens) + ' out'];
14141414
if (event.cacheReadTokens > 0 || event.cacheCreationTokens > 0 || event.cachedTokens > 0) {
14151415
// Count total session cache stats (accumulated across the session)
14161416
// We store cache totals on the session-stats element's dataset

internal/render/render.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ func (r *Renderer) FinalAnswer(text string) {
207207
// Summary prints a run summary line with total token and cache statistics.
208208
// Emitted after the final answer when at least one stat is non-zero.
209209
// Shows: total input/output tokens, cache creation/read/cached tokens.
210+
// Uses plain text labels (no symbols) for cross-terminal compatibility.
210211
func (r *Renderer) Summary(inTokens, outTokens, cacheCreate, cacheRead, cached int) {
211212
if r.disable() {
212213
return
@@ -215,17 +216,17 @@ func (r *Renderer) Summary(inTokens, outTokens, cacheCreate, cacheRead, cached i
215216
return
216217
}
217218
parts := []string{
218-
fmt.Sprintf("%d in", inTokens),
219-
fmt.Sprintf("%d out", outTokens),
219+
fmt.Sprintf("%d in", inTokens),
220+
fmt.Sprintf("%d out", outTokens),
220221
}
221222
if cacheCreate > 0 {
222-
parts = append(parts, fmt.Sprintf("%d created", cacheCreate))
223+
parts = append(parts, fmt.Sprintf("%d created", cacheCreate))
223224
}
224225
if cacheRead > 0 {
225-
parts = append(parts, fmt.Sprintf("%d read", cacheRead))
226+
parts = append(parts, fmt.Sprintf("%d read", cacheRead))
226227
}
227228
if cached > 0 {
228-
parts = append(parts, fmt.Sprintf("%d cached", cached))
229+
parts = append(parts, fmt.Sprintf("%d cached", cached))
229230
}
230231
fmt.Fprintln(r.w, r.style(gray, "── "+strings.Join(parts, " · ")))
231232
fmt.Fprintln(r.w)

0 commit comments

Comments
 (0)