11"use client" ;
22
3- import { useState , useEffect } from "react" ;
43import { useTranslation } from "react-i18next" ;
5- import { Tag , App , Card , Flex , Dropdown , Space , Col } from "antd" ;
6- import { Plus , X } from "lucide-react" ;
4+ import { Tag , App , Card , Flex , Dropdown , Col } from "antd" ;
5+ import { Plus } from "lucide-react" ;
76import { Agent } from "@/types/agentConfig" ;
87import { useAgentConfigStore } from "@/stores/agentConfigStore" ;
9- import { useAgentList } from "@/hooks/agent/useAgentList" ;
10- import { useAgentInfo } from "@/hooks/agent/useAgentInfo" ;
11- import { useAuthorizationContext } from "@/components/providers/AuthorizationProvider" ;
8+ import { usePublishedAgentList } from "@/hooks/agent/usePublishedAgentList" ;
129
1310interface CollaborativeAgentProps { }
1411
1512export default function CollaborativeAgent ( { } : CollaborativeAgentProps ) {
1613 const { t } = useTranslation ( "common" ) ;
1714 const { message } = App . useApp ( ) ;
18- const { user } = useAuthorizationContext ( ) ;
1915
2016 const currentAgentId = useAgentConfigStore ( ( state ) => state . currentAgentId ) ;
2117 const isCreatingMode = useAgentConfigStore ( ( state ) => state . isCreatingMode ) ;
@@ -27,7 +23,7 @@ export default function CollaborativeAgent({}: CollaborativeAgentProps) {
2723 ( state ) => state . updateSubAgentIds
2824 ) ;
2925
30- const { availableAgents } = useAgentList ( user ?. tenantId ?? null ) ;
26+ const { availableAgents } = usePublishedAgentList ( ) ;
3127
3228 const editable =
3329 ! ! isCreatingMode ||
0 commit comments