diff --git a/app/server/public/index.html b/app/server/public/index.html
index 3044588..bdea29f 100644
--- a/app/server/public/index.html
+++ b/app/server/public/index.html
@@ -91,10 +91,9 @@
/* 会话模式徽标(profile 绑定时的标题小图标;尺寸显式定,不依赖 .ic 默认值) */
.prof-badge { display: inline-flex; align-items: center; margin-right: 4px; opacity: .62; flex: none; }
.prof-badge .ic { width: 13px; height: 13px; }
- /* 各模式固定色(头部/抽屉/弹窗下拉旁同一套) */
- .prof-badge.prof-lab .ic { color: #8B5CF6; }
- .prof-badge.prof-zero .ic { color: #EF4444; }
- /* 弹窗模式行:下拉选中 + 当前模式图标(取代纵向选项组,省垂直空间) */
+ /* 模式徽标统一用主题蓝(lab/zero 同色,靠形状区分) */
+ .prof-badge.prof-lab .ic, .prof-badge.prof-zero .ic { color: var(--active); }
+ /* 弹窗模式行:下拉选中(取代纵向选项组,省垂直空间) */
.msw-prof { display: flex; align-items: center; gap: 6px; padding: 10px 12px; font-size: 13px; color: var(--ink); border-top: 1px solid #dde1ea; }
.msw-prof-label { flex: none; }
.msw-prof select { flex: 1; min-width: 0; border: 1px solid #dde1ea; border-radius: 8px; padding: 5px 8px; font-size: 13px; background: #fff; color: var(--ink); }
@@ -392,14 +391,13 @@
-
diff --git a/app/server/public/js/core.js b/app/server/public/js/core.js
index d0cd8f9..0d87858 100644
--- a/app/server/public/js/core.js
+++ b/app/server/public/js/core.js
@@ -199,11 +199,11 @@
}
// ---------- 会话模式徽标 ----------
- // 会话绑定 profile 时在标题(头部/抽屉行/弹窗下拉旁)显示小图标:''=默认不显示;各模式固定色(CSS .prof-*);
- // 未知名兑底圆点(无色);tooltip 只提示当前模式,不另显文字。
+ // 会话绑定 profile 时在标题(头部/抽屉行)显示小图标:''=默认不显示;颜色统一 --active(CSS .prof-*),靠形状区分;
+ // 未知名兑底圆点;tooltip 提示当前模式,不另显文字。
const PROFILE_BADGES = {
lab: '',
- zero: '',
+ zero: '',
};
function profileBadgeHtml(p) {
if (!p) return '';
diff --git a/app/server/public/js/sessions.js b/app/server/public/js/sessions.js
index 93f26bf..45b27ff 100644
--- a/app/server/public/js/sessions.js
+++ b/app/server/public/js/sessions.js
@@ -433,9 +433,9 @@
async function openModelSwitch() {
// welcome(无会话)也可开:模型/模式选择记为预选项,ensureSession 建档时兑现。有会话则即点即绑,行为与原逻辑一致。
const list = $('bind-model-list');
- const footer = $('bind-model-footer');
+ const sub = $('bind-model-sub');
list.innerHTML = '加载中…
';
- footer.textContent = '';
+ if (sub) sub.textContent = state.sessionId ? '选择一个模型继续当前会话' : '选择一个模型用于新会话';
$('bind-model-modal').classList.remove('hidden');
let modelsHtml = '';
let avail = 0;
@@ -505,13 +505,12 @@
const opts = [''].concat(names).map(p =>
'').join('');
profHtml = '模式:' +
- '' + profileBadgeHtml(cur) + '' +
'
';
}
+ // 空闲数并进顶部提示句(原 footer「共 X 个模型可用」不再单独占行)
+ if (sub) sub.textContent = (state.sessionId ? '选择一个模型继续当前会话' : '选择一个模型用于新会话')
+ + (avail ? '(共 ' + avail + ' 个空闲)' : '');
list.innerHTML = modelsHtml + profHtml;
- footer.textContent = state.sessionId
- ? '共 ' + avail + ' 个模型可用'
- : '预选项在首条消息建档时生效';
}
function closeModelSwitch() { $('bind-model-modal').classList.add('hidden'); }
@@ -526,13 +525,13 @@
return PROFILE_NAMES;
}
- function choosePendingModel(modelId) { // welcome 无会话:记预选,ensureSession 建档时透传;选完即关窗(toast 提示),重开弹窗靠就地标记显「预选」
+ function choosePendingModel(modelId) { // welcome 无会话:记预选,ensureSession 建档时透传;选完即关窗 + toast,重开弹窗时该行带「预选」标记
state.pendingModel = modelId;
closeModelSwitch();
toast('新会话将用 ' + modelId);
}
- async function chooseProfile(name) { // 下拉选中即绑/即预选;不重开弹窗(下拉天然保持选中项),只就地换旁侧图标
+ async function chooseProfile(name) { // 下拉选中即绑/即预选;无 toast(头部/抽屉徽标即时变化即反馈),失败回退选项并报错
if (state.sessionId) {
try {
await req('POST', '/api/sessions/' + state.sessionId + '/bind', { profile: name });
@@ -542,18 +541,14 @@
return toast('切换失败:' + e.message);
}
state.profile = name;
- const row = (state.sessions || []).find(x => x.id === state.sessionId); // 同步本地缓存后重画抽屉(纯本地,不重拉列表)
+ const row = (state.sessions || []).find(x => x.id === state.sessionId); // 同步本地缓存后重画抽屉(纯本地,不重拉网络列表)
if (row) row.profile = name;
renderDrawerList();
- toast(name ? '会话模式已切换:' + name + '(下一轮迭代即生效)' : '已切回默认模式');
} else {
state.pendingProfile = name;
state.profile = name;
- toast(name ? '新会话模式:' + name : '新会话用默认模式');
}
- renderHeader(); // 头部徽标变化
- const ic = $('bind-prof-ic'); // 弹窗下拉旁图标就地更新(占位 span 常驻,默认态内容为空)
- if (ic) ic.innerHTML = profileBadgeHtml(name);
+ renderHeader(); // 头部徽标即时变化 = 切换成功的反馈
}
async function bindModel(modelId) {
if (!state.sessionId) return;