You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Emit usage-delta events on AI SDK finish-step, allowing the UI to
display live token counts as the AI generates multi-step responses.
Backend:
- Add UsageDeltaEvent type emitted on each finish-step
- StreamManager tracks and emits usage after each tool call step
- Forward events through AIService → AgentSession → IPC
Frontend:
- StreamingMessageAggregator stores active stream usage per messageId
- WorkspaceStore exposes liveUsage in WorkspaceUsageState
- CostsTab, RightSidebar, ChatMetaSidebar consume liveUsage for
real-time context window display
Tests:
- Unit tests for usage-delta handling in StreamingMessageAggregator
- Integration test for usage-delta events during multi-step streams
0 commit comments