feat(knowledge-base): 实现知识库文件夹功能和优化文件管理

- 添加 datasetId 和 filePath 字段到 DatasetFile 接口
- 实现 resolveRelativeFileName 函数用于解析相对文件名
- 在 AddDataDialog 中使用 resolveRelativeFileName 处理文件名
- 添加文件夹浏览功能,支持目录导航和层级显示
- 实现文件夹删除功能,可批量删除目录下所有文件
- 集成 Folder 和 File 图标组件用于目录和文件区分
- 优化文件列表加载逻辑,使用分页和关键词搜索
- 添加文件夹状态显示和相应操作按钮
- 实现文件路径前缀管理和子目录过滤
- 重构文件列表渲染逻辑,支持目录和文件混合展示
This commit is contained in:
2026-01-30 21:30:54 +08:00
parent 9a205919d7
commit a00a6ed3c3
3 changed files with 397 additions and 46 deletions

View File

@@ -34,10 +34,12 @@ export enum DataSource {
export interface DatasetFile {
id: string;
datasetId?: string;
fileName: string;
size: string;
uploadDate: string;
path: string;
filePath?: string;
}
export interface Dataset {