Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

Fix: Component definition is missing display name. (#14255)

balibabu4841ce4239c3
diff --git a/web/src/components/children-delimiter-form.tsx b/web/src/components/children-delimiter-form.tsx
index b39d243c12..678be44e11 100644
--- a/web/src/components/children-delimiter-form.tsx
+++ b/web/src/components/children-delimiter-form.tsx
@@ -18,7 +18,10 @@ interface IProps {
}
export const DelimiterInput = forwardRef<HTMLInputElement, InputProps & IProps>(
- ({ value, onChange, maxLength, defaultValue, ...props }, ref) => {
+ function DelimiterInput(
+ { value, onChange, maxLength, defaultValue, ...props },
+ ref,
+ ) {
const nextValue = value
?.replaceAll('\n', '\\n')
.replaceAll('\t', '\\t')
diff --git a/web/src/components/delimiter-form-field.tsx b/web/src/components/delimiter-form-field.tsx
index 77fded5a35..40f97a2c81 100644
--- a/web/src/components/delimiter-form-field.tsx
+++ b/web/src/components/delimiter-form-field.tsx
@@ -17,7 +17,10 @@ interface IProps {
}
export const DelimiterInput = forwardRef<HTMLInputElement, InputProps & IProps>(
- ({ value, onChange, maxLength, defaultValue, ...props }, ref) => {
+ function DelimiterInput(
+ { value, onChange, maxLength, defaultValue, ...props },
+ ref,
+ ) {
const nextValue = value
?.replaceAll('\n', '\\n')
.replaceAll('\t', '\\t')
diff --git a/web/src/components/document-preview/document-header.tsx b/web/src/components/document-preview/document-header.tsx
index d5d47d72b1..aadac8c7e2 100644
--- a/web/src/components/document-preview/document-header.tsx
+++ b/web/src/components/document-preview/document-header.tsx
@@ -9,7 +9,12 @@ type Props = {
className?: string;
};
-export default ({ size, name, create_date, className }: Props) => {
+export default function DocumentHeader({
+ size,
+ name,
+ create_date,
+ className,
+}: Props) {
const sizeName = formatBytes(size);
const dateStr = formatDate(create_date);
@@ -32,4 +37,4 @@ export default ({ size, name, create_date, className }: Props) => {
</dl>
</header>
);
-};
+}
diff --git a/web/src/components/theme-switch.tsx b/web/src/components/theme-switch.tsx
index 1f4dde3e96..3143c84637 100644
--- a/web/src/components/theme-switch.tsx
+++ b/web/src/components/theme-switch.tsx
@@ -8,7 +8,7 @@ import { forwardRef } from 'react';
const ThemeSwitch = forwardRef<
React.ElementRef<typeof Root>,
React.ComponentPropsWithoutRef<typeof Root>
->(({ className, ...props }, ref) => {
+>(function ThemeSwitch({ className, ...props }, ref) {
const { setTheme } = useTheme();
const isDark = useIsDarkTheme();
diff --git a/web/src/components/ui/dual-range-slider.tsx b/web/src/components/ui/dual-range-slider.tsx
index d8a581587a..221d34d021 100644
--- a/web/src/components/ui/dual-range-slider.tsx
+++ b/web/src/components/ui/dual-range-slider.tsx
@@ -80,4 +80,6 @@ const SingleFormSlider = React.forwardRef<
);
});
+SingleFormSlider.displayName = 'SingleFormSlider';
+
export { DualRangeSlider, SingleFormSlider };
diff --git a/web/src/components/ui/textarea.tsx b/web/src/components/ui/textarea.tsx
index 08fd8a6ed6..03ac2f9a90 100644
--- a/web/src/components/ui/textarea.tsx
+++ b/web/src/components/ui/textarea.tsx
@@ -10,8 +10,10 @@ import {
useRef,
useState,
} from 'react';
-interface TextareaProps
- extends Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'autoSize'> {
+interface TextareaProps extends Omit<
+ TextareaHTMLAttributes<HTMLTextAreaElement>,
+ 'autoSize'
+> {
autoSize?: {
minRows?: number;
maxRows?: number;
@@ -95,9 +97,10 @@ const Textarea = forwardRef<HTMLTextAreaElement, TextareaProps>(
)}
rows={autoSize?.minRows ?? props.rows ?? undefined}
style={{
- maxHeight: autoSize?.maxRows && !resizable
- ? `${autoSize.maxRows * 20}px`
- : undefined,
+ maxHeight:
+ autoSize?.maxRows && !resizable
+ ? `${autoSize.maxRows * 20}px`
+ : undefined,
resize,
}}
ref={textareaRef}
@@ -118,7 +121,7 @@ export const BlurTextarea = forwardRef<
value: Value;
onChange(value: Value): void;
}
->(({ value, onChange, ...props }, ref) => {
+>(function BlurTextarea({ value, onChange, ...props }, ref) {
const [val, setVal] = useState<Value>();
const handleChange: ChangeEventHandler<HTMLTextAreaElement> = useCallback(
diff --git a/web/src/pages/chunk/parsed-result/add-knowledge/components/knowledge-chunk/components/chunk-result-bar/checkbox-sets.tsx b/web/src/pages/chunk/parsed-result/add-knowledge/components/knowledge-chunk/components/chunk-result-bar/checkbox-sets.tsx
index 77169cea4c..e31d224731 100644
--- a/web/src/pages/chunk/parsed-result/add-knowledge/components/knowledge-chunk/components/chunk-result-bar/checkbox-sets.tsx
+++ b/web/src/pages/chunk/parsed-result/add-knowledge/components/knowledge-chunk/components/chunk-result-bar/checkbox-sets.tsx
@@ -18,7 +18,7 @@ type ICheckboxSetProps = {
checked: boolean;
selectedChunkIds: string[];
};
-export default (props: ICheckboxSetProps) => {
+export default function CheckboxSets(props: ICheckboxSetProps) {
const {
className,
selectAllChunk,
@@ -79,4 +79,4 @@ export default (props: ICheckboxSetProps) => {
)}
</div>
);
-};
+}
diff --git a/web/src/pages/dataflow-result/components/chunk-result-bar/checkbox-sets.tsx b/web/src/pages/dataflow-result/components/chunk-result-bar/checkbox-sets.tsx
index bf98299a23..7b4f571c83 100644
--- a/web/src/pages/dataflow-result/components/chunk-result-bar/checkbox-sets.tsx
+++ b/web/src/pages/dataflow-result/components/chunk-result-bar/checkbox-sets.tsx
@@ -10,7 +10,7 @@ type ICheckboxSetProps = {
checked: boolean;
selectedChunkIds: string[];
};
-export default (props: ICheckboxSetProps) => {
+export default function CheckboxSets(props: ICheckboxSetProps) {
const { selectAllChunk, removeChunk, checked, selectedChunkIds } = props;
const { t } = useTranslation();
const handleSelectAllCheck = useCallback(
@@ -53,4 +53,4 @@ export default (props: ICheckboxSetProps) => {
)}
</div>
);
-};
+}
diff --git a/web/src/pages/dataflow-result/components/chunk-result-bar/index.tsx b/web/src/pages/dataflow-result/components/chunk-result-bar/index.tsx
index 5839f21163..48540cfe12 100644
--- a/web/src/pages/dataflow-result/components/chunk-result-bar/index.tsx
+++ b/web/src/pages/dataflow-result/components/chunk-result-bar/index.tsx
@@ -9,11 +9,11 @@ interface ChunkResultBarProps {
createChunk: (text: string) => void;
isReadonly: boolean;
}
-export default ({
+export default function ChunkResultBar({
changeChunkTextMode,
createChunk,
isReadonly,
-}: ChunkResultBarProps) => {
+}: ChunkResultBarProps) {
const { t } = useTranslate('chunk');
const [textSelectValue, setTextSelectValue] = useState<ChunkTextMode>(
ChunkTextMode.Full,
@@ -57,4 +57,4 @@ export default ({
)}
</div>
);
-};
+}
diff --git a/web/src/pages/memories/add-or-edit-modal.tsx b/web/src/pages/memories/add-or-edit-modal.tsx
index 238425608e..859a8518e8 100644
--- a/web/src/pages/memories/add-or-edit-modal.tsx
+++ b/web/src/pages/memories/add-or-edit-modal.tsx
@@ -14,7 +14,7 @@ type IProps = {
loading?: boolean;
isCreate?: boolean;
};
-export const AddOrEditModal = memo((props: IProps) => {
+export const AddOrEditModal = memo(function AddOrEditModal(props: IProps) {
const { open, onClose, onSubmit, initialMemory, isCreate } = props;
const { t } = useTranslation();
// const { modelOptions } = useModelOptions();