diff --git a/Plugin/unraid/pages/settings.php b/Plugin/unraid/pages/settings.php index 07a49c1..244db49 100644 --- a/Plugin/unraid/pages/settings.php +++ b/Plugin/unraid/pages/settings.php @@ -23,7 +23,7 @@ // Values are escaped on render and on write-back. // // RENDERS -// Storage mode selector, global toggles, general conf fields +// Storage mode selector, global toggles, AI master switch, general conf fields // // DEPENDS ON // api/confform.php conf read/write → include/confform.php @@ -42,6 +42,13 @@ $_enableLogging = ($_vars['ENABLE_LOGGING'] ?? 'false') === 'true'; $_discordKey = $_myId . '_DISCORD_WEBHOOK'; $_discordHook = $_vars[$_discordKey] ?? ''; +// AI. The card is drawn only on the host that can actually run it — elsewhere AI_ENABLED is a +// switch with nothing behind it, since the model and the index are HOST1's. vv_ai_ui_on() is +// not the test here: it folds the switch into the host check, and this card is how the switch +// gets turned back on. Fail-closed on anything but "true", matching the gate it feeds. +$_aiHost = vv_is_ai_host(); +$_aiEnabled = strtolower(trim($_vars['AI_ENABLED'] ?? 'false')) === 'true'; + ?>