Fix the chat-profile detector missing two-segment conf keys

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.
This commit is contained in:
Gmer4Lfe
2026-08-03 17:39:50 -04:00
parent e58f0352a7
commit 73305a0cd1
+1 -1
View File
@@ -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 "