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)" >
-