From 5f76975e1262c4d9ced1bf89423ebe94be9af5ad Mon Sep 17 00:00:00 2001 From: JzoNg Date: Thu, 28 Nov 2024 15:57:56 +0800 Subject: [PATCH] fix: icon of tool provider in agent --- .../app/configuration/config/agent/agent-tools/index.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/web/app/components/app/configuration/config/agent/agent-tools/index.tsx b/web/app/components/app/configuration/config/agent/agent-tools/index.tsx index 40c4232270..285eabaed7 100644 --- a/web/app/components/app/configuration/config/agent/agent-tools/index.tsx +++ b/web/app/components/app/configuration/config/agent/agent-tools/index.tsx @@ -50,7 +50,11 @@ const AgentTools: FC = () => { const [isShowSettingTool, setIsShowSettingTool] = useState(false) const [isShowSettingAuth, setShowSettingAuth] = useState(false) const tools = (modelConfig?.agentConfig?.tools as AgentTool[] || []).map((item) => { - const collection = collectionList.find(collection => collection.id === item.provider_id.split('/').pop() && collection.type === item.provider_type) + const collection = collectionList.find( + collection => + collection.id.split('/').pop() === item.provider_id.split('/').pop() + && collection.type === item.provider_type, + ) const icon = collection?.icon return { ...item,