From 38beca1146b7ce05c5edd4c6cf9c41560f67b472 Mon Sep 17 00:00:00 2001 From: wizardchen Date: Wed, 12 Nov 2025 14:27:00 +0800 Subject: [PATCH] feat: Enhance event duration tracking and UI components in chat - Added duration tracking for agent steps and tool calls, improving event data accuracy. - Updated AgentStreamDisplay and ToolResultRenderer components to include fallback headers and improved output styling. - Refactored duration handling in the agent engine and session management to ensure consistent duration reporting. - Enhanced UI elements for better user experience, including scrollable output areas and improved tooltip visibility. --- .../chat/components/AgentStreamDisplay.vue | 139 ++++++++++++------ .../chat/components/ToolResultRenderer.vue | 77 ++++++++-- frontend/src/views/chat/index.vue | 9 +- internal/agent/engine.go | 15 +- internal/agent/tools/mcp_tool.go | 4 +- .../handler/session/agent_stream_handler.go | 56 ++++++- 6 files changed, 219 insertions(+), 81 deletions(-) diff --git a/frontend/src/views/chat/components/AgentStreamDisplay.vue b/frontend/src/views/chat/components/AgentStreamDisplay.vue index 7e68bd52..4d79bd83 100644 --- a/frontend/src/views/chat/components/AgentStreamDisplay.vue +++ b/frontend/src/views/chat/components/AgentStreamDisplay.vue @@ -1,5 +1,5 @@