import { useEffect, useState } from 'react'; import { useDispatch, useSelector } from 'react-redux'; import { useNavigate } from 'react-router-dom'; import Spinner from '../components/Spinner'; import { setConversation, updateConversationId, } from '../conversation/conversationSlice'; import { selectSelectedAgent, selectToken, setSelectedAgent, } from '../preferences/preferenceSlice'; import AgentCard from './AgentCard'; import { agentSectionsConfig } from './agents.config'; import { Agent } from './types'; export default function AgentsList() { const dispatch = useDispatch(); const token = useSelector(selectToken); const selectedAgent = useSelector(selectSelectedAgent); useEffect(() => { dispatch(setConversation([])); dispatch( updateConversationId({ query: { conversationId: null }, }), ); if (selectedAgent) dispatch(setSelectedAgent(null)); }, [token]); return (
Discover and create custom versions of DocsGPT that combine instructions, extra knowledge, and any combination of skills
{agentSectionsConfig.map((sectionConfig) => ({config.description}
{config.emptyStateDescription}
{config.showNewAgentButton && ( )}