From 53a66a64565ba40ff72907c18a7b983855a34e2f Mon Sep 17 00:00:00 2001 From: wizardchen Date: Thu, 16 Jul 2026 22:29:37 +0800 Subject: [PATCH] feat(chat): enhance references drawer behavior and citation handling Implement improvements to the chat references drawer, including a new event for handling panel entry to ensure smooth scrolling to highlighted citations. Update the logic for retrieving references from agent events, allowing for better integration of citation data. Additionally, enhance tests to cover new functionality and ensure correct behavior of the references drawer during interactions. --- .../src/components/ChatReferencesDrawer.vue | 37 ++++++++++++-- frontend/src/utils/grepResultsGroup.test.mjs | 2 + frontend/src/utils/grepResultsGroup.ts | 2 + frontend/src/utils/referenceSources.test.mjs | 36 ++++++++++++++ frontend/src/utils/referenceSources.ts | 18 +++++++ .../chat/components/AgentStreamDisplay.vue | 48 +++++++++++++++---- .../chat/components/chatLinksNewTab.test.mjs | 42 ++++++++++++++++ 7 files changed, 171 insertions(+), 14 deletions(-) diff --git a/frontend/src/components/ChatReferencesDrawer.vue b/frontend/src/components/ChatReferencesDrawer.vue index 82b3c39e..b405e336 100644 --- a/frontend/src/components/ChatReferencesDrawer.vue +++ b/frontend/src/components/ChatReferencesDrawer.vue @@ -1,6 +1,6 @@