Tell the assistant where the settings are, not just what they are called
The index reads tracked files and page markup is not one, so it could name a conf key and never say there was a button for it.
This commit is contained in:
@@ -461,6 +461,10 @@ vv_ai_chat_markup('vv-ai', [
|
||||
// the Scheduler uses, so there is one allowlist and one write path rather than an AI-shaped
|
||||
// copy of both — api/ai.php deliberately has no conf-writing action at all.
|
||||
const API_CONF = '/plugins/varaverk/api/confform.php';
|
||||
// Which sections this tab claims, from the one registry that also generates the UI map. Hard
|
||||
// coding "ai" here again would be a second place for the answer to live, and the map would go
|
||||
// on describing a route this page had stopped taking.
|
||||
const CONF_SECTIONS = <?= json_encode(VV_UI_SECTION_SURFACES[0]['match'] ?? 'ai') ?>;
|
||||
|
||||
// The conversation itself — profiles, transcript, composer, source viewer, storage — is
|
||||
// include/ai_chat.php. What remains on this page is everything that surrounds it and exists
|
||||
@@ -1098,7 +1102,7 @@ vv_ai_chat_markup('vv-ai', [
|
||||
function loadConf() {
|
||||
if (confLoaded) return;
|
||||
confLoaded = true;
|
||||
fetch(API_CONF + '?sections=ai').then(r => r.json())
|
||||
fetch(API_CONF + '?sections=' + encodeURIComponent(CONF_SECTIONS)).then(r => r.json())
|
||||
.then(d => {
|
||||
if (!d.ok) { $('vv-ai-conf').innerHTML = `<div class="vv-ai-none">${esc(d.error || 'could not be read')}</div>`; return; }
|
||||
VvConfUI.render('vv-ai-conf', d.groups || []);
|
||||
|
||||
Reference in New Issue
Block a user