fix: tool id (#13932)

This commit is contained in:
zxhlyh 2025-02-18 18:17:41 +08:00 • committed by GitHub
commit 3460c1dfbd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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