|
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> |
|---|
|
|
| navi/api/websocket.py |
|---|
| navi/core/agent.py |
|---|
| navi/core/events.py |
|---|
| navi/llm/base.py |
|---|
| webclient/dist/assets/index-B0zuWDdS.js 100644 → 0 |
|---|
|
Not supported
|
| webclient/dist/assets/index-CQjNm74C.js 0 → 100644 |
|---|
|
Not supported
|
| webclient/dist/assets/index-DFEFQanG.css 0 → 100644 |
|---|
| webclient/dist/assets/index-DgqTz_7j.css 100644 → 0 |
|---|
| webclient/dist/index.html |
|---|
| webclient/src/components/messages/AssistantMessage.vue |
|---|
| webclient/src/stores/chat.js |
|---|
| webclient/src/styles/app.scss |
|---|