mirror of
https://github.com/langgenius/dify.git
synced 2026-05-03 17:08:03 +08:00
publish as pipeline
This commit is contained in:
@ -30,7 +30,7 @@ export const useNodeMetaData = (node: Node) => {
|
||||
const nodeMetaData = availableNodesMetaData.nodesMap?.[data.type]
|
||||
const author = useMemo(() => {
|
||||
if (data.type === BlockEnum.DataSource)
|
||||
return dataSourceList?.find(dataSource => dataSource.id === data.provider_id)?.author
|
||||
return dataSourceList?.find(dataSource => dataSource.plugin_id === data.plugin_id)?.author
|
||||
|
||||
if (data.type === BlockEnum.Tool) {
|
||||
if (data.provider_type === CollectionType.builtIn)
|
||||
@ -44,7 +44,7 @@ export const useNodeMetaData = (node: Node) => {
|
||||
|
||||
const description = useMemo(() => {
|
||||
if (data.type === BlockEnum.DataSource)
|
||||
return dataSourceList?.find(dataSource => dataSource.id === data.provider_id)?.description[language]
|
||||
return dataSourceList?.find(dataSource => dataSource.plugin_id === data.plugin_id)?.description[language]
|
||||
if (data.type === BlockEnum.Tool) {
|
||||
if (data.provider_type === CollectionType.builtIn)
|
||||
return buildInTools.find(toolWithProvider => canFindTool(toolWithProvider.id, data.provider_id))?.description[language]
|
||||
|
||||
@ -33,7 +33,7 @@ export const useToolIcon = (data: Node['data']) => {
|
||||
return targetTools.find(toolWithProvider => canFindTool(toolWithProvider.id, data.provider_id))?.icon
|
||||
}
|
||||
if (data.type === BlockEnum.DataSource)
|
||||
return dataSourceList?.find(toolWithProvider => toolWithProvider.name === data.provider_id)?.icon
|
||||
return dataSourceList?.find(toolWithProvider => toolWithProvider.plugin_id === data.plugin_id)?.icon
|
||||
}, [data, buildInTools, customTools, workflowTools, dataSourceList])
|
||||
|
||||
return toolIcon
|
||||
@ -61,7 +61,7 @@ export const useGetToolIcon = () => {
|
||||
}
|
||||
|
||||
if (data.type === BlockEnum.DataSource)
|
||||
return dataSourceList?.find(toolWithProvider => toolWithProvider.name === data.provider_id)?.icon
|
||||
return dataSourceList?.find(toolWithProvider => toolWithProvider.plugin_id === data.plugin_id)?.icon
|
||||
}, [workflowStore])
|
||||
|
||||
return getToolIcon
|
||||
|
||||
Reference in New Issue
Block a user