Show per-member token usage badges on panel bubbles
memberUsage was already populated for CLI members (from the result event) and Anthropic-API members (via the tool loop), but it was never written to the panel_member_done SSE event or the persisted content JSON, so the frontend had no token data to render. Add the token fields (input/output/cacheRead/cacheCreation) to both the SSE event and the persisted JSON, and render them via a shared buildPanelMemberMeta helper used by both the live stream and history, so the badge survives F5. OpenAI members (no per-turn tokens), error members, and pre-existing history without token fields fall through to no badge. The badge is display-only; aggregation into the worker/chain total via seedUsage is unchanged, so there is no double counting and no DB migration. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
1 parent
17ba4840dd
commit
8e5a961e94
4 files changed
+50
-2
No files matched your search
@@ -1237,6 +1237,17 @@
|
||||
border-color: var(--accent, #9b6dff);
|
||||
}
|
||||
|
||||
/* Per-Member Token-Badge am unteren Rand der Panel-Bubble (live + History) */
|
||||
.panel-member-meta {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-end;
|
||||
gap: var(--badge-spacing);
|
||||
margin-top: var(--badge-spacing);
|
||||
font-size: var(--font-size);
|
||||
opacity: var(--semi-transparent);
|
||||
}
|
||||
|
||||
/* MoA: Trenner zwischen Proposer-Runden */
|
||||
.panel-layer-divider {
|
||||
display: flex;
|
||||
|
||||
Reference in new issue
Block a user