mirror of
https://github.com/lobehub/lobe-chat.git
synced 2026-06-14 03:30:19 +00:00
09b5e926bf
* ✨ feat(conversation): add op status tray above chat input Show elapsed time, total tokens, and total cost while an AI-runtime operation is running in the current conversation. Lives in the floating overlay above the chat input alongside QueueTray and TodoProgress, attaches flush to the input panel below. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * 🐛 fix(conversation): read top-level message.usage in op status tray Token totals stayed at 0 during regular agent runs because the standard agent path writes usage to `message.usage` (top-level) while the heterogeneous executor writes `metadata.usage`. Read both. Also drop the fragile createdAt window — assistant messages can be created before the AI_RUNTIME op's startTime, which excluded otherwise-valid rows — and aggregate across the whole conversation instead. UI: a little more padding, a pulsing dot to mark the running state, a tokens label, and a divider between tokens and cost. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * ✨ feat(conversation): streaming phase, ping dot, and richer metrics in op status tray - Left side now shows the current streaming phase (thinking / calling tools / searching / compressing / generating) derived from the most recent running sub-operation; server runtimes surface no sub-ops on the client and fall back to 'generating'. - Pulse dot upgraded to an expanding ping ring animation. - Zero-valued metrics are hidden entirely (no more '0 tokens / $0'). - Long-running tasks additionally surface turns and tool-call counts next to tokens and total cost. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * 💄 style(conversation): polish op status tray display * 💄 style(conversation): unify op status tray glyph to a single hue The activity glyph mixed purple and cyan accents into the primary color; all layers now derive from colorPrimary alone (opacity-only variation). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * 💄 style(conversation): strip glyph halo fill and drop-shadow The halo's tinted fill plus the drop-shadow rendered as a muddy disc behind the glyph (worst in light theme). Reduce to a breathing core dot plus a single rotating dashed orbit, primary hue only. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * 💄 style(conversation): drop dollar prefix and code font in op status tray The dollar icon already conveys currency, and the code font made the numbers feel out of place next to the body text. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * ✨ feat(conversation): show per-message cost next to the token chip Renders usage.cost beside the token count in the assistant message footer; hidden in credit mode (credits already express cost) and when the value is zero/absent. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * 💄 style(conversation): hide per-message cost below $0.20 Cheap messages don't need a cost callout — the chip only surfaces once the cost is large enough to matter. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * 🐛 fix(conversation): anchor reconnected op timer to real run start, surface steps - Page-refresh reconnect recreated the gateway operation with startTime=Date.now(), resetting the tray timer to 00:00 mid-run. Anchor it to the assistant message's createdAt instead. - Mirror the server's authoritative stepIndex onto op.metadata.stepCount at every step_start event, so the steps metric shows for real server-side runs (and survives reconnects). - Drop the tool-call count metric from the tray. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * ✅ test(conversation): stub updateOperationMetadata in gateway event handler mock store Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>