From 20499d0d2ec5c4a0bc0f8cf72d3284cdf36434d0 Mon Sep 17 00:00:00 2001 From: wizardchen Date: Mon, 5 Jan 2026 10:15:55 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E7=BB=9F=E4=B8=80=E6=A0=87?= =?UTF-8?q?=E7=AD=BE=E5=88=97=E8=A1=A8=E6=B8=B2=E6=9F=93=E9=80=BB=E8=BE=91?= =?UTF-8?q?=EF=BC=8C=E7=A7=BB=E9=99=A4=E9=87=8D=E5=A4=8D=E7=9A=84=E6=9C=AA?= =?UTF-8?q?=E5=88=86=E7=B1=BB=E6=A0=87=E7=AD=BE=E5=A4=84=E7=90=86=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/knowledge/KnowledgeBase.vue | 116 ++++++++------- .../knowledge/components/FAQEntryManager.vue | 132 ++++++++---------- internal/container/container.go | 47 ++++++- 3 files changed, 159 insertions(+), 136 deletions(-) diff --git a/frontend/src/views/knowledge/KnowledgeBase.vue b/frontend/src/views/knowledge/KnowledgeBase.vue index d4c5515b..4adce1bd 100644 --- a/frontend/src/views/knowledge/KnowledgeBase.vue +++ b/frontend/src/views/knowledge/KnowledgeBase.vue @@ -91,14 +91,10 @@ const tagMap = computed>(() => { return map; }); const sidebarCategoryCount = computed(() => tagList.value.length); -// Filter out the untagged pseudo-tag from regular tags -const regularTags = computed(() => tagList.value.filter((tag) => tag.id !== UNTAGGED_TAG_ID)); -// Get the untagged pseudo-tag from the list -const untaggedTag = computed(() => tagList.value.find((tag) => tag.id === UNTAGGED_TAG_ID)); const filteredTags = computed(() => { const query = tagSearchQuery.value.trim().toLowerCase(); - if (!query) return regularTags.value; - return regularTags.value.filter((tag) => (tag.name || '').toLowerCase().includes(query)); + if (!query) return tagList.value; + return tagList.value.filter((tag) => (tag.name || '').toLowerCase().includes(query)); }); const editingTagInputRefs = new Map(); @@ -1003,18 +999,6 @@ async function createNewSession(value: string): Promise {
-
-
- - {{ $t('knowledgeBase.untagged') || '未分类' }} -
- {{ untaggedTag.knowledge_count || 0 }} -
@@ -1058,12 +1042,16 @@ async function createNewSession(value: string): Promise { v-for="tag in filteredTags" :key="tag.id" class="tag-list-item" - :class="{ active: selectedTagId === tag.id, editing: editingTagId === tag.id }" - @click="handleTagRowClick(tag.id)" + :class="{ active: selectedTagId === tag.id, editing: editingTagId === tag.id && tag.id !== UNTAGGED_TAG_ID }" + @click="tag.id === UNTAGGED_TAG_ID ? handleUntaggedClick() : handleTagRowClick(tag.id)" >
-