mirror of
https://gitee.com/mateos/mateclaw.git
synced 2026-09-13 11:13:43 +08:00
IM channels (Feishu, DingTalk, WeCom, etc.) and the WebChat widget were calling saveMessage without token usage parameters, causing promptTokens and completionTokens to default to 0. This made the Token Statistics module report significantly lower numbers than actual usage. Root cause: the _usage_final event (containing promptTokens / completionTokens) emitted by the agent graph at stream end was not being captured in these paths, unlike ChatController's StreamAccumulator which already handles it correctly. Fix: capture _usage_final events in doOnNext handlers for: - ChannelMessageRouter sync path (non-streaming IM adapters) - ChannelMessageRouter streaming path (DingTalk, etc.) - WebChatController SSE stream Refs #214 (remaining String-API paths covered by follow-up). |
||
|---|---|---|
| .. | ||
| src | ||
| Dockerfile | ||
| pom.xml | ||
| settings.xml | ||