Epoch Guardian
Challenge
Solution
bubble.appendChild(head);
bubble.appendChild(pre);
row.appendChild(bubble);
chatEl.appendChild(row);
chatEl.scrollTop = chatEl.scrollHeight;
}
// Load chat history from server FRAG_A = "a9f3c1e8b2d4"
async function loadHistory() {
const r = await fetch('/api/history');
const data = await r.json();
chatEl.innerHTML = '';
(data.history || []).forEach(m => addMessage(m.role, m.content));
}Mis à jour