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

From Leeroopedia
Revision as of 11:20, 16 February 2026 by Admin (talk | contribs) (Auto-imported from implementations/Infiniflow_Ragflow_DatasetSidebar_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 sidebar menu component based on knowledge base configuration and graph data availability.

Description

SideBar displays knowledge base metadata (avatar via RAGFlowAvatar, name, file count, size via formatBytes, creation date) and a navigation menu with four default items: Files, Testing, Overview, and Configuration. The menu items are built using route constants (Routes.DatasetBase, etc.) and rendered as Button components with active state styling based on useSecondPathName. When knowledge graph data exists (checked via useFetchKnowledgeGraph), a fifth Knowledge Graph menu item is dynamically added. Navigation is handled via useHandleMenuClick. The refreshCount prop forces avatar re-render.

Usage

Rendered as the left sidebar within the dataset detail page layout to provide sub-page navigation.

Code Reference

Source Location

Signature

export function SideBar({ refreshCount }: { refreshCount?: number }): JSX.Element;

Import

import { SideBar } from './sidebar';

I/O Contract

Inputs

Name Type Required Description
refreshCount number No Counter to force avatar image refresh

Outputs

Name Type Description
JSX.Element React element Sidebar with KB info and navigation menu

Usage Examples

<SideBar refreshCount={refreshCount} />

Related Pages

Page Connections

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