fix(dataset): echo back selected datasets not in the first page (#17616)

This commit is contained in:
chanx
2026-07-31 14:41:54 +08:00
committed by GitHub
parent 51fe08712e
commit efeb4ab870
3 changed files with 56 additions and 3 deletions

View File

@@ -268,6 +268,14 @@ export function deleteKnowledgeGraph(knowledgeId: string) {
export const listDataset = (params?: IFetchKnowledgeListRequestParams) =>
request.get(api.kbList, { params });
// Fetch datasets by a set of IDs via the `ids` query param (comma-joined).
// Used to echo back already-selected datasets whose names are not present
// in the first page of the paginated list.
export const listDatasetByIds = (ids: string[]) =>
request.get(api.kbList, {
params: { ids: ids.join(','), page_size: ids.length },
});
export const datasetFilter = () => request.get(api.datasetFilter);
export const updateKb = (datasetId: string, data: Record<string, any>) =>