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.
This commit is contained in:
wizardchen
2026-04-20 20:08:00 +08:00
parent e9ed8d1961
commit bd5d70b5ae
4 changed files with 257 additions and 25 deletions
@@ -87,7 +87,7 @@
<div v-if="!graphReady" class="wiki-reader-empty wiki-graph-empty">
<t-loading v-if="graphLoading" />
<div v-else class="wiki-empty-icon">
<t-icon name="chart-ring" size="48px" />
<t-icon name="chart-bubble" size="48px" />
</div>
<p class="wiki-empty-desc">{{ graphLoading ? $t('knowledgeEditor.wikiBrowser.graphEmpty') : $t('knowledgeEditor.wikiBrowser.graphNoData') }}</p>
</div>
@@ -849,6 +849,12 @@ async function loadGraph() {
graphData.value = (res as any).data || res as any
await nextTick()
renderGraph()
if (route.query.slug && typeof route.query.slug === 'string') {
graphSelectedSlug.value = null // reset first to ensure watch triggers
setTimeout(() => {
handleGraphSearchSelect(route.query.slug as string)
}, 300)
}
} catch (e) {
console.error('Failed to load graph:', e)
} finally {