From e47cf675f028deb338a1cb5c8dffb9e01e56be72 Mon Sep 17 00:00:00 2001 From: sp mac bookpro 2605 Date: Mon, 25 May 2026 23:29:00 +0800 Subject: [PATCH] fix(agent): use default placeholder for missing model icons and add constants file --- src/constants.ts | 1 + src/pages/AgentEditor.tsx | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 src/constants.ts diff --git a/src/constants.ts b/src/constants.ts new file mode 100644 index 0000000..4ae9ca4 --- /dev/null +++ b/src/constants.ts @@ -0,0 +1 @@ +export const DEFAULT_MODEL_ICON = 'https://placehold.co/40x40/f3f4f6/9ca3af?text=RH'; diff --git a/src/pages/AgentEditor.tsx b/src/pages/AgentEditor.tsx index 7b08fb4..949f3ba 100644 --- a/src/pages/AgentEditor.tsx +++ b/src/pages/AgentEditor.tsx @@ -3,6 +3,7 @@ import { Button, Form, Input, InputNumber, Modal, Upload, App as AntApp, List, P import type { UploadFile } from 'antd/es/upload/interface'; import { useNavigate, useParams } from 'react-router-dom'; import { Agent, AgentAPI, ImageAPI, KnowledgeStatus, SkillType, Team, TeamAPI, AiModel, ModelAPI } from '../api'; +import { DEFAULT_MODEL_ICON } from '../constants'; import SkillEditor from '../components/SkillEditor'; import McpPanel from '../components/McpPanel'; import ChatPreview from '../components/ChatPreview'; @@ -491,7 +492,7 @@ export default function AgentEditor() { label: (
- {m.model_name} + {m.model_name} {m.model_name}