feat: improve document chunk loading and error handling in doc-content component

- Added state management for pending document requests to enhance user experience during chunk loading.
- Implemented error handling for chunk loading failures, providing user feedback through warnings.
- Adjusted scroll handling logic to ensure smoother pagination and prevent multiple concurrent requests.

This update enhances the reliability of document loading and improves user interaction during scrolling.
This commit is contained in:
wizardchen
2026-02-28 21:34:50 +08:00
committed by lyingbug
parent eb2dc534ad
commit 565660dc46
4 changed files with 58 additions and 13 deletions
+1
View File
@@ -61,6 +61,7 @@ type RouterParams struct {
// NewRouter 创建新的路由
func NewRouter(params RouterParams) *gin.Engine {
r := gin.New()
r.ContextWithFallback = true
// CORS 中间件应放在最前面
r.Use(cors.New(cors.Config{