feat: enhance storage engine configuration and user notifications
- Updated the summary length requirement for document summarization to 100-300 words. - Added new localization strings for missing storage engine notifications in English, Korean, Russian, and Chinese. - Implemented UI warnings for users regarding storage engine configuration when files exist, including confirmation dialogs for storage engine changes. - Enhanced backend validation to ensure a storage engine is configured before allowing content uploads. These changes improve user experience by providing clearer guidance on storage engine requirements and enhancing the overall functionality of the knowledge base management system.
This commit is contained in:
@@ -320,9 +320,7 @@ func (h *InitializationHandler) UpdateKBConfig(c *gin.Context) {
|
||||
knowledgeList, err := h.knowledgeService.ListPagedKnowledgeByKnowledgeBaseID(ctx,
|
||||
kbIdStr, &types.Pagination{Page: 1, PageSize: 1}, "", "", "")
|
||||
if err == nil && knowledgeList != nil && knowledgeList.Total > 0 {
|
||||
logger.Error(ctx, "Cannot change storage engine when files exist")
|
||||
c.Error(errors.NewBadRequestError("知识库中已有文件,无法切换存储引擎"))
|
||||
return
|
||||
logger.Warn(ctx, "Storage engine changed with existing files, old files may become inaccessible")
|
||||
}
|
||||
}
|
||||
kb.SetStorageProvider(provider)
|
||||
|
||||
Reference in New Issue
Block a user