From 842b4ddc8515a978b5a8bcc3fb745fd421a1a840 Mon Sep 17 00:00:00 2001 From: shaohuzhang1 <80892890+shaohuzhang1@users.noreply.github.com> Date: Wed, 3 Dec 2025 11:47:09 +0800 Subject: [PATCH 1/3] fix: Workflow knowledge base execution supports document removal and continued import (#4420) --- .../views/document/ImportWorkflowDocument.vue | 32 +++++++++++--- .../component/DebugDrawer.vue | 42 +++++++++++-------- .../component/action/DataSource.vue | 2 +- .../component/action/Result.vue | 40 +++++++++--------- ui/src/workflow/common/NodeContainer.vue | 2 - 5 files changed, 72 insertions(+), 46 deletions(-) diff --git a/ui/src/views/document/ImportWorkflowDocument.vue b/ui/src/views/document/ImportWorkflowDocument.vue index f855b01ac..8dcd1d5f0 100644 --- a/ui/src/views/document/ImportWorkflowDocument.vue +++ b/ui/src/views/document/ImportWorkflowDocument.vue @@ -9,7 +9,7 @@
- +
diff --git a/ui/src/views/knowledge-workflow/component/action/DataSource.vue b/ui/src/views/knowledge-workflow/component/action/DataSource.vue index 92be53805..d67a9b1da 100644 --- a/ui/src/views/knowledge-workflow/component/action/DataSource.vue +++ b/ui/src/views/knowledge-workflow/component/action/DataSource.vue @@ -17,7 +17,7 @@ prop="node_id" :rules="base_form_data_rule.node_id" > - +
- + +

{{ $t('chat.executionDetails.title') }}

@@ -45,10 +45,15 @@ const knowledge_action = ref() let pollingTimer: any = null const getKnowledgeWorkflowAction = () => { + if (pollingTimer == null) { + return + } knowledgeApi .getWorkflowAction(props.knowledge_id, props.id) .then((ok) => { knowledge_action.value = ok.data + }) + .finally(() => { if (['SUCCESS', 'FAILURE', 'REVOKED'].includes(state.value)) { stopPolling() } else { @@ -56,10 +61,6 @@ const getKnowledgeWorkflowAction = () => { pollingTimer = setTimeout(getKnowledgeWorkflowAction, 2000) } }) - .catch(() => { - // 错误时也继续轮询 - pollingTimer = setTimeout(getKnowledgeWorkflowAction, 2000) - }) } const stopPolling = () => { @@ -70,8 +71,7 @@ const stopPolling = () => { } // 启动轮询 -getKnowledgeWorkflowAction() - +pollingTimer = setTimeout(getKnowledgeWorkflowAction, 0) onUnmounted(() => { stopPolling() }) diff --git a/ui/src/workflow/common/NodeContainer.vue b/ui/src/workflow/common/NodeContainer.vue index cc1f7edbf..ec8d8a44a 100644 --- a/ui/src/workflow/common/NodeContainer.vue +++ b/ui/src/workflow/common/NodeContainer.vue @@ -180,8 +180,6 @@ import type { FormInstance } from 'element-plus' import { t } from '@/locales' import { useRoute } from 'vue-router' import DropdownMenu from '@/components/workflow-dropdown-menu/index.vue' -const w = inject('workflowMode') -console.log(w) const route = useRoute() const { params: { id }, From 13b1525806e57c839e6460ad53a767f5ef070bfb Mon Sep 17 00:00:00 2001 From: CaptainB Date: Wed, 3 Dec 2025 11:57:23 +0800 Subject: [PATCH 2/3] fix: remove MCP tool type restriction from copy and export permissions --- ui/src/views/tool/component/ToolListContainer.vue | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ui/src/views/tool/component/ToolListContainer.vue b/ui/src/views/tool/component/ToolListContainer.vue index 868bb1aaf..9d1849ef9 100644 --- a/ui/src/views/tool/component/ToolListContainer.vue +++ b/ui/src/views/tool/component/ToolListContainer.vue @@ -272,8 +272,7 @@ @@ -316,8 +315,7 @@ From 6308ee4ff36aff1eb60c9ad8da2febaadd619d0e Mon Sep 17 00:00:00 2001 From: CaptainB Date: Wed, 3 Dec 2025 12:09:25 +0800 Subject: [PATCH 3/3] feat: add test connection endpoint for system tools MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1063992 --user=刘瑞斌 【资源管理】mcp工具在资源管理中测试连接一直转圈 https://www.tapd.cn/62980211/s/1805081 --- ui/src/api/system-resource-management/tool.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ui/src/api/system-resource-management/tool.ts b/ui/src/api/system-resource-management/tool.ts index 11b13b1d6..db7d50231 100644 --- a/ui/src/api/system-resource-management/tool.ts +++ b/ui/src/api/system-resource-management/tool.ts @@ -79,6 +79,13 @@ const putTool: (tool_id: string, data: toolData, loading?: Ref) => Prom return put(`${prefix}/${tool_id}`, data, undefined, loading) } +const postToolTestConnection: (data: toolData, loading?: Ref) => Promise> = ( + data, + loading, +) => { + return post(`${prefix}/test_connection`, data, undefined, loading) +} + /** * 删除工具 @@ -133,4 +140,5 @@ export default { exportTool, putToolIcon, delTool, + postToolTestConnection }