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 ReparseDialog Component

From Leeroopedia
Revision as of 11:22, 16 February 2026 by Admin (talk | contribs) (Auto-imported from implementations/Infiniflow_Ragflow_ReparseDialog_Component.md)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Knowledge Sources
Domains Frontend, Knowledge_Base
Last Updated 2026-02-12 06:00 GMT

Overview

Dynamic form generation dialog for document reparse operations with conditional checkbox fields.

Description

ReparseDialog is a memoized component that dynamically generates form fields based on chunk_num and enable_metadata flags. When chunk_num > 0, a delete checkbox is shown (offering to redo existing chunks). When enable_metadata is true, an apply_kb checkbox offers to apply auto-metadata settings. The component uses DynamicForm.Root with a ref-based imperative API for form control. If hidden is true (no chunks and no metadata), it auto-triggers the operation immediately via useEffect. The dialog wraps ConfirmDeleteDialog with custom title, content, and OK/Cancel handlers.

Usage

Opened by ParsingStatusCell when the user initiates a reparse operation on a document that may have existing chunks or metadata settings.

Code Reference

Source Location

Signature

export const ReparseDialog = memo(({
  handleOperationIconClick, chunk_num, enable_metadata,
  hidden, visible, hideModal,
}: DialogProps & {
  chunk_num: number;
  handleOperationIconClick: (options?: { delete: boolean; apply_kb: boolean }) => void;
  enable_metadata?: boolean;
  visible: boolean;
  hideModal: () => void;
  hidden?: boolean;
}) => JSX.Element);

Import

import { ReparseDialog } from './reparse-dialog';

I/O Contract

Inputs

Name Type Required Description
chunk_num number Yes Number of existing chunks (controls delete checkbox)
handleOperationIconClick function Yes Callback with delete/apply_kb options
enable_metadata boolean No Whether metadata auto-apply is available
visible boolean Yes Dialog visibility
hideModal function Yes Close dialog callback
hidden boolean No If true, auto-triggers operation without dialog

Outputs

Name Type Description
JSX.Element React element Confirmation dialog with dynamic checkbox form

Usage Examples

<ReparseDialog
  chunk_num={42}
  enable_metadata={true}
  handleOperationIconClick={(opts) => runParse(opts)}
  visible={dialogVisible}
  hideModal={hideDialog}
/>

Related Pages

Page Connections

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