diff --git a/AI/ai_index.sh b/AI/ai_index.sh index 9f9db5d..c2ec233 100755 --- a/AI/ai_index.sh +++ b/AI/ai_index.sh @@ -1,6 +1,6 @@ #!/bin/bash # ============================================================================================== -# ━━━ AI Retrieval Index Builder ━━━ +# ========================== AI Retrieval Index Builder ======================================== # ============================================================================================== # # PURPOSE diff --git a/AI/ai_query.sh b/AI/ai_query.sh index 9048b35..654af3a 100755 --- a/AI/ai_query.sh +++ b/AI/ai_query.sh @@ -1,6 +1,6 @@ #!/bin/bash # ============================================================================================== -# ━━━ AI Retrieval Query ━━━ +# ============================== AI Retrieval Query ============================================ # ============================================================================================== # # PURPOSE diff --git a/Plugin/unraid/include/scheduler.php b/Plugin/unraid/include/scheduler.php index ff094ed..e977f0e 100644 --- a/Plugin/unraid/include/scheduler.php +++ b/Plugin/unraid/include/scheduler.php @@ -317,7 +317,16 @@ function vv_tools_scripts(): array { // of the clean-shutdown sequence, calling array_stopping.sh, mover_stop.sh and // user_scripts_stop.sh in order, and the System_Essentials documentation describes it as that // chain. Moving the file to match the UI would break the grouping that explains it. - static $ADOPTED = ['System_Essentials/server_reboot.sh']; + $ADOPTED = ['System_Essentials/server_reboot.sh']; + + // The AI tools are adopted only where the index and the model actually live. Elsewhere they + // are two rows that can only ever fail — the retrieval index is not synced between hosts and + // Ollama runs on one of them. vv_is_ai_host() comes from include/ai.php, which the page loads + // but this file does not require; absent it, assume not, because showing a tool that cannot + // work is worse than omitting one that could. + if (function_exists('vv_is_ai_host') && vv_is_ai_host()) { + array_push($ADOPTED, 'AI/ai_index.sh', 'AI/ai_query.sh'); + } $schedule = vv_schedule_load(); $scripts = [];