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 Common Constants

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

Overview

Concrete application-wide shared constants registry including file icon mappings, language codes, date formats, and UI configuration values for the RAGFlow frontend.

Description

The constants/common.ts module defines shared constants used across the application: file extension to icon type mappings, supported language codes, date format strings, pagination defaults, maximum upload sizes, and other UI configuration values.

Usage

Import specific constants when implementing file display, date formatting, pagination, or any feature that needs application-wide configuration values.

Code Reference

Source Location

Signature

export const fileIconMap: Record<string, string>;
export const Languages: { label: string; value: string }[];
export const PageSize: number;
export const MaxUploadSize: number;

Import

import { fileIconMap, Languages, PageSize } from '@/constants/common';

I/O Contract

Inputs

Name Type Required Description
Module-level constants; no inputs

Outputs

Name Type Description
fileIconMap Record File extension to icon type mapping
Languages array Supported language options
PageSize number Default pagination page size

Usage Examples

import { fileIconMap, PageSize } from '@/constants/common';

const iconType = fileIconMap['pdf']; // 'file-pdf'
const defaultPageSize = PageSize; // 30

Related Pages

Page Connections

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