refactor(constants): rename default model icon to include size and color info
parent
2a925ff514
commit
0fd6274854
|
|
@ -1 +1 @@
|
||||||
export const DEFAULT_MODEL_ICON = 'https://placehold.co/40x40/f3f4f6/9ca3af?text=RH';
|
export const PLACEHOLDER_40X40_GRAY = 'https://placehold.co/40x40/f3f4f6/9ca3af?text=RH';
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ import { Button, Form, Input, InputNumber, Modal, Upload, App as AntApp, List, P
|
||||||
import type { UploadFile } from 'antd/es/upload/interface';
|
import type { UploadFile } from 'antd/es/upload/interface';
|
||||||
import { useNavigate, useParams } from 'react-router-dom';
|
import { useNavigate, useParams } from 'react-router-dom';
|
||||||
import { Agent, AgentAPI, ImageAPI, KnowledgeStatus, SkillType, Team, TeamAPI, AiModel, ModelAPI } from '../api';
|
import { Agent, AgentAPI, ImageAPI, KnowledgeStatus, SkillType, Team, TeamAPI, AiModel, ModelAPI } from '../api';
|
||||||
import { DEFAULT_MODEL_ICON } from '../constants';
|
import { PLACEHOLDER_40X40_GRAY } from '../constants';
|
||||||
import SkillEditor from '../components/SkillEditor';
|
import SkillEditor from '../components/SkillEditor';
|
||||||
import McpPanel from '../components/McpPanel';
|
import McpPanel from '../components/McpPanel';
|
||||||
import ChatPreview from '../components/ChatPreview';
|
import ChatPreview from '../components/ChatPreview';
|
||||||
|
|
@ -492,7 +492,7 @@ export default function AgentEditor() {
|
||||||
label: (
|
label: (
|
||||||
<div className="flex items-center justify-between w-full py-1">
|
<div className="flex items-center justify-between w-full py-1">
|
||||||
<div className="flex items-center gap-2" style={{ flex: 1, minWidth: 0 }}>
|
<div className="flex items-center gap-2" style={{ flex: 1, minWidth: 0 }}>
|
||||||
<img src={m.icon || DEFAULT_MODEL_ICON} alt={m.model_name} style={{ width: 20, height: 20, objectFit: 'contain', borderRadius: 4, flexShrink: 0 }} />
|
<img src={m.icon || PLACEHOLDER_40X40_GRAY} alt={m.model_name} style={{ width: 20, height: 20, objectFit: 'contain', borderRadius: 4, flexShrink: 0 }} />
|
||||||
<span className="font-medium text-gray-800" style={{ overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }}>{m.model_name}</span>
|
<span className="font-medium text-gray-800" style={{ overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }}>{m.model_name}</span>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex flex-col items-end justify-center text-[10px] text-gray-400" style={{ flexShrink: 0, marginLeft: 8 }}>
|
<div className="flex flex-col items-end justify-center text-[10px] text-gray-400" style={{ flexShrink: 0, marginLeft: 8 }}>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue