emits footer:segment when shared footer is loaded.
Behavior
session_start:
shows —/s.
agent_start:
starts timing; shows 0.0/s.
message_start:
records assistant span start for non-streaming fallback.
message_update:
starts decode timing on the first non-empty streamed delta, excludes that
baseline chunk from TPS, and estimates live TPS from later streamed delta
chars / 4.
Live updates are throttled to every 250 ms.
message_end:
stops decode timing, or assistant-span fallback when no deltas streamed.
agent_end:
shows final N.N/s from assistant output tokens / measured decode seconds.
No assistant output token usage → returns to —/s.
Shared footer present → emits footer:segment in llm zone.
No shared footer → falls back to ctx.ui.setStatus("tps", ...).
session_shutdown:
clears state and removes status/segment.