fix: 修复 Think 模式开关无效 — toggleThink 缺少 change 事件导致 state 未同步
- model-bar.ts: 新增 toggleThink change 事件监听,同步 state.thinkEnabled - setThinkAvailable(true) 保留自动开启行为(模型支持时强制开启) - 版本号 0.11.5 → 0.11.6,同步7个文件13处
This commit is contained in:
@@ -30,6 +30,12 @@ export function initModelBar(): void {
|
||||
thinkWrap = document.querySelector('#thinkToggleWrap')!;
|
||||
btnAttachImg = document.querySelector('#btnAttachImg')!;
|
||||
|
||||
// Think 开关:同步 state 中的 thinkEnabled
|
||||
thinkCheckbox.addEventListener('change', () => {
|
||||
state.set('thinkEnabled', thinkCheckbox.checked);
|
||||
logDebug(`Think 模式: ${thinkCheckbox.checked ? '开启' : '关闭'}`);
|
||||
});
|
||||
|
||||
modelSelectEl.addEventListener('change', async () => {
|
||||
const model = modelSelectEl.value;
|
||||
const db = state.get<ChatDB | null>(KEYS.DB);
|
||||
|
||||
Reference in New Issue
Block a user