reifyui 0.15.1 → 0.15.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent-chat.cjs +3 -1
- package/dist/agent-chat.cjs.map +1 -1
- package/dist/agent-chat.js +1 -1
- package/dist/{chunk-S46J7CLH.js → chunk-SF5QML3U.js} +4 -2
- package/dist/chunk-SF5QML3U.js.map +1 -0
- package/dist/index.cjs +3 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/agent-chat/components.jsx +6 -1
- package/dist/chunk-S46J7CLH.js.map +0 -1
package/dist/agent-chat.cjs
CHANGED
|
@@ -1671,7 +1671,9 @@ function TurnOutcome(props) {
|
|
|
1671
1671
|
if (!turn || turn.status === "running") return null;
|
|
1672
1672
|
const ms = turn.startedAt != null && turn.endedAt != null ? turn.endedAt - turn.startedAt : turn.elapsedMs;
|
|
1673
1673
|
const time = ms != null && ms >= 0 ? formatElapsed(ms) : "";
|
|
1674
|
-
const
|
|
1674
|
+
const u = turn.usage || null;
|
|
1675
|
+
const parts = u ? ["input_tokens", "output_tokens", "cache_read_tokens", "cache_write_tokens"].map((k) => Number(u[k]) || 0) : [];
|
|
1676
|
+
const tok = u ? parts.some(Boolean) ? parts.reduce((a, b) => a + b, 0) : Number(u.total_tokens) || 0 : 0;
|
|
1675
1677
|
const tokens = tok ? labels.tokens(formatTokens(tok)) : "";
|
|
1676
1678
|
if (turn.status === "done") {
|
|
1677
1679
|
if (!time && !tokens) return null;
|