feat: keyboard shortcuts

This commit is contained in:
Timothy J. Baek 2023-12-28 02:46:57 -08:00
parent 349e3074d7
commit 1f5bfe67a1
4 changed files with 303 additions and 1 deletions

View file

@ -119,6 +119,7 @@
langDiv.style.fontSize = '0.75rem';
let button = document.createElement('button');
button.className = 'copy-code-button';
button.textContent = 'Copy Code';
button.style.background = 'none';
button.style.fontSize = '0.75rem';
@ -832,7 +833,7 @@
<button
class="{messageIdx + 1 === messages.length
? 'visible'
: 'invisible group-hover:visible'} p-1 rounded dark:hover:bg-gray-800 transition"
: 'invisible group-hover:visible'} p-1 rounded dark:hover:bg-gray-800 transition copy-response-button"
on:click={() => {
copyToClipboard(message.content);
}}