feat: Implement FAQ functionality in Knowledge Base

- Added support for creating and managing FAQ knowledge bases, including new API endpoints for listing, upserting, updating, and deleting FAQ entries.
- Enhanced the frontend to allow users to create FAQ knowledge bases and manage FAQ entries with a dedicated interface.
- Introduced new types and configurations for FAQ handling in the backend, ensuring proper indexing and retrieval of FAQ entries.
- Updated localization files to include new strings related to FAQ management in multiple languages.
- Refactored existing components to accommodate the new FAQ features, improving user experience and functionality.
This commit is contained in:
wizardchen
2025-11-15 01:30:17 +08:00
parent 0ea5e6a2a2
commit 25fdaed8ca
37 changed files with 4778 additions and 198 deletions
+5 -1
View File
@@ -6,6 +6,7 @@ export const useUIStore = defineStore('ui', {
showKBEditorModal: false,
kbEditorMode: 'create' as 'create' | 'edit',
currentKBId: null as string | null,
kbEditorType: 'document' as 'document' | 'faq',
kbEditorInitialSection: null as string | null,
settingsInitialSection: null as string | null,
settingsInitialSubSection: null as string | null,
@@ -39,6 +40,7 @@ export const useUIStore = defineStore('ui', {
openKBSettings(kbId: string, initialSection?: string) {
this.currentKBId = kbId
this.kbEditorMode = 'edit'
this.kbEditorType = 'document'
this.kbEditorInitialSection = initialSection || null
this.showKBEditorModal = true
},
@@ -47,9 +49,10 @@ export const useUIStore = defineStore('ui', {
this.openKBSettings(kbId, initialSection)
},
openCreateKB() {
openCreateKB(type: 'document' | 'faq' = 'document') {
this.currentKBId = null
this.kbEditorMode = 'create'
this.kbEditorType = type
this.kbEditorInitialSection = null
this.showKBEditorModal = true
},
@@ -58,6 +61,7 @@ export const useUIStore = defineStore('ui', {
this.showKBEditorModal = false
this.currentKBId = null
this.kbEditorInitialSection = null
this.kbEditorType = 'document'
},
openManualEditor(options: {