| 969 | }; |
| 970 | |
| 971 | const agentListContent = (drawer = false) => ( |
| 972 | <> |
| 973 | {sortedAgents.map(agent => renderAgent(agent, { drawer }))} |
| 974 | {agents.length === 0 && ( |
| 975 | <div className="sidebar-section"> |
| 976 | <div className="sidebar-section-title">{t('nav.myAgents')}</div> |
| 977 | </div> |
| 978 | )} |
| 979 | {agents.length > 0 && sortedAgents.length === 0 && q && ( |
| 980 | <div className="sidebar-agent-empty"> |
| 981 | {isChinese ? '无匹配结果' : 'No matches'} |
| 982 | </div> |
| 983 | )} |
| 984 | </> |
| 985 | ); |
| 986 | |
| 987 | const agentDrawer = isSidebarCollapsed && agentDrawerOpen && typeof document !== 'undefined' && createPortal( |
| 988 | <div |