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:
@@ -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{
|
||||
|
||||
Reference in New Issue
Block a user