Give the AI subsystem one profile table and one collection, read everywhere
This commit is contained in:
@@ -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); },
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user