feat(knowledge): enhance FAQ entry filtering and tagging
- Updated the listFAQEntries function to support multiple tag IDs for filtering. - Modified the frontend components to accommodate the new tag_ids parameter. - Enhanced the KbTagManageDrawer and FAQEntryManager components to reflect changes in tag handling. - Improved API documentation to clarify the new tag filtering capabilities. This commit enhances the flexibility of FAQ entry retrieval, allowing users to filter by multiple tags for more precise results.
This commit is contained in:
@@ -392,7 +392,7 @@ const buildQuery = (params?: Record<string, any>) => {
|
||||
|
||||
export function listFAQEntries(
|
||||
kbId: string,
|
||||
params?: { page?: number; page_size?: number; tag_id?: number; keyword?: string },
|
||||
params?: { page?: number; page_size?: number; tag_id?: number; tag_ids?: string; keyword?: string },
|
||||
) {
|
||||
const query = buildQuery(params);
|
||||
return get(`/api/v1/knowledge-bases/${kbId}/faq/entries${query}`);
|
||||
|
||||
@@ -2330,6 +2330,7 @@ async function createNewSession(value: string): Promise<void> {
|
||||
@open-manage="openTagManageFromEditDialog" />
|
||||
|
||||
<KbTagManageDrawer
|
||||
v-if="!isFAQ"
|
||||
v-model:visible="tagManageDrawerVisible"
|
||||
:kb-id="kbId"
|
||||
:is-faq="isFAQ"
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -153,7 +153,7 @@
|
||||
<span class="tag-tile__count">
|
||||
{{
|
||||
isFaq
|
||||
? $t('knowledgeBase.tagManageFaqCount', { count: tag.knowledge_count || 0 })
|
||||
? $t('knowledgeBase.tagManageFaqCount', { count: tag.chunk_count || 0 })
|
||||
: $t('knowledgeBase.tagManageDocCount', { count: tag.knowledge_count || 0 })
|
||||
}}
|
||||
</span>
|
||||
@@ -222,6 +222,7 @@ type TagRow = {
|
||||
seq_id: number;
|
||||
name: string;
|
||||
knowledge_count?: number;
|
||||
chunk_count?: number;
|
||||
};
|
||||
|
||||
type TagInputInstance = ComponentPublicInstance<{ focus: () => void; select: () => void }>;
|
||||
|
||||
Reference in New Issue
Block a user