${role}${role === 'user' ? ' ' + timeStr + '' : ''}
${content ? renderMarkdown(content) : ''}
${role === 'assistant' ? '' : ''}diff --git a/templates/index.html b/templates/index.html index b31832e..0256ffe 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1433,7 +1433,7 @@ function appendMessage(role, content, animate, isSearch = false, afterEl = null) const months = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec']; const ms = now.getMilliseconds(); const timeStr = months[now.getMonth()] + ' ' + String(now.getDate()).padStart(2,'0') + ', ' + now.getFullYear() + ' ' + String(now.getHours()).padStart(2,'0') + ':' + String(now.getMinutes()).padStart(2,'0') + ':' + String(now.getSeconds()).padStart(2,'0') + '.' + String(Math.floor(ms / 10)).padStart(2,'0'); - div.innerHTML = `