From 5dd569c36353c9ada4e6471dbf3d3cff08e54357 Mon Sep 17 00:00:00 2001 From: shaohuzhang1 Date: Mon, 26 Jan 2026 17:57:41 +0800 Subject: [PATCH] fix: The resource-side trigger automatically adds the current resource. --- ui/src/views/application/ApplicationSetting.vue | 2 +- ui/src/views/trigger/component/TriggerDrawer.vue | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ui/src/views/application/ApplicationSetting.vue b/ui/src/views/application/ApplicationSetting.vue index 8dafcf5bc18..6bc9cc46857 100644 --- a/ui/src/views/application/ApplicationSetting.vue +++ b/ui/src/views/application/ApplicationSetting.vue @@ -958,7 +958,7 @@ const ttsModelOptions = ref(null) const triggerDrawerRef = ref>() const openCreateTriggerDrawer = () => { - triggerDrawerRef.value?.open() + triggerDrawerRef.value?.open(undefined, 'APPLICATION', id) } const openEditTriggerDrawer = (trigger: any) => { triggerDrawerRef.value?.open(trigger.id) diff --git a/ui/src/views/trigger/component/TriggerDrawer.vue b/ui/src/views/trigger/component/TriggerDrawer.vue index 13a624eb1c9..9f6c7862266 100644 --- a/ui/src/views/trigger/component/TriggerDrawer.vue +++ b/ui/src/views/trigger/component/TriggerDrawer.vue @@ -601,13 +601,21 @@ const init = (trigger_id: string) => { }) } const current_trigger_id = ref() -const open = (trigger_id?: string) => { +const open = (trigger_id?: string, source_type?: string, source_id?: string) => { is_edit.value = trigger_id ? true : false current_trigger_id.value = trigger_id drawer.value = true if (trigger_id) { init(trigger_id) } + if (source_type && source_id) { + if (source_type == 'APPLICATION') { + applicationRefresh({ application_ids: [source_id] }) + } + if (source_type == 'TOOL') { + toolRefresh({ tool_ids: [source_id] }) + } + } } const close = () => {