From 92e8608ac71750d0f37e293f22c4c1fb70ee4308 Mon Sep 17 00:00:00 2001 From: gramps Date: Mon, 13 Jul 2026 16:10:30 -0700 Subject: [PATCH] fix: capture this ref in user copy icon onclick --- templates/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/index.html b/templates/index.html index a5c68fb..e1cf5d0 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1447,7 +1447,7 @@ function appendMessage(role, content, animate, isSearch = false, afterEl = null) 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'); const textHtml = content ? renderMarkdown(content) : ''; - const copyIcon = role === 'user' && content ? `📋` : ''; + const copyIcon = role === 'user' && content ? `📋` : ''; div.innerHTML = `
${role === 'user' ? 'YOU' : 'AI'}
${role}${role === 'user' ? ' ' + timeStr + '' : ''}
${textHtml}${copyIcon}
${role === 'assistant' ? '
' : ''}
`; if (role === 'user') { const pair = document.createElement('div');