From bb7c112a2d9cbb8b4f234affa325cd227ff7fc97 Mon Sep 17 00:00:00 2001 From: Gmer4Lfe Date: Fri, 14 Aug 2026 23:53:17 -0400 Subject: [PATCH] =?UTF-8?q?Construct=20the=20Auth=20tab's=20assistant=20?= =?UTF-8?q?=E2=80=94=20the=20markup=20was=20emitted=20but=20never=20wired?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Plugin/unraid/pages/auth.php | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/Plugin/unraid/pages/auth.php b/Plugin/unraid/pages/auth.php index c6d5d90..dd6d187 100644 --- a/Plugin/unraid/pages/auth.php +++ b/Plugin/unraid/pages/auth.php @@ -1092,6 +1092,27 @@ document.getElementById('vv-au-cert-run').addEventListener('click', function() { _loadCerts(() => { btn.disabled = false; btn.textContent = 'Refresh'; }); }); +// ── Assistant ──────────────────────────────────────────────────────────────── +// vv_ai_chat_markup() emits markup and nothing else — the instance has to be constructed here, +// as every other placement does. Without this the card renders complete and is entirely inert: +// the profile chip has no label because applyProfile() never ran, and clicking it does nothing +// because the picker was never wired. +// +// Guarded on the element because the card is behind vv_ai_ui_on(), so on a node with no reachable +// model this block finds nothing and does nothing rather than throwing on a missing prefix. +if (document.getElementById('vv-au-ai-chat')) { + VvAiChat({ + prefix: 'vv-au-ai', + profile: 'varaverk', + scopeLabel: 'Auth', + scope: () => 'Auth', + // Pinned, like the other cards: without it this resumes whatever thread was last open + // anywhere, which could land the card mid-conversation under a profile this tab never offers. + resumeProfile: 'varaverk', + empty: 'Ask about a proxy host, a rule, a group, or why a login is being refused.', + }); +} + // ── Boot ────────────────────────────────────────────────────────────────────── _loadProxies();