diff --git a/web/src/components/parse-configuration/raptor-form-fields.tsx b/web/src/components/parse-configuration/raptor-form-fields.tsx
index 17d631ad3..3552c8976 100644
--- a/web/src/components/parse-configuration/raptor-form-fields.tsx
+++ b/web/src/components/parse-configuration/raptor-form-fields.tsx
@@ -86,10 +86,10 @@ const RaptorFormFields = () => {
defaultChecked={false}
className="items-center space-y-0 "
>
-
+
{t('useRaptor')}
diff --git a/web/src/components/ragflow-avatar.tsx b/web/src/components/ragflow-avatar.tsx
index ab46f9f73..e84a01b34 100644
--- a/web/src/components/ragflow-avatar.tsx
+++ b/web/src/components/ragflow-avatar.tsx
@@ -3,6 +3,13 @@ import * as AvatarPrimitive from '@radix-ui/react-avatar';
import { forwardRef, memo, useEffect, useRef, useState } from 'react';
import { Avatar, AvatarFallback, AvatarImage } from './ui/avatar';
+const PREDEFINED_COLORS = [
+ { from: '#4F6DEE', to: '#67BDF9' },
+ { from: '#38A04D', to: '#93DCA2' },
+ { from: '#C35F2B', to: '#EDB395' },
+ { from: '#633897', to: '#CBA1FF' },
+];
+
const getStringHash = (str: string): number => {
const normalized = str.trim().toLowerCase();
let hash = 104729;
@@ -17,16 +24,12 @@ const getStringHash = (str: string): number => {
return Math.abs(hash);
};
-// Generate a hash function with a fixed color
const getColorForName = (name: string): { from: string; to: string } => {
const hash = getStringHash(name);
- const hue = hash % 360;
-
- return {
- to: `hsl(${hue}, 70%, 80%)`,
- from: `hsl(${hue}, 60%, 30%)`,
- };
+ const index = hash % PREDEFINED_COLORS.length;
+ return PREDEFINED_COLORS[index];
};
+
export const RAGFlowAvatar = memo(
forwardRef<
React.ElementRef,
@@ -43,7 +46,7 @@ export const RAGFlowAvatar = memo(
if (parts.length === 1) {
return parts[0][0].toUpperCase();
}
- return parts[0][0].toUpperCase() + parts[1][0].toUpperCase();
+ return parts[0][0].toUpperCase();
};
const initials = getInitials(name);
@@ -98,7 +101,7 @@ export const RAGFlowAvatar = memo(
'bg-gradient-to-b',
`from-[${from}] to-[${to}]`,
'flex items-center justify-center',
- 'text-white font-bold',
+ 'text-white ',
{ 'rounded-md': !isPerson },
)}
style={{
diff --git a/web/src/components/slider-input-form-field.tsx b/web/src/components/slider-input-form-field.tsx
index 5986a3075..c31408192 100644
--- a/web/src/components/slider-input-form-field.tsx
+++ b/web/src/components/slider-input-form-field.tsx
@@ -49,12 +49,12 @@ export function SliderInputFormField({
defaultValue={defaultValue || 0}
render={({ field }) => (
diff --git a/web/src/pages/next-search/index.tsx b/web/src/pages/next-search/index.tsx
index 201c60baa..b9185a433 100644
--- a/web/src/pages/next-search/index.tsx
+++ b/web/src/pages/next-search/index.tsx
@@ -126,7 +126,7 @@ export default function SearchPage() {
// >
}
-
+