feat: Improve knowledge base loading and dropdown UI in manual knowledge editor
- Enhanced the knowledge base loading function with detailed logging for better debugging and visibility of the data flow. - Filtered knowledge bases to include only document types, improving the relevance of displayed options. - Updated the dropdown component to include a custom empty state message when no document-type knowledge bases are available. - Adjusted z-index styles for dropdowns to ensure proper visibility in various UI contexts. - Added localization strings for the new empty state message in English, Russian, and Chinese.
This commit is contained in:
@@ -1097,10 +1097,11 @@ const kbInfo = ref<any>(null)
|
||||
const knowledgeList = ref<Array<{ id: string; name: string; type?: string }>>([])
|
||||
const knowledgeDropdownOptions = computed(() =>
|
||||
knowledgeList.value
|
||||
.filter((item) => !item.type || item.type === 'document')
|
||||
.map((item) => ({
|
||||
content: item.name,
|
||||
value: item.id,
|
||||
prefixIcon: () => h(TIcon, { name: item.type === 'faq' ? 'help-circle' : 'file', size: '16px' }),
|
||||
prefixIcon: () => h(TIcon, { name: 'file', size: '16px' }),
|
||||
})),
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user