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 names of custom pipelines should be displayed as in the original text. (#21300)
balibabu9f8f0dad60d9
diff --git a/web/src/pages/dataset/dataset/parsing-status-cell.tsx b/web/src/pages/dataset/dataset/parsing-status-cell.tsxindex 0663055440..3340fe2dbd 100644--- a/web/src/pages/dataset/dataset/parsing-status-cell.tsx+++ b/web/src/pages/dataset/dataset/parsing-status-cell.tsx@@ -24,6 +24,7 @@ import { ReparseDialog } from './reparse-dialog';import { UseChangeDocumentParserShowType } from './use-change-document-parser';import { useHandleRunDocumentByIds } from './use-run-document';import {+ getDocumentParserLabel,getDocumentRunningStatus,isDocumentProcessing,isDocumentStopping,@@ -71,7 +72,7 @@ export function ParseDropdownButton({record: IDocumentInfo;} & UseChangeDocumentParserShowType) {const { t } = useTranslation();- const { pipeline_id, pipeline_name, chunk_method } = record;+ const parserLabel = getDocumentParserLabel(record);const handleShowChangeParserModal = useCallback(() => {showChangeParserModal(record);@@ -83,22 +84,12 @@ export function ParseDropdownButton({<div><Tooltip><TooltipTrigger asChild>- <Button variant="static" size="auto" className="capitalize">- {pipeline_id- ? pipeline_name || pipeline_id- : chunk_method === 'naive'- ? 'general'- : chunk_method}+ <Button variant="static" size="auto">+ {parserLabel}</Button></TooltipTrigger><TooltipContent>- <p className="capitalize">- {pipeline_id- ? pipeline_name || pipeline_id- : chunk_method === 'naive'- ? 'general'- : chunk_method}- </p>+ <p>{parserLabel}</p></TooltipContent></Tooltip></div>@@ -272,7 +263,6 @@ export function ParsingStatusCell({)}{reparseDialogVisible && (<ReparseDialog- forceDeletehandleOperationIconClick={handleOperationIconClick}visible={reparseDialogVisible}hideModal={hideReparseDialogModal}diff --git a/web/src/pages/dataset/dataset/utils.test.ts b/web/src/pages/dataset/dataset/utils.test.tsindex 04cd589bc3..bfac344d5e 100644--- a/web/src/pages/dataset/dataset/utils.test.ts+++ b/web/src/pages/dataset/dataset/utils.test.ts@@ -12,6 +12,7 @@ import {findDocumentsParserGaps,findFilesParserGaps,findParserGap,+ getDocumentParserLabel,getDocumentRunningStatus,getDocumentProgressMessage,getFileTypeByExtension,@@ -42,6 +43,45 @@ describe('isDocumentStopping', () => {});});+describe('getDocumentParserLabel', () => {+ const builtin = (chunk_method: string) => ({+ pipeline_id: '',+ pipeline_name: '',+ chunk_method,+ });++ it('capitalizes the first letter of a built-in parser id', () => {+ expect(getDocumentParserLabel(builtin('paper'))).toBe('Paper');+ expect(getDocumentParserLabel(builtin('knowledge_graph'))).toBe(+ 'Knowledge_graph',+ );+ });++ it('maps the legacy naive alias onto the general pipeline', () => {+ expect(getDocumentParserLabel(builtin('naive'))).toBe('General');+ });++ it('keeps a canvas pipeline title in its original format', () => {+ expect(+ getDocumentParserLabel({+ pipeline_id: 'abc123',+ pipeline_name: 'my custom pipeline',+ chunk_method: 'naive',+ }),+ ).toBe('my custom pipeline');+ });++ it('falls back to the raw pipeline id when the title is empty', () => {+ expect(+ getDocumentParserLabel({+ pipeline_id: 'abc123',+ pipeline_name: '',+ chunk_method: 'naive',+ }),+ ).toBe('abc123');+ });+});+describe('getDocumentProgressMessage', () => {it('reads the latest real ingestion event', () => {expect(diff --git a/web/src/pages/dataset/dataset/utils.ts b/web/src/pages/dataset/dataset/utils.tsindex 2778eb7d65..05057233dc 100644--- a/web/src/pages/dataset/dataset/utils.ts+++ b/web/src/pages/dataset/dataset/utils.ts@@ -6,6 +6,7 @@ import {getOperatorType,transformParserConfigSetups,} from '@/utils/pipeline-operator';+import { upperFirst } from 'lodash';import {IngestionTaskStatus,ParserGapReason,@@ -84,6 +85,25 @@ export const getDocumentProgressMessage = (document: Pick<IDocumentInfo, 'latest_ingestion_event'>,) => document.latest_ingestion_event?.message || '-';+/**+ * Label shown in the dataset table's parse column. A built-in pipeline renders+ * its parser id with the first letter capitalized ("general" -> "General"); a+ * canvas pipeline keeps the user-chosen title (falling back to the raw id)+ * untouched. "naive" is the legacy alias of the built-in general pipeline.+ */+export const getDocumentParserLabel = (+ document: Pick<+ IDocumentInfo,+ 'pipeline_id' | 'pipeline_name' | 'chunk_method'+ >,+) => {+ const { pipeline_id, pipeline_name, chunk_method } = document;+ if (pipeline_id) {+ return pipeline_name || pipeline_id;+ }+ return upperFirst(chunk_method === 'naive' ? 'general' : chunk_method);+};+/*** Whether a cancel request is currently in flight for the document.* Only the Go backend reports STOPPING; Python always returns false.