From bd5d70b5aec5174ba5703dfde7335bd6ed71d53c Mon Sep 17 00:00:00 2001 From: wizardchen Date: Mon, 20 Apr 2026 20:08:00 +0800 Subject: [PATCH] feat: Add wiki drawer functionality and localization support in AgentStreamDisplay - Introduced a new wiki drawer component in AgentStreamDisplay for enhanced navigation to wiki pages, allowing users to view detailed content and related metadata. - Implemented localization for the new "View in Graph" feature in both English and Chinese, improving accessibility for diverse user bases. - Updated the WikiBrowser component to utilize the new drawer for displaying wiki content, streamlining the user experience when interacting with wiki links. These enhancements significantly improve the usability and functionality of the wiki navigation system, providing users with a more intuitive experience when accessing and citing wiki content. --- frontend/src/i18n/locales/en-US.ts | 1 + frontend/src/i18n/locales/zh-CN.ts | 1 + .../chat/components/AgentStreamDisplay.vue | 272 ++++++++++++++++-- .../src/views/knowledge/wiki/WikiBrowser.vue | 8 +- 4 files changed, 257 insertions(+), 25 deletions(-) diff --git a/frontend/src/i18n/locales/en-US.ts b/frontend/src/i18n/locales/en-US.ts index 719c9b07..7b42571c 100755 --- a/frontend/src/i18n/locales/en-US.ts +++ b/frontend/src/i18n/locales/en-US.ts @@ -1633,6 +1633,7 @@ export default { rebuildSkip: 'You can manually trigger a rebuild later from Data Sources', }, wikiBrowser: { + viewInGraph: 'View in Graph', tabDocuments: 'Documents', tabWiki: 'Wiki', tabGraph: 'Graph', diff --git a/frontend/src/i18n/locales/zh-CN.ts b/frontend/src/i18n/locales/zh-CN.ts index 1bdb17af..588d420b 100755 --- a/frontend/src/i18n/locales/zh-CN.ts +++ b/frontend/src/i18n/locales/zh-CN.ts @@ -2158,6 +2158,7 @@ export default { rebuildSkip: "稍后可在数据源中手动触发重建", }, wikiBrowser: { + viewInGraph: '在图谱中查看', tabDocuments: "文档", tabWiki: "Wiki", tabGraph: "图谱", diff --git a/frontend/src/views/chat/components/AgentStreamDisplay.vue b/frontend/src/views/chat/components/AgentStreamDisplay.vue index d249d38f..a52faf5a 100644 --- a/frontend/src/views/chat/components/AgentStreamDisplay.vue +++ b/frontend/src/views/chat/components/AgentStreamDisplay.vue @@ -335,6 +335,36 @@ + + + + +