fix: deduplicate knowledge content search results

This commit is contained in:
2026-07-30 14:45:20 +08:00
parent 77a899e24c
commit 162658384f
4 changed files with 71 additions and 9 deletions

View File

@@ -486,7 +486,7 @@ async function confirmAction(
<div class="content-search-hit-main">
<div class="content-search-hit-title">
<strong>{{ item.title }}</strong>
<el-tag size="small" effect="plain">{{ contentItemTypeLabel(item.itemType) }}</el-tag>
<el-tag v-for="type in item.itemTypes || [item.itemType]" :key="type" size="small" effect="plain">{{ contentItemTypeLabel(type) }}</el-tag>
<el-tag size="small" :type="item.canAgentUse ? 'success' : 'warning'">{{ item.canAgentUse ? '可参与召回' : '不可默认召回' }}</el-tag>
</div>
<p class="content-search-hit-meta">

View File

@@ -221,6 +221,7 @@ export interface KnowledgeContentSearchItem {
versionNo: number;
publishedAt?: string | null;
itemType: "section" | "card" | "chunk";
itemTypes?: Array<"section" | "card" | "chunk">;
itemId: number;
sectionId: number;
sectionKey: string;