feat(knowledge): Add tag_id support for knowledge creation and file uploads

- Introduced tag_id parameter in various knowledge-related API functions to allow categorization of knowledge entries.
- Updated frontend components to handle tag_id during knowledge creation and file uploads.
- Enhanced UI store to manage the selected tag ID for better user experience in categorizing knowledge.
This commit is contained in:
Xia Dong
2026-01-14 18:51:12 +08:00
committed by begoniezhao
parent 6c90480e82
commit cec722aa43
10 changed files with 178 additions and 124 deletions
+7
View File
@@ -7,6 +7,8 @@ export const useUIStore = defineStore('ui', {
kbEditorMode: 'create' as 'create' | 'edit',
currentKBId: null as string | null,
kbEditorType: 'document' as 'document' | 'faq',
// 当前选中的分类ID,用于文件上传时传递
selectedTagId: '__untagged__' as string,
kbEditorInitialSection: null as string | null,
settingsInitialSection: null as string | null,
settingsInitialSubSection: null as string | null,
@@ -101,6 +103,11 @@ export const useUIStore = defineStore('ui', {
}
}
this.manualEditorOnSuccess = null
},
// 设置当前选中的分类ID
setSelectedTagId(tagId: string) {
this.selectedTagId = tagId
}
}
})