From 954a6a5671cf28783d85debef43788ca003cab3f Mon Sep 17 00:00:00 2001 From: zhangzhanwei Date: Fri, 12 Jun 2026 15:23:50 +0800 Subject: [PATCH] feat: show original tool/application name as source in workflow node menu --- ui/src/locales/lang/en-US/common.ts | 1 + ui/src/locales/lang/zh-CN/common.ts | 1 + ui/src/locales/lang/zh-Hant/common.ts | 1 + ui/src/workflow/common/NodeContainer.vue | 11 +++++++++++ ui/src/workflow/nodes/application-node/index.vue | 3 +++ ui/src/workflow/nodes/tool-lib-node/index.vue | 3 +++ 6 files changed, 20 insertions(+) diff --git a/ui/src/locales/lang/en-US/common.ts b/ui/src/locales/lang/en-US/common.ts index 43a65665719..ee029cd8190 100644 --- a/ui/src/locales/lang/en-US/common.ts +++ b/ui/src/locales/lang/en-US/common.ts @@ -151,6 +151,7 @@ export default { subTitle: 'View Execution Record', }, sourceType: 'Source type', + source: 'Source', knowledgeImportTip: 'Knowledge base imported successfully. Documents have not been vectorized yet. Please configure the embedding model and vectorize the documents.', import: 'Import', diff --git a/ui/src/locales/lang/zh-CN/common.ts b/ui/src/locales/lang/zh-CN/common.ts index cf6abb8f9a1..3a2248ee0c7 100644 --- a/ui/src/locales/lang/zh-CN/common.ts +++ b/ui/src/locales/lang/zh-CN/common.ts @@ -152,6 +152,7 @@ export default { subTitle: '查看执行记录', }, sourceType: '资源类型', + source: '来源', knowledgeImportTip: '导入创建知识库成功,文档数据未向量化,请先设置知识库的向量模型,并对文档进行向量化操作', import: '导入', diff --git a/ui/src/locales/lang/zh-Hant/common.ts b/ui/src/locales/lang/zh-Hant/common.ts index 0af64d35553..fc131a524d4 100644 --- a/ui/src/locales/lang/zh-Hant/common.ts +++ b/ui/src/locales/lang/zh-Hant/common.ts @@ -150,6 +150,7 @@ export default { subTitle: '查看執行記錄', }, sourceType: '資源類型', + source: '來源', knowledgeImportTip: '匯入建立知識庫成功,文件資料尚未向量化,請先設定知識庫的向量模型,並對文件進行向量化操作', import: '导入', diff --git a/ui/src/workflow/common/NodeContainer.vue b/ui/src/workflow/common/NodeContainer.vue index 162a678ff41..e5bbb8fa867 100644 --- a/ui/src/workflow/common/NodeContainer.vue +++ b/ui/src/workflow/common/NodeContainer.vue @@ -91,6 +91,10 @@ {{ $t('common.delete') }} +
+
{{ $t('common.source') }}
+
{{ sourceName }}
+
@@ -324,6 +328,13 @@ const node_status = computed(() => { return 200 }) +const sourceName = computed(() => { + if (['application-node', 'tool-lib-node'].includes(props.nodeModel.type)) { + return props.nodeModel.properties.node_data?.name || '' + } + return '' +}) + function renameNode() { form.value.title = props.nodeModel.properties.stepName nodeNameDialogVisible.value = true diff --git a/ui/src/workflow/nodes/application-node/index.vue b/ui/src/workflow/nodes/application-node/index.vue index b1fa1ce33b9..8cc6c80b5e2 100644 --- a/ui/src/workflow/nodes/application-node/index.vue +++ b/ui/src/workflow/nodes/application-node/index.vue @@ -254,6 +254,9 @@ const update_field = () => { loadSharedApi({type: 'application', systemType: apiType.value}) .getApplicationDetail(props.nodeModel.properties.node_data.application_id) .then((ok: any) => { + if (ok.data.name) { + set(props.nodeModel.properties.node_data, 'name', ok.data.name) + } const old_api_input_field_list = cloneDeep( props.nodeModel.properties.node_data.api_input_field_list, ) diff --git a/ui/src/workflow/nodes/tool-lib-node/index.vue b/ui/src/workflow/nodes/tool-lib-node/index.vue index 23a668d2498..9a03f02966c 100644 --- a/ui/src/workflow/nodes/tool-lib-node/index.vue +++ b/ui/src/workflow/nodes/tool-lib-node/index.vue @@ -163,6 +163,9 @@ const update_field = () => { loadSharedApi({ type: 'tool', systemType: apiType.value }) .getToolById(props.nodeModel.properties.node_data.tool_lib_id) .then((ok: any) => { + if (ok.data.name) { + set(props.nodeModel.properties.node_data, 'name', ok.data.name) + } const old_input_field_list = props.nodeModel.properties.node_data.input_field_list const merge_input_field_list = ok.data.input_field_list.map((item: any) => { const find_field = old_input_field_list.find((old_item: any) => old_item.name == item.name)