From 2563ecf3c53b65274d3120af5b3fd3afbd7db7ec Mon Sep 17 00:00:00 2001 From: lxfight <1686540385@qq.com> Date: Sun, 19 Oct 2025 18:43:58 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=AE=9E=E7=8E=B0=E7=9F=A5=E8=AF=86?= =?UTF-8?q?=E5=BA=93=E5=89=8D=E7=AB=AF=E7=BB=84=E4=BB=B6=E5=92=8C=E8=B7=AF?= =?UTF-8?q?=E7=94=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 实现知识库 V2 主页面和 4 个子面板组件 - 文档管理面板:支持上传、删除、查看文档分块 - 检索测试面板:支持测试知识库检索效果 - 全局设置面板:配置嵌入模型、重排序、检索参数 - 会话配置面板:管理会话与知识库的绑定关系 - 重构 Alkaid 路由为嵌套结构,添加知识库 V2 路由 - 在翻译系统中注册知识库 V2 多语言支持 - 默认进入 Alkaid 时跳转到原生知识库页面 --- dashboard/src/views/AlkaidPage.vue | 16 +- .../knowledge-base-v2/KnowledgeBaseV2.vue | 686 ++++++++++++++++++ .../components/DocumentListPanel.vue | 639 ++++++++++++++++ .../components/KBSettingsPanel.vue | 310 ++++++++ .../components/SearchPanel.vue | 194 +++++ .../components/SessionConfigPanel.vue | 510 +++++++++++++ 6 files changed, 2350 insertions(+), 5 deletions(-) create mode 100644 dashboard/src/views/alkaid/knowledge-base-v2/KnowledgeBaseV2.vue create mode 100644 dashboard/src/views/alkaid/knowledge-base-v2/components/DocumentListPanel.vue create mode 100644 dashboard/src/views/alkaid/knowledge-base-v2/components/KBSettingsPanel.vue create mode 100644 dashboard/src/views/alkaid/knowledge-base-v2/components/SearchPanel.vue create mode 100644 dashboard/src/views/alkaid/knowledge-base-v2/components/SessionConfigPanel.vue diff --git a/dashboard/src/views/AlkaidPage.vue b/dashboard/src/views/AlkaidPage.vue index 73233fa59..7caa9aee4 100644 --- a/dashboard/src/views/AlkaidPage.vue +++ b/dashboard/src/views/AlkaidPage.vue @@ -7,9 +7,15 @@ {{ tm('page.subtitle') }} -
+
+ + mdi-book-open-page-variant + {{ tm('page.navigation.knowledgeBaseV2') }} + mdi-text-box-search {{ tm('page.navigation.knowledgeBase') }} @@ -21,7 +27,7 @@ {{ tm('page.navigation.longTermMemory') }} mdi-tools {{ tm('page.navigation.other') }} @@ -69,9 +75,9 @@ export default { } }, mounted() { - // 如果在根路径 /alkaid,默认跳转到知识库页面 + // 如果在根路径 /alkaid,默认跳转到原生知识库页面 if (this.$route.path === '/alkaid') { - this.navigateTo('knowledge-base'); + this.navigateTo('knowledge-base-v2'); } } } diff --git a/dashboard/src/views/alkaid/knowledge-base-v2/KnowledgeBaseV2.vue b/dashboard/src/views/alkaid/knowledge-base-v2/KnowledgeBaseV2.vue new file mode 100644 index 000000000..b635cdad3 --- /dev/null +++ b/dashboard/src/views/alkaid/knowledge-base-v2/KnowledgeBaseV2.vue @@ -0,0 +1,686 @@ + + + + + diff --git a/dashboard/src/views/alkaid/knowledge-base-v2/components/DocumentListPanel.vue b/dashboard/src/views/alkaid/knowledge-base-v2/components/DocumentListPanel.vue new file mode 100644 index 000000000..d185ab2d0 --- /dev/null +++ b/dashboard/src/views/alkaid/knowledge-base-v2/components/DocumentListPanel.vue @@ -0,0 +1,639 @@ + + + + + diff --git a/dashboard/src/views/alkaid/knowledge-base-v2/components/KBSettingsPanel.vue b/dashboard/src/views/alkaid/knowledge-base-v2/components/KBSettingsPanel.vue new file mode 100644 index 000000000..078086e7b --- /dev/null +++ b/dashboard/src/views/alkaid/knowledge-base-v2/components/KBSettingsPanel.vue @@ -0,0 +1,310 @@ + + + + + diff --git a/dashboard/src/views/alkaid/knowledge-base-v2/components/SearchPanel.vue b/dashboard/src/views/alkaid/knowledge-base-v2/components/SearchPanel.vue new file mode 100644 index 000000000..54b9edfa0 --- /dev/null +++ b/dashboard/src/views/alkaid/knowledge-base-v2/components/SearchPanel.vue @@ -0,0 +1,194 @@ + + + + + diff --git a/dashboard/src/views/alkaid/knowledge-base-v2/components/SessionConfigPanel.vue b/dashboard/src/views/alkaid/knowledge-base-v2/components/SessionConfigPanel.vue new file mode 100644 index 000000000..267878855 --- /dev/null +++ b/dashboard/src/views/alkaid/knowledge-base-v2/components/SessionConfigPanel.vue @@ -0,0 +1,510 @@ + + + + +