RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.
Go agent-harnessagent-native-databaseagentic-aiagentic-retrievalagentic-searchaiai-agentscontext-enginecontext-engineeringcontext-managementharness-engineeringknowledge-compilationragretrieval-augmented-generationretrieval-harnesssearch-harness
Fix: The configuration for the pipeline manual chunker cannot be displayed. (#20106)
balibabu7dfc1041002f
diff --git a/web/src/locales/en.ts b/web/src/locales/en.tsindex 1ee381e0a2..ddb65d41e8 100644--- a/web/src/locales/en.ts+++ b/web/src/locales/en.ts@@ -3548,12 +3548,16 @@ This process aggregates variables from multiple branches into a single variableretrievalMemoryRequired: 'Please select memories first',tokenizerDescription:'Transforms text into the required data structure (e.g., vector embeddings for Embedding Search) depending on the chosen search method.',+ generalChunkerDescription:+ 'A general-purpose chunking method for most document types, with flexible control over chunk size, overlap, and context.',tokenChunker: 'Token Chunker',tokenChunkerDescription:'Split text into chunks by token length with optional delimiters and overlap.',titleChunkerDescription:'Split documents into sections by title hierarchy. Define heading levels with regex rules, then choose Hierarchy or Group mode to control how chunks are structured.',titleChunker: 'Title Chunker',+ manualChunkerDescription:+ 'A chunking method for manual-style documents such as product manuals and user guides, with structure-aware splitting that preserves relevant context.',oneChunkerDescription:'No additional configuration is required for this chunker.',qAChunkerDescription:diff --git a/web/src/locales/zh.ts b/web/src/locales/zh.tsindex 6a604ea143..085bb85df0 100644--- a/web/src/locales/zh.ts+++ b/web/src/locales/zh.ts@@ -3068,12 +3068,16 @@ NER:使用 spaCy NER 和基于规则的关键词提取来抽取 Entities 和 RretrievalMemoryRequired: '请先选择记忆',tokenizerDescription:'根据所选的搜索方法,将文本转换为所需的数据结构(例如,用于嵌入搜索的 Embedding)。',+ generalChunkerDescription:+ '通用文本分块方式,适用于大多数文档类型,可灵活控制块大小、重叠和上下文范围。',tokenChunker: '按 Token 分块',tokenChunkerDescription:'根据分词器长度将文本拆分成块,并带有可选的分隔符和重叠。',titleChunkerDescription:'按标题层级拆分文档。通过正则表达式定义各级标题,再选择层级或分组模式控制切片方式。',titleChunker: '按标题分块',+ manualChunkerDescription:+ '手册类文档分块方式,适用于产品手册、用户指南等,可根据文档结构进行分块并保留必要的上下文。',oneChunkerDescription: '此 Chunker 无需额外配置。',qAChunkerDescription: '此 Chunker 无需额外配置。',tableChunkerDescription: '此 Chunker 无需额外配置。',diff --git a/web/src/pages/agent/form-sheet/form-config-map.tsx b/web/src/pages/agent/form-sheet/form-config-map.tsxindex d4cb0611cb..553c8ff715 100644--- a/web/src/pages/agent/form-sheet/form-config-map.tsx+++ b/web/src/pages/agent/form-sheet/form-config-map.tsx@@ -195,6 +195,11 @@ export const FormConfigMap = {[Operator.TitleChunker]: {component: TitleChunkerForm,},+ [Operator.ManualChunker]: {+ component: (props: INextOperatorForm) => (+ <TitleChunkerForm {...props} pinMethodGroup />+ ),+ },[Operator.Extractor]: {component: ExtractorForm,},diff --git a/web/src/pages/agent/utils.ts b/web/src/pages/agent/utils.tsindex 01523539a5..9aada74c9c 100644--- a/web/src/pages/agent/utils.ts+++ b/web/src/pages/agent/utils.ts@@ -427,6 +427,10 @@ export function transformTitleChunkerParams('groupRules','hierarchyHierarchy','hierarchyGroup',+ // Legacy pre-split rules field. The active rules have already been+ // resolved (with `rules` as fallback) into `levels` above; keep the+ // serialized params identical to the template's obj.params shape.+ 'rules',]),method: params.method,hierarchy: Number(hierarchyValue || 0),@@ -696,6 +700,14 @@ export const buildDslComponentsByGraph = (case Operator.TitleChunker:params = transformTitleChunkerParams(params);break;+ case Operator.ManualChunker:+ // These fields are UI-only for the manual chunker and are not read+ // by the backend ManualChunker component (manual.go pins method=group,+ // ignores the token cap).+ params = transformTitleChunkerParams(+ omit(params, ['include_heading_content', 'chunk_token_cap']) as any,+ );+ break;case Operator.Extractor:params = transformExtractorParams(params);break;diff --git a/web/src/pages/agent/utils/__tests__/build-dsl-components.test.ts b/web/src/pages/agent/utils/__tests__/build-dsl-components.test.tsnew file mode 100644index 0000000000..4c69050d59--- /dev/null+++ b/web/src/pages/agent/utils/__tests__/build-dsl-components.test.ts@@ -0,0 +1,76 @@+// Regression tests for buildDslComponentsByGraph's per-operator param+// transforms. Focus: ManualChunker must serialize the form (rules /+// hierarchyGroup) into the backend params shape (levels / numeric hierarchy)+// — the same contract the Manual template's obj.params bakes in and+// manual.go consumes.++import { Operator } from '../../constant';+import { buildDslComponentsByGraph } from '../../utils';++describe('buildDslComponentsByGraph ManualChunker params', () => {+ const manualChunkerNode = {+ id: 'ManualChunker:TestId',+ type: 'chunkerNode',+ position: { x: 0, y: 0 },+ data: {+ label: Operator.ManualChunker,+ name: 'Manual Chunker',+ form: {+ method: 'group',+ hierarchyHierarchy: '0',+ hierarchyGroup: '3',+ hierarchyRules: [{ levels: [{ expression: '^#[^#]' }] }],+ groupRules: [+ { levels: [{ expression: '第[0-9]+章' }] },+ { levels: [{ expression: '第[0-9]+节' }] },+ ],+ // Legacy field baked into the Manual template's node form; must not+ // leak into the serialized params (levels already carries it).+ rules: [{ levels: [{ expression: '^#[^#]' }] }],+ include_heading_content: true,+ root_chunk_as_heading: true,+ chunk_token_cap: 512,+ outputs: { chunks: { type: 'Array<Object>', value: [] } },+ },+ },+ } as any;++ it('converts the form shape into the backend params shape', () => {+ const components = buildDslComponentsByGraph(+ [manualChunkerNode],+ [],+ {},+ ) as any;++ const params = components['ManualChunker:TestId'].obj.params;++ expect(params.hierarchy).toBe(3);+ expect(params.levels).toEqual([['第[0-9]+章'], ['第[0-9]+节']]);+ // UI-only fields must not leak into the backend params.+ expect(params.groupRules).toBeUndefined();+ expect(params.hierarchyRules).toBeUndefined();+ expect(params.rules).toBeUndefined();+ expect(params.hierarchyHierarchy).toBeUndefined();+ expect(params.hierarchyGroup).toBeUndefined();+ expect(params.chunk_token_cap).toBeUndefined();+ // include_heading_content is stripped before the transform but the+ // transform unconditionally re-adds it as false — the backend+ // (manual.go) pins method=group and ignores it either way.+ expect(params.include_heading_content).toBe(false);+ });++ it('keeps wire-format fields such as outputs and method', () => {+ const components = buildDslComponentsByGraph(+ [manualChunkerNode],+ [],+ {},+ ) as any;++ const params = components['ManualChunker:TestId'].obj.params;++ expect(params.method).toBe('group');+ expect(params.outputs).toEqual({+ chunks: { type: 'Array<Object>', value: [] },+ });+ });+});