mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-02-07 11:05:05 +08:00
Fix: Editing the agent greeting causes the greeting to be continuously added to the message list. #12635 (#12636)
### What problem does this PR solve? Fix: Editing the agent greeting causes the greeting to be continuously added to the message list. #12635 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@ -65,6 +65,27 @@ const SvgIcon = memo(
|
||||
},
|
||||
);
|
||||
|
||||
SvgIcon.displayName = 'SvgIcon';
|
||||
|
||||
const themeIcons = [
|
||||
LLMFactory.FishAudio,
|
||||
LLMFactory.TogetherAI,
|
||||
LLMFactory.Meituan,
|
||||
LLMFactory.Longcat,
|
||||
LLMFactory.MinerU,
|
||||
];
|
||||
|
||||
const svgIcons = [
|
||||
LLMFactory.LocalAI,
|
||||
// LLMFactory.VolcEngine,
|
||||
// LLMFactory.MiniMax,
|
||||
LLMFactory.Gemini,
|
||||
LLMFactory.StepFun,
|
||||
LLMFactory.MinerU,
|
||||
LLMFactory.PaddleOCR,
|
||||
// LLMFactory.DeerAPI,
|
||||
];
|
||||
|
||||
export const LlmIcon = ({
|
||||
name,
|
||||
height = 48,
|
||||
@ -79,14 +100,7 @@ export const LlmIcon = ({
|
||||
imgClass?: string;
|
||||
}) => {
|
||||
const isDark = useIsDarkTheme();
|
||||
const themeIcons = [
|
||||
LLMFactory.FishAudio,
|
||||
LLMFactory.TogetherAI,
|
||||
LLMFactory.Meituan,
|
||||
LLMFactory.Longcat,
|
||||
LLMFactory.MinerU,
|
||||
];
|
||||
let icon = useMemo(() => {
|
||||
const icon = useMemo(() => {
|
||||
const icontemp = IconMap[name as keyof typeof IconMap];
|
||||
if (themeIcons.includes(name as LLMFactory)) {
|
||||
if (isDark) {
|
||||
@ -98,16 +112,6 @@ export const LlmIcon = ({
|
||||
return icontemp;
|
||||
}, [name, isDark]);
|
||||
|
||||
const svgIcons = [
|
||||
LLMFactory.LocalAI,
|
||||
// LLMFactory.VolcEngine,
|
||||
// LLMFactory.MiniMax,
|
||||
LLMFactory.Gemini,
|
||||
LLMFactory.StepFun,
|
||||
LLMFactory.MinerU,
|
||||
LLMFactory.PaddleOCR,
|
||||
// LLMFactory.DeerAPI,
|
||||
];
|
||||
if (svgIcons.includes(name as LLMFactory)) {
|
||||
return (
|
||||
<SvgIcon
|
||||
|
||||
Reference in New Issue
Block a user