fix(ui): distinguish loading, failed and empty lists, one role label set, en dash for no value
This commit is contained in:
16 files changed
+95
-46
No files matched your search
@@ -187,7 +187,7 @@ const rate = (deliveredRuns = 0, total = 0) => (total ? deliveredRuns / total :
|
||||
<span class="flex items-baseline gap-2">
|
||||
<span class="min-w-0 flex-1 truncate font-mono text-[13px]" :class="row.id === selected && 'font-medium'">{{ row.id }}</span>
|
||||
<Badge v-if="store.drafts.some((draft) => draft.id === row.id)" variant="outline">Draft</Badge>
|
||||
<span class="font-mono text-xs text-fg-subtle">{{ row.avg_tokens ? compact(row.avg_tokens) : "–" }}</span>
|
||||
<span v-if="row.avg_tokens" class="font-mono text-xs text-fg-subtle">{{ compact(row.avg_tokens) }}</span>
|
||||
</span>
|
||||
<span v-if="row.runs" class="mt-1.5 flex items-center gap-2 text-xs text-fg-subtle">
|
||||
<span v-if="live.get(row.id)?.running" class="flex w-20 shrink-0 items-center gap-1.5 text-info">
|
||||
|
||||
@@ -26,7 +26,7 @@ export function pct(
|
||||
}
|
||||
|
||||
export function formatMs(ms: number | undefined | null): string {
|
||||
if (!ms) return "—";
|
||||
if (!ms) return "–";
|
||||
if (ms < 1000) return `${ms} ms`;
|
||||
const secs = ms / 1000;
|
||||
if (secs < 60) return `${secs.toFixed(1)} s`;
|
||||
|
||||
Reference in new issue
Block a user