From 73305a0cd1f38af0c94cc86b5aae44d8c2b7937a Mon Sep 17 00:00:00 2001 From: Gmer4Lfe Date: Mon, 3 Aug 2026 17:39:50 -0400 Subject: [PATCH] Fix the chat-profile detector missing two-segment conf keys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The pattern required three underscore-separated segments, so RSYNC_ENABLED and AI_ENABLED slipped through — exactly the names most likely to be asked about. Also dropped the case-insensitive flag, which made the SCREAMING_CASE branch match ordinary lowercase words containing underscores. --- Plugin/unraid/Tools/ai_chat_worker.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Plugin/unraid/Tools/ai_chat_worker.php b/Plugin/unraid/Tools/ai_chat_worker.php index a265ac7..a8ed6b7 100644 --- a/Plugin/unraid/Tools/ai_chat_worker.php +++ b/Plugin/unraid/Tools/ai_chat_worker.php @@ -249,7 +249,7 @@ if ($diagBlock !== '') { // ignore. Detection only ever makes the model MORE cautious, so a false positive costs a // redirect rather than a wrong answer. if ($profile === 'chat' - && preg_match('/\b[\w.-]+\.sh\b|\b[A-Z][A-Z0-9]*(_[A-Z0-9]+){2,}\b|\bvaraverk\b/i', $question)) { + && preg_match('/\b[\w.-]+\.sh\b|\b[A-Z][A-Z0-9]*(_[A-Z0-9]+)+\b|\bvaraverk\b/', $question)) { $system .= "NOTE: the operator's message appears to name a specific Varaverk component. " . "You cannot see the documentation in this mode, so you do not know what it does. " . "Say that plainly, point them at the Varaverk Assistant profile, and do not "