Open-source LLM knowledge platform: turn raw documents into a queryable RAG, an autonomous reasoning agent, and a self-maintaining Wiki.
Go agentagenticaichatbotdsh-pluginembeddingsevaluationgenerative-aigolangknowledge-basellmmulti-tenantollamaopenaiquestion-answeringragrerankingsemantic-searchvector-searchwiki
feat(ui): enhance knowledge base creation with initial section support
wizardchenbb220db4e405
diff --git a/frontend/src/stores/ui.ts b/frontend/src/stores/ui.tsindex 867e781a4..3c3b15f0f 100644--- a/frontend/src/stores/ui.ts+++ b/frontend/src/stores/ui.ts@@ -52,11 +52,11 @@ export const useUIStore = defineStore('ui', {this.openKBSettings(kbId, initialSection)},- openCreateKB(type: 'document' | 'faq' = 'document') {+ openCreateKB(type: 'document' | 'faq' = 'document', initialSection?: string) {this.currentKBId = nullthis.kbEditorMode = 'create'this.kbEditorType = type- this.kbEditorInitialSection = null+ this.kbEditorInitialSection = initialSection || nullthis.showKBEditorModal = true},diff --git a/frontend/src/views/knowledge/KnowledgeBaseList.vue b/frontend/src/views/knowledge/KnowledgeBaseList.vueindex 412289319..d664210c9 100644--- a/frontend/src/views/knowledge/KnowledgeBaseList.vue+++ b/frontend/src/views/knowledge/KnowledgeBaseList.vue@@ -763,7 +763,6 @@</Transition></Teleport>- <TenantModelsGuide :when="showTenantModelsGuide" /><ContextualGuide tour="kbList" :when="showKbListContextualGuide" /></div></template>@@ -785,7 +784,6 @@ import ShareKnowledgeBaseDialog from '@/components/ShareKnowledgeBaseDialog.vue'import ListSpaceSidebar from '@/components/ListSpaceSidebar.vue'import ResourceOriginBadge from '@/components/ResourceOriginBadge.vue'import ContextualGuide from '@/components/ContextualGuide.vue'-import TenantModelsGuide from '@/components/TenantModelsGuide.vue'import { isContextualGuideDone, markContextualGuideDone } from '@/config/contextualGuides'import { useTenantModelReadiness } from '@/composables/useTenantModelReadiness'import { useI18n } from 'vue-i18n'@@ -1178,12 +1176,8 @@ const showKbListEmpty = computed(() => {return false})-const showTenantModelsGuide = computed(- () => modelsReadyLoaded.value && showKbListEmpty.value && !isReadyForDocumentKb.value,-)-const showKbListContextualGuide = computed(- () => showKbListEmpty.value && isReadyForDocumentKb.value && !uiStore.showKBEditorModal,+ () => showKbListEmpty.value && !uiStore.showKBEditorModal,)interface UploadTaskState {@@ -1640,13 +1634,11 @@ const goSettings = (id: string) => {// 创建知识库const handleCreateKnowledgeBase = () => {- if (!isReadyForDocumentKb.value) {- MessagePlugin.warning(t('contextualGuide.tenantModels.needModelsFirst'))- uiStore.openSettings('models')- return- }markContextualGuideDone('kbList')- uiStore.openCreateKB()+ // 无模型时仍打开创建向导,并定位到模型配置页;用户可在向导内添加模型,无需先跳转系统设置+ const initialSection =+ modelsReadyLoaded.value && !isReadyForDocumentKb.value ? 'models' : undefined+ uiStore.openCreateKB('document', initialSection)}// 知识库编辑器成功回调(创建或编辑成功)