Add error message copy button
This commit is contained in:
@@ -407,6 +407,7 @@ export class Renderer {
|
||||
const $msg =
|
||||
this.$tplErrorMessage.content.cloneNode(true).firstElementChild;
|
||||
$msg.querySelector('.message__content').textContent = message;
|
||||
$msg.dataset.copyText = message;
|
||||
this.$chat.insertBefore($msg, this.$chatLoading);
|
||||
this.scrollToBottom();
|
||||
}
|
||||
|
||||
@@ -118,6 +118,14 @@
|
||||
<div class="message__actions">
|
||||
<svg class="message__icon" aria-hidden="true"><use href="/static/icons.svg#assistant"></use></svg>
|
||||
<div class="message__actions-buttons">
|
||||
<button
|
||||
type="button"
|
||||
class="message__action-btn"
|
||||
data-action="copy"
|
||||
aria-label="Copy to clipboard"
|
||||
>
|
||||
<svg class="icon"><use href="/static/icons.svg#copy"></use></svg>
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="message__action-btn message__action-btn--delete"
|
||||
|
||||
Reference in New Issue
Block a user