import { ChatContext } from '@/app/chat-context'; import { apiInterceptors, getDbgptsList } from '@/client/api'; import { useRequest } from 'ahooks'; import { Select } from 'antd'; import { useContext } from 'react'; import { useTranslation } from 'react-i18next'; function AgentSelector() { const { t } = useTranslation(); const { agent, setAgent } = useContext(ChatContext); const { data = [] } = useRequest(async () => { const [, res] = await apiInterceptors(getDbgptsList()); return res ?? []; }); return (