From 533328aa91e7b2b3c5d93b9b91c02daaf26cd1a3 Mon Sep 17 00:00:00 2001 From: Gmer4Lfe Date: Wed, 12 Aug 2026 17:42:31 -0400 Subject: [PATCH] Remember whether it may look things up The reasoning checkbox beside it was remembered and this one was not, so ticking it, closing the panel and coming back read as a save that had failed. --- Plugin/unraid/include/ai_chat.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) 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 ────────────────────────────────────────────────