import { DeleteOutlined, EditOutlined, MessageOutlined } from '@ant-design/icons';
import { Button, Popconfirm, Space, Tag } from 'antd';
import dayjs from 'dayjs';
import { Link } from 'react-router-dom';
import type { Agent } from '../../../api';
import type { AgentListLogicOutput } from '../AgentListLogic';
interface Props {
agent: Agent;
logic: AgentListLogicOutput;
notifyDeleted: () => void;
}
export default function AgentListWebCard({ agent, logic, notifyDeleted }: Props) {
const { handleDelete, isImageUrl, getModelLabel } = logic;
const modelLabel = getModelLabel(agent.model);
return (
{isImageUrl(agent.avatar) ?

: (agent.name?.charAt(0) || '?').toUpperCase()}
{agent.name}
最近更新于 {dayjs(agent.updated_at).format('YYYY-MM-DD')}
{agent.description || '还没有填写描述,可以补充这个智能体适合解决什么问题。'}
{agent.visibility === 'public' && 公开}
{agent.visibility === 'team' && 团队}
{agent.visibility === 'private' && 私有}
{modelLabel && (
{modelLabel}
)}
{(agent.fork_count ?? 0) > 0 && Fork {agent.fork_count}}
} className="agent-list-web-action-btn">
聊天
} className="agent-list-web-action-btn">
管理
{
handleDelete(agent.id);
notifyDeleted();
}}
okText="删除"
cancelText="取消"
>
} className="agent-list-web-delete-btn" />
);
}