diff --git a/Plugin/unraid/include/ai_chat.php b/Plugin/unraid/include/ai_chat.php index 12fa8ba..8023899 100644 --- a/Plugin/unraid/include/ai_chat.php +++ b/Plugin/unraid/include/ai_chat.php @@ -1803,6 +1803,23 @@ vv_ai_profiles_script(); if (w) w.hidden = !seeEl.checked || !t || !t.textContent; }); } + // Remembered like the reasoning checkbox beside it. It was not, and the two sitting together + // behaving differently is its own bug: neither has a Save button, so one that forgets reads + // as one that failed to save. Ticked, closed and reopened, it had reverted — which is why no + // web search had ever actually run. + // + // Remembering a tick is not the same as defaulting it on. The conf ships this off because + // sending a question outside the house is the operator's decision to make rather than one to + // inherit; honouring that decision until they change it is the point, not a weakening of it. + const webEl = o.webEl ? document.getElementById(o.webEl) : null; + if (webEl) { + const WEB_KEY = 'vvAiWeb:' + P; + try { webEl.checked = localStorage.getItem(WEB_KEY) === '1'; } catch (_) {} + webEl.addEventListener('change', () => { + try { localStorage.setItem(WEB_KEY, webEl.checked ? '1' : '0'); } catch (_) {} + }); + } + const newBtn = $('new'); if (newBtn) newBtn.addEventListener('click', newChat); // ── Expand / collapse ────────────────────────────────────────────────