Put the assistant on the dashboard, where the questions actually occur to you

This commit is contained in:
Gmer4Lfe
2026-08-08 22:01:13 -04:00
parent 4d00e37ca1
commit ea0c713c89
3 changed files with 179 additions and 2 deletions
+16
View File
@@ -91,6 +91,21 @@ $t = microtime(true);
// Call vv_api_data() once — result is static-cached for the rest of this process.
vv_api_data();
// Must stay in step with api/monitor.php's own block. This file is what the Monitor tab
// normally reads — the endpoint only assembles a payload on a cache miss — so a key added there
// and not here leaves the card that consumes it loading forever on every ordinary page load,
// and working on the one request that happens to miss the cache.
$_vv_ai = null;
if (vv_ai_ui_on()) {
require_once $_base . '/include/ai.php';
$_vv_ai = [
'model' => vv_ai_config()['model'],
'runtime' => vv_ai_runtime_stats(),
'index' => vv_ai_index_stats(),
'tokens' => vv_ai_token_stats()['today'] ?? null,
];
}
$monitor = [
'system' => vv_system_info(),
'fallback' => vv_fallback_state(),
@@ -118,6 +133,7 @@ $monitor = [
'vms' => vv_get_vms(),
'docker_folders' => vv_get_docker_folders(),
'remote_hosts' => vv_remote_hosts_stats(),
'ai' => $_vv_ai,
'_api_status' => vv_api_get_status(),
'ts' => time(),
];