fix: tool id (#13932)

This commit is contained in:
zxhlyh
2025-02-18 18:17:41 +08:00
committed by GitHub
parent 653f6c2d46
commit 3460c1dfbd
10 changed files with 53 additions and 25 deletions

View File

@@ -18,6 +18,7 @@ import {
useFetchToolsData,
useNodesReadOnly,
} from '@/app/components/workflow/hooks'
import { canFindTool } from '@/utils'
const useConfig = (id: string, payload: ToolNodeType) => {
const { nodesReadOnly: readOnly } = useNodesReadOnly()
@@ -49,7 +50,7 @@ const useConfig = (id: string, payload: ToolNodeType) => {
return []
}
})()
const currCollection = currentTools.find(item => item.id === provider_id)
const currCollection = currentTools.find(item => canFindTool(item.id, provider_id))
// Auth
const needAuth = !!currCollection?.allow_delete