Fix: The file count in the file header did not change after uploading or deleting files. (#14034)

### What problem does this PR solve?
Fix: The file count in the file header did not change after uploading or
deleting files.

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)

Co-authored-by: Yingfeng <yingfeng.zhang@gmail.com>
This commit is contained in:
balibabu
2026-04-14 18:07:32 +08:00
committed by GitHub
parent 576431de99
commit 1bc4868abe
13 changed files with 123 additions and 70 deletions

View File

@@ -0,0 +1,79 @@
// for the dataset list
// The data structures returned by the `datasets` interface and `kb/detail` are inconsistent.
export interface IDataset {
avatar?: string;
chunk_count: number;
chunk_method: string;
create_date: string;
create_time: number;
created_by: string;
description?: string;
document_count: number;
embedding_model: string;
graphrag_task_finish_at: null;
graphrag_task_id: Nullable<string>;
id: string;
language: string;
mindmap_task_finish_at: null;
mindmap_task_id: Nullable<string>;
name: string;
nickname: string;
pagerank: number;
parser_config: Parserconfig;
permission: string;
pipeline_id: string;
raptor_task_finish_at: string;
raptor_task_id: string;
similarity_threshold: number;
status: string;
tenant_avatar: string;
tenant_embd_id: number;
tenant_id: string;
token_num: number;
update_date: string;
update_time: number;
vector_similarity_weight: number;
}
interface Parserconfig {
auto_keywords: number;
auto_questions: number;
children_delimiter: string;
chunk_token_num: number;
delimiter: string;
graphrag: Graphrag;
html4excel: boolean;
image_context_size: number;
layout_recognize: string;
llm_id: string;
parent_child: Parentchild;
raptor: Raptor;
table_context_size: number;
topn_tags: number;
}
interface Raptor {
max_cluster: number;
max_token: number;
prompt: string;
random_seed: number;
threshold: number;
use_raptor: boolean;
}
interface Parentchild {
children_delimiter: string;
use_parent_child: boolean;
}
interface Graphrag {
entity_types: string[];
method: string;
use_graphrag: boolean;
}
export interface IDatasetListResult {
kbs: IDataset[];
total_datasets: number;
}

View File

@@ -1,5 +1,5 @@
import { RunningStatus } from '@/constants/knowledge';
import { DataSourceKey } from '@/pages/user-setting/data-source/contant';
import { DataSourceKey } from '@/pages/user-setting/data-source/constant';
import { TreeData } from '@antv/g6/lib/types';
export interface IConnector {
id: string;
@@ -8,15 +8,15 @@ export interface IConnector {
source: DataSourceKey;
auto_parse?: '0' | '1';
}
// knowledge base
// knowledge base detail
export interface IKnowledge {
avatar?: any;
chunk_count: number;
chunk_num: number;
create_date: string;
create_time: number;
created_by: string;
description: string;
document_count: number;
doc_num: number;
id: string;
name: string;
parser_config: ParserConfig;
@@ -43,6 +43,8 @@ export interface IKnowledge {
graphrag_task_finish_at: string;
graphrag_task_id: string;
connectors: IConnector[];
embd_id: string;
parser_id: string;
}
export interface IKnowledgeResult {