Mercurial Hosting > lang
comparison src/chat.js @ 13:65bd7e245c63
add html
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Thu, 24 Jul 2025 22:47:48 -0600 |
parents | 2d4b3f003ec2 |
children | 47b00cce8b53 |
comparison
equal
deleted
inserted
replaced
12:2d4b3f003ec2 | 13:65bd7e245c63 |
---|---|
40 document.querySelector('[waiting-ai-icon]').style.display = 'none'; | 40 document.querySelector('[waiting-ai-icon]').style.display = 'none'; |
41 } | 41 } |
42 | 42 |
43 function updateAi(html) { | 43 function updateAi(html) { |
44 hideWaitingAiIcon(); | 44 hideWaitingAiIcon(); |
45 document.querySelector('div[messages]').innerHTML = html; | 45 document.querySelector('div[messages]').insertAdjacentHTML('beforeend',html); |
46 handleMarkdown(); | 46 handleMarkdown(); |
47 document.querySelector('textarea').focus(); | 47 document.querySelector('textarea').focus(); |
48 window.scrollTo(0, document.body.scrollHeight); | 48 window.scrollTo(0, document.body.scrollHeight); |
49 /* | 49 /* |
50 let scroll = aiDialog.querySelector('[scroll]'); | 50 let scroll = aiDialog.querySelector('[scroll]'); |