fix: custom tools not show

This commit is contained in:
Joel 2024-11-08 14:24:28 +08:00
parent a9de7f24a2
commit b754bf80ae

View File

@ -57,6 +57,9 @@ const AllTools = ({
if (activeTab === ToolTypeEnum.Workflow)
mergedTools = workflowTools
if (!searchText)
return mergedTools.filter(toolWithProvider => toolWithProvider.tools.length > 0)
return mergedTools.filter((toolWithProvider) => {
return toolWithProvider.tools.some((tool) => {
return tool.label[language].toLowerCase().includes(searchText.toLowerCase())
@ -64,6 +67,7 @@ const AllTools = ({
})
}, [activeTab, buildInTools, customTools, workflowTools, searchText, language])
console.log(activeTab, customTools, tools)
const {
queryPluginsWithDebounced: fetchPlugins,
plugins: notInstalledPlugins = [],