Give the AI subsystem one profile table and one collection, read everywhere

This commit is contained in:
Gmer4Lfe
2026-08-08 22:35:37 -04:00
parent 0f4d381ac0
commit 0f92609425
10 changed files with 355 additions and 103 deletions
+7 -1
View File
@@ -64,6 +64,7 @@
// api/rsync_standalone.php
require_once dirname(__DIR__) . '/include/scheduler.php';
require_once dirname(__DIR__) . '/include/docs.php';
require_once dirname(__DIR__) . '/include/ai_profiles.php';
// Live values for the `$VAR` markers in pages/readme/*.md. Conf variables, plus the derived
// path constants — those are not conf keys, but they are exactly what a reader needs resolved
@@ -1059,6 +1060,7 @@ Still the same two servers, two households, the same media stack running itself.
At rest it is one input row. Answers expand it upward and the views above shrink to
suit, which is why vvFitRight() subtracts its height. It pushes rather than overlays
so the thing you are asking about stays on screen. Collapsing keeps the conversation. -->
<?php vv_ai_profiles_script(); ?>
<div id="vv-ai-dock">
<div id="vv-ai-dock-body" style="display:none"></div>
<div id="vv-ai-dock-bar">
@@ -2367,8 +2369,12 @@ function vvAiDockScope(profile, label, target) {
const had = vvAiHist.length > 0;
vvAiProfile = profile;
vvAiScope = target;
// Short label from the registry, not a literal map. The map that used to be here was the
// fifth place a profile got defined, and it silently fell back to "Assistant" for any id it
// had not been told about — so a new profile would have shown up in the chip as the strict one.
const _p = (window.VvAiProfiles || {})[profile];
document.getElementById('vv-ai-dock-chip').textContent =
({ code: 'Code', troubleshoot: 'Troubleshoot' }[profile] || 'Assistant') + ' · ' + label;
(_p ? _p.short : profile) + ' · ' + label;
// Transcript stays, history sent to the model resets — the same rule the AI tab's profile
// buttons already use. A troubleshooting thread carrying log excerpts must not bleed into a