Integrated Redux for state management with auth and settings slices. (#117)

* feat: Implement DatasetFileTransfer component for file selection and management

* feat: Add pagination support to file list in Overview component

* feat: add DatasetFileTransfer and TagManagement components

- Added DatasetFileTransfer component for managing dataset files.
- Introduced TagManagement component for handling tags.
- Integrated Redux for state management with auth and settings slices.
- Updated package.json to include @reduxjs/toolkit and react-redux dependencies.
- Refactored existing components to utilize new DatasetFileTransfer and TagManagement components.
- Implemented hooks for typed dispatch and selector in Redux.
- Enhanced CreateKnowledgeBase and SynthesisTask components to support new features.
This commit is contained in:
chenghh-9609
2025-11-29 17:37:36 +08:00
committed by GitHub
parent 2e13bb9b4c
commit 5c178d5274
16 changed files with 305 additions and 22 deletions

View File

@@ -13,7 +13,6 @@ import {
} from "@/pages/DataManagement/dataset.api";
import { formatBytes } from "@/utils/unit";
import { useDebouncedEffect } from "@/hooks/useDebouncedEffect";
import { DatasetFileCols as fileCols } from "../pages/KnowledgeBase/knowledge-base.const";
interface DatasetFileTransferProps
extends React.HTMLAttributes<HTMLDivElement> {
@@ -22,6 +21,28 @@ interface DatasetFileTransferProps
onSelectedFilesChange: (filesMap: { [key: string]: DatasetFile }) => void;
}
const fileCols = [
{
title: "所属数据集",
dataIndex: "datasetName",
key: "datasetName",
ellipsis: true,
},
{
title: "文件名",
dataIndex: "fileName",
key: "fileName",
ellipsis: true,
},
{
title: "大小",
dataIndex: "fileSize",
key: "fileSize",
ellipsis: true,
render: formatBytes,
},
];
// Customize Table Transfer
const DatasetFileTransfer: React.FC<DatasetFileTransferProps> = ({
open,