Add response metrics: elapsed time, tool calls, token count
Server:
- Message model: elapsed_seconds, tool_call_count, token_count fields
  (display-only, excluded from LLM context via exclude_none)
- StreamEnd event: carries same three fields
- agent.run_stream: tracks turn start time, counts ToolEvent completions,
  writes metrics onto the final assistant Message before saving to DB
- WebSocket: forwards metrics in stream_end payload

Client:
- chat.onStreamEnd: attaches elapsed_seconds, tool_call_count, token_count
  to the streaming message on completion
- buildMessageList: scans each assistant group for metrics from history
- AssistantMessage: renders .msg-meta-row below the response —
  timer icon + Xs · wrench icon + N tools · coins icon + Nk tokens · time
  (each item only shown if present; time pushed right via margin-left: auto)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 9ecf33b commit a338f8b8ba3f21c955782a145d869bcedc1a8615
@Eugene Sukhodolskiy Eugene Sukhodolskiy authored on 16 Apr
Showing 12 changed files
View
navi/api/websocket.py
View
navi/core/agent.py
View
navi/core/events.py
View
navi/llm/base.py
View
webclient/dist/assets/index-B0zuWDdS.js 100644 → 0
Not supported
View
webclient/dist/assets/index-CQjNm74C.js 0 → 100644
Not supported
View
webclient/dist/assets/index-DFEFQanG.css 0 → 100644
View
webclient/dist/assets/index-DgqTz_7j.css 100644 → 0
View
webclient/dist/index.html
View
webclient/src/components/messages/AssistantMessage.vue
View
webclient/src/stores/chat.js
View
webclient/src/styles/app.scss