feat(ai): 文档管理 handler — CRUD + Multipart 上传

- list_documents: 分页列表(按知识库过滤)
- get_document: 文档详情
- create_manual_document: 手动输入文档
- upload_document: Multipart 文件上传(20MB 限制 + 自动解析)
- delete_document: 软删除(级联减计数)
- 5 条路由注册到 /ai/knowledge-bases/{kb_id}/documents + /ai/documents/*

Phase 2 Task 10
This commit is contained in:
iven
2026-05-27 00:17:43 +08:00
parent 0a1f4cb9a9
commit e94f5bc00c
3 changed files with 276 additions and 0 deletions

View File

@@ -14,6 +14,7 @@ use crate::state::AiState;
pub mod chat_handler;
pub mod config_handler;
pub mod document_handler;
pub mod insight_handler;
pub mod knowledge_handler;
pub mod knowledge_v2_handler;