From 352525f87d1f22e9162028751cefe8eba23cbe09 Mon Sep 17 00:00:00 2001 From: yanghang <2390375302@qq.com> Date: Fri, 26 Jun 2026 14:37:15 +0800 Subject: [PATCH] fix(desktop): refresh conductor model chip on profile-only reloads MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit loadModelProfiles only updated the main model chip, never state.conductorModelName. The mykey-import path (and add/remove-mixin, reorder, add/delete model) call loadModelProfiles without loadBridgeConfig, so after importing keys the conductor chip stayed on its stale label (e.g. the empty "渠道组(自动故障转移)") until a manual model switch recomputed it. Recompute conductorModelName from the fresh profiles when a conductor model is bound. --- frontends/desktop/static/app.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/frontends/desktop/static/app.js b/frontends/desktop/static/app.js index cf860455..d1f1f319 100644 --- a/frontends/desktop/static/app.js +++ b/frontends/desktop/static/app.js @@ -3895,6 +3895,12 @@ async function loadModelProfiles() { state.llmNo = active.id ?? 0; state.modelName = modelDisplayName(active); } + // conductor chip 的显示名只在 loadBridgeConfig/selectConductorModel 更新;导入密钥等 + // 仅刷新 profiles 的路径若不在此一并重算,会让 conductor chip 停在旧文案(如空渠道组)。 + if (state.conductorLlmNo != null) { + const cp = state.modelProfiles.find(p => (p.id ?? 0) === state.conductorLlmNo); + if (cp) state.conductorModelName = modelDisplayName(cp); + } updateModelChip(); renderSettingsModels(); } catch (_) {}