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

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

Overview

Concrete document generation/processing trigger button component provided by the RAGFlow frontend.

Description

The Generate component renders a dropdown menu button that triggers Knowledge Graph or Raptor generation tasks on a dataset. Each `MenuItem` displays the current generation status (start, running, completed, failed) with a progress bar and supports run, pause, and retry actions. It also exports `GenerateLogButton` which shows the generation completion date and provides a delete action to unbind tasks. Status is tracked via `useTraceGenerate` and operations are performed through `useDatasetGenerate`.

Usage

Import as the default export for the generate dropdown, or import `GenerateLogButton` for displaying generation log entries. Place within the dataset document list toolbar.

Code Reference

Source Location

Signature

export enum GenerateType { KnowledgeGraph = 'KnowledgeGraph', Raptor = 'Raptor' }
export const GenerateTypeMap: Record<GenerateType, ProcessingType>;

const Generate: React.FC<{ disabled?: boolean }> = (props) => { ... }
export default Generate;

export type IGenerateLogButtonProps = { finish_at: string; task_id: string };
export type IGenerateLogProps = IGenerateLogButtonProps & {
  id?: string; status: 0 | 1; message?: string; type?: GenerateType; onDelete?: () => void;
};
export const GenerateLogButton: React.FC<IGenerateLogProps>;

Import

import Generate, { GenerateLogButton, GenerateType } from '@/pages/dataset/dataset/generate-button/generate';

I/O Contract

Inputs

Name Type Required Description
disabled boolean No When true, disables the generate dropdown trigger button

Outputs

Name Type Description
JSX.Element React.ReactElement Renders a dropdown menu with Knowledge Graph and Raptor generation options showing live progress

Usage Examples

import Generate from '@/pages/dataset/dataset/generate-button/generate';

<Generate disabled={false} />

Related Pages

Page Connections

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