From af471b5094b554db1f83857070cd20607d023361 Mon Sep 17 00:00:00 2001 From: wizardchen Date: Tue, 30 Dec 2025 13:47:12 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=AE=BE=E7=BD=AE=E5=BC=B9=E7=AA=97?= =?UTF-8?q?=E5=85=B3=E9=97=AD=E6=97=B6=E5=88=B7=E6=96=B0=E6=A8=A1=E5=9E=8B?= =?UTF-8?q?=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/agent/AgentEditorModal.vue | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/frontend/src/views/agent/AgentEditorModal.vue b/frontend/src/views/agent/AgentEditorModal.vue index 4cc777d5..d697405a 100644 --- a/frontend/src/views/agent/AgentEditorModal.vue +++ b/frontend/src/views/agent/AgentEditorModal.vue @@ -1417,6 +1417,21 @@ watch(isAgentMode, (isAgent) => { } }); +// 监听设置弹窗关闭,刷新模型列表 +watch(() => uiStore.showSettingsModal, async (visible, prevVisible) => { + // 从设置页面返回时(弹窗关闭),刷新模型列表 + if (prevVisible && !visible && props.visible) { + try { + const models = await listModels(); + if (models && models.length > 0) { + allModels.value = models; + } + } catch (e) { + console.warn('Failed to refresh models after settings closed', e); + } + } +}); + // 加载依赖数据 const loadDependencies = async () => { try {