Skip to content

Commit cc9a418

Browse files
authored
fix: The MCP calling node in the workflow knowledge base references MCP, but the workflow knowledge base is not displayed in the associated resources of the referenced MCP (#4600)
1 parent 24eb153 commit cc9a418

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

apps/application/flow/tools.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,9 @@ async def anext_async(agen):
434434

435435

436436
target_source_node_mapping = {
437-
'TOOL': {'tool-lib-node': lambda n: [n.get('properties').get('node_data').get('tool_lib_id')]},
437+
'TOOL': {'tool-lib-node': lambda n: [n.get('properties').get('node_data').get('tool_lib_id')],
438+
'ai-chat-node': lambda n: [...([n.get('properties').get('node_data').get('mcp_tool_ids')] or []),
439+
...([n.get('properties').get('node_data').get('tool_ids')] or [])]},
438440
'MODEL': {'ai-chat-node': lambda n: [n.get('properties').get('node_data').get('model_id')],
439441
'question-node': lambda n: [n.get('properties').get('node_data').get('model_id')],
440442
'speech-to-text-node': lambda n: [n.get('properties').get('node_data').get('stt_model_id')],
@@ -444,7 +446,7 @@ async def anext_async(agen):
444446
'intent-node': lambda n: [n.get('properties').get('node_data').get('model_id')],
445447
'image-understand-node': lambda n: [n.get('properties').get('node_data').get('model_id')],
446448
'parameter-extraction-node': lambda n: [n.get('properties').get('node_data').get('model_id')],
447-
'video-understand-node': lambda n: [n.get('properties').get('node_data').get('model_id')]
449+
'video-understand-node': lambda n: [n.get('properties').get('node_data').get('model_id')],
448450
},
449451
'KNOWLEDGE': {'search-knowledge-node': lambda n: n.get('properties').get('node_data').get('knowledge_id_list')},
450452
'APPLICATION': {

0 commit comments

Comments
 (0)