Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

fix(web): add missing 'general' chunk method description in locales (#17773)

euvre6d44cd09eb1d
diff --git a/web/src/pages/dataset/dataset-setting/category-panel.tsx b/web/src/pages/dataset/dataset-setting/category-panel.tsx
index 5d0f413c5c..2e39b6b4f7 100644
--- a/web/src/pages/dataset/dataset-setting/category-panel.tsx
+++ b/web/src/pages/dataset/dataset-setting/category-panel.tsx
@@ -6,7 +6,7 @@ import DOMPurify from 'dompurify';
import camelCase from 'lodash/camelCase';
import { useMemo } from 'react';
import { TagTabs } from './tag-tabs';
-import { ImageMap } from './utils';
+import { DescriptionKeyMap, ImageMap } from './utils';
const CategoryPanel = ({ chunkMethod }: { chunkMethod: string }) => {
const parserList = useSelectParserList();
@@ -15,9 +15,10 @@ const CategoryPanel = ({ chunkMethod }: { chunkMethod: string }) => {
const item = useMemo(() => {
const item = parserList.find((x) => x.value === chunkMethod);
if (item) {
+ const descriptionKey = DescriptionKeyMap[item.value] ?? item.value;
return {
title: item.label,
- description: t(camelCase(item.value)),
+ description: t(camelCase(descriptionKey)),
};
}
return { title: '', description: '' };
diff --git a/web/src/pages/dataset/dataset-setting/utils.ts b/web/src/pages/dataset/dataset-setting/utils.ts
index 60258ff00c..b4a6772b1d 100644
--- a/web/src/pages/dataset/dataset-setting/utils.ts
+++ b/web/src/pages/dataset/dataset-setting/utils.ts
@@ -3,6 +3,12 @@ const getImageName = (prefix: string, length: number) =>
.fill(0)
.map((x, idx) => `chunk-method/${prefix}-0${idx + 1}`);
+// The Go pipeline catalog uses 'general' as the id of the parser that the
+// Python backend calls 'naive'; both share the same description.
+export const DescriptionKeyMap: Record<string, string> = {
+ general: 'naive',
+};
+
export const ImageMap = {
book: getImageName('book', 4),
laws: getImageName('law', 2),