{#
What a reply cost. Chips only, no wrapper: the same markup is swapped into
the live bubble with innerHTML and rendered into the finished one, so the
numbers cannot change shape when the stream ends.
A tilde means the endpoint reported no token counts and these were worked out
at about four characters per token. Nothing here is ever shown as exact when
it is not.
#}
{# The first chip is what the reply COST and the second is what it OCCUPIES.
They are different numbers and a multi-round reply makes them very different
-- it pays for its prompt once per round and only ever sits in the window
once -- so each title says which it is. Without that, two token counts a few
centimetres apart just look like one of them is wrong. #}
{% if metrics.has_anything %}
{% if metrics.estimated %}~{% endif %}{{ metrics.total_tokens }} tokens
{% if metrics.context_limit %}
{# A width is data, not a design value: it is the measurement itself. #}
{% if metrics.estimated %}~{% endif %}{{ metrics.percent }}%
{% endif %}
{% if metrics.tokens_per_second %}
{% if metrics.estimated %}~{% endif %}{{ '%.1f' | format(metrics.tokens_per_second) }} tok/s
{% endif %}
{% endif %}