Let each control actually govern the thing it names

Auto Scroll, the learning gate, the fold and the flash label each described a
behaviour they did not enforce.
This commit is contained in:
Gmer4Lfe
2026-08-11 17:25:51 -04:00
parent aa3d92360e
commit e3ec54f213
4 changed files with 162 additions and 39 deletions
+9
View File
@@ -650,6 +650,15 @@ function vv_ai_memory_learned_max(): int {
function vv_ai_memory_applies(string $kind, string $profile): bool
{
$vars = vv_conf_vars();
// The learned slot answers to the same gate that fills it. Without this, switching
// AI_MEMORY_LEARN_ENABLED off stopped new proposals but left every line already kept in every
// future prompt — a gate that closes the tap and not the tank. Gated here rather than at the
// one call site so any future consumer of vv_ai_memory_assemble() inherits it, and deliberately
// NOT in vv_ai_memory_read(), which reports what is on disk for the AI tab to display.
if ($kind === 'learned'
&& strtolower(trim($vars['AI_MEMORY_LEARN_ENABLED'] ?? 'false')) !== 'true') return false;
$key = $kind === 'learned' ? 'AI_MEMORY_LEARNED_PROFILES' : 'AI_MEMORY_ASSISTED_PROFILES';
$spec = trim($vars[$key] ?? '*');
if ($spec === '' || $spec === '*') return true;