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 -3
View File
@@ -425,8 +425,12 @@ vv_ai_chat_markup('vv-ai', [
});
box.innerHTML = html;
}
function loadBanner() {
fetch(API + '?action=stats').then(r => r.json())
// The 30-second tick reads the shared cache; a completed turn does not. Finishing a turn is
// precisely the event that changes what this banner reports — a cold model becomes resident,
// VRAM moves, context is now allocated — so re-rendering it from a payload written before the
// turn would show the operator the state they had just watched themselves leave.
function loadBanner(live) {
fetch(API + '?action=stats' + (live ? '&live=1' : '')).then(r => r.json())
.then(d => { if (d.ok) renderBanner(d.stats); })
.catch(() => {});
}
@@ -673,7 +677,7 @@ vv_ai_chat_markup('vv-ai', [
thinkEl: 'vv-ai-think',
empty: "Ask Varaverk about itself. Answers come only from this installation's own "
+ 'documentation, with sources.',
onTurn: () => { loadBanner(); loadTokens(); },
onTurn: () => { loadBanner(true); loadTokens(); },
onChats: id => { if (chatList) chatList.setActive(id); },
});