Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Infiniflow Ragflow DataflowParser Component

From Leeroopedia
Knowledge Sources
Domains Frontend, Dataflow, Chunk_Management
Last Updated 2026-02-12 06:00 GMT

Overview

Concrete React container component for the parser/splitter step within the dataflow pipeline result view, providing editable output content with chunk CRUD operations and rerun capability.

Description

The ParserContainer component renders the parser step output in the dataflow pipeline. It extracts the step's output data from data.value.obj.params.outputs using the configured output format key. The component supports two modes based on the step type: for character/title splitter steps (isChunck), it shows CheckboxSets for bulk select/delete and ChunkResultBar for text mode toggling and new chunk creation; for parser steps, it shows a summary heading with summaryInfo. Content is rendered via FormatPreserEditor which supports in-place editing. Changes are tracked via a diff against the initial value, and when modifications exist, a RerunButton appears (unless read-only) that reconstructs the output data and triggers reRunFunc to re-execute the pipeline step. Chunk deletion filters by index from the value array, and new chunks are appended with a text payload.

Usage

Rendered within the DataflowResult page when the active timeline step is a parser, character splitter, title splitter, or context generator type.

Code Reference

Source Location

Signature

interface IProps {
  isReadonly: boolean;
  isChange: boolean;
  setIsChange: (isChange: boolean) => void;
  step?: TimelineNode;
  data: { value: IDslComponent; key: string };
  reRunLoading: boolean;
  clickChunk: (chunk: IChunk) => void;
  summaryInfo: string;
  reRunFunc: (data: { value: IDslComponent; key: string }) => void;
}

const ParserContainer: React.FC<IProps>;
export default ParserContainer;

Import

import ParserContainer from '@/pages/dataflow-result/parser';

I/O Contract

Inputs

Name Type Required Description
isReadonly boolean Yes Whether the content is read-only (disables editing and rerun)
isChange boolean Yes Whether content has been modified since last pipeline run
setIsChange function Yes Callback to update the change tracking flag
step TimelineNode No Current timeline step metadata (determines splitter vs parser UI)
data object Yes Step output data with IDslComponent value and key
reRunLoading boolean Yes Loading state for the rerun operation
clickChunk function Yes Callback when a chunk is clicked for highlight in document preview
summaryInfo string Yes Summary text for parser-type steps
reRunFunc function Yes Callback to re-execute the pipeline step with modified data

Outputs

Name Type Description
Container JSX ReactNode Parser step UI with editable content, optional chunk controls, and rerun button

Usage Examples

import ParserContainer from './parser';

<ParserContainer
  isReadonly={isReadOnly}
  isChange={isChange}
  reRunLoading={reRunLoading}
  setIsChange={setIsChange}
  step={currentTimeNode}
  data={currentTimeNode.detail as { value: IDslComponent; key: string }}
  summaryInfo={summaryInfo}
  clickChunk={handleChunkCardClick}
  reRunFunc={handleReRunFunc}
/>

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment