|
@@ -869,6 +869,7 @@
|
|
|
{#if siblings.length > 1}
|
|
|
<div class="flex self-center min-w-fit" dir="ltr">
|
|
|
<button
|
|
|
+ aria-label={$i18n.t('Previous message')}
|
|
|
class="self-center p-1 hover:bg-black/5 dark:hover:bg-white/5 dark:hover:text-white hover:text-black rounded-md transition"
|
|
|
on:click={() => {
|
|
|
showPreviousMessage(message);
|
|
@@ -941,9 +942,10 @@
|
|
|
on:click={() => {
|
|
|
showNextMessage(message);
|
|
|
}}
|
|
|
+ aria-label={$i18n.t('Next message')}
|
|
|
>
|
|
|
<svg
|
|
|
- xmlns="http://www.w3.org/2000/svg"
|
|
|
+ xmlns="http://www.w3.org/2000/svg"
|
|
|
fill="none"
|
|
|
aria-hidden="true"
|
|
|
viewBox="0 0 24 24"
|
|
@@ -966,6 +968,7 @@
|
|
|
{#if $user?.role === 'user' ? ($user?.permissions?.chat?.edit ?? true) : true}
|
|
|
<Tooltip content={$i18n.t('Edit')} placement="bottom">
|
|
|
<button
|
|
|
+ aria-label={$i18n.t('Edit')}
|
|
|
class="{isLastMessage
|
|
|
? 'visible'
|
|
|
: 'invisible group-hover:visible'} p-1.5 hover:bg-black/5 dark:hover:bg-white/5 rounded-lg dark:hover:text-white hover:text-black transition"
|
|
@@ -995,6 +998,7 @@
|
|
|
|
|
|
<Tooltip content={$i18n.t('Copy')} placement="bottom">
|
|
|
<button
|
|
|
+ aria-label={$i18n.t('Copy')}
|
|
|
class="{isLastMessage
|
|
|
? 'visible'
|
|
|
: 'invisible group-hover:visible'} p-1.5 hover:bg-black/5 dark:hover:bg-white/5 rounded-lg dark:hover:text-white hover:text-black transition copy-response-button"
|
|
@@ -1023,6 +1027,7 @@
|
|
|
{#if $user?.role === 'admin' || ($user?.permissions?.chat?.tts ?? true)}
|
|
|
<Tooltip content={$i18n.t('Read Aloud')} placement="bottom">
|
|
|
<button
|
|
|
+ aria-label={$i18n.t('Read Aloud')}
|
|
|
id="speak-button-{message.id}"
|
|
|
class="{isLastMessage
|
|
|
? 'visible'
|
|
@@ -1106,6 +1111,7 @@
|
|
|
{#if $config?.features.enable_image_generation && ($user?.role === 'admin' || $user?.permissions?.features?.image_generation) && !readOnly}
|
|
|
<Tooltip content={$i18n.t('Generate Image')} placement="bottom">
|
|
|
<button
|
|
|
+ aria-label={$i18n.t('Generate Image')}
|
|
|
class="{isLastMessage
|
|
|
? 'visible'
|
|
|
: 'invisible group-hover:visible'} p-1.5 hover:bg-black/5 dark:hover:bg-white/5 rounded-lg dark:hover:text-white hover:text-black transition"
|
|
@@ -1185,6 +1191,7 @@
|
|
|
placement="bottom"
|
|
|
>
|
|
|
<button
|
|
|
+ aria-hidden="true"
|
|
|
class=" {isLastMessage
|
|
|
? 'visible'
|
|
|
: 'invisible group-hover:visible'} p-1.5 hover:bg-black/5 dark:hover:bg-white/5 rounded-lg dark:hover:text-white hover:text-black transition whitespace-pre-wrap"
|
|
@@ -1216,6 +1223,7 @@
|
|
|
{#if !$temporaryChatEnabled && ($config?.features.enable_message_rating ?? true)}
|
|
|
<Tooltip content={$i18n.t('Good Response')} placement="bottom">
|
|
|
<button
|
|
|
+ aria-label={$i18n.t('Good Response')}
|
|
|
class="{isLastMessage
|
|
|
? 'visible'
|
|
|
: 'invisible group-hover:visible'} p-1.5 hover:bg-black/5 dark:hover:bg-white/5 rounded-lg {(
|
|
@@ -1253,6 +1261,7 @@
|
|
|
|
|
|
<Tooltip content={$i18n.t('Bad Response')} placement="bottom">
|
|
|
<button
|
|
|
+ aria-label={$i18n.t('Bad Response')}
|
|
|
class="{isLastMessage
|
|
|
? 'visible'
|
|
|
: 'invisible group-hover:visible'} p-1.5 hover:bg-black/5 dark:hover:bg-white/5 rounded-lg {(
|
|
@@ -1292,6 +1301,7 @@
|
|
|
{#if isLastMessage}
|
|
|
<Tooltip content={$i18n.t('Continue Response')} placement="bottom">
|
|
|
<button
|
|
|
+ aria-label={$i18n.t('Continue Response')}
|
|
|
type="button"
|
|
|
id="continue-response-button"
|
|
|
class="{isLastMessage
|
|
@@ -1328,6 +1338,7 @@
|
|
|
<Tooltip content={$i18n.t('Regenerate')} placement="bottom">
|
|
|
<button
|
|
|
type="button"
|
|
|
+ aria-label={$i18n.t('Regenerate')}
|
|
|
class="{isLastMessage
|
|
|
? 'visible'
|
|
|
: 'invisible group-hover:visible'} p-1.5 hover:bg-black/5 dark:hover:bg-white/5 rounded-lg dark:hover:text-white hover:text-black transition regenerate-response-button"
|
|
@@ -1370,6 +1381,7 @@
|
|
|
<Tooltip content={$i18n.t('Delete')} placement="bottom">
|
|
|
<button
|
|
|
type="button"
|
|
|
+ aria-label={$i18n.t('Delete')}
|
|
|
id="delete-response-button"
|
|
|
class="{isLastMessage
|
|
|
? 'visible'
|
|
@@ -1402,6 +1414,7 @@
|
|
|
<Tooltip content={action.name} placement="bottom">
|
|
|
<button
|
|
|
type="button"
|
|
|
+ aria-label={action.name}
|
|
|
class="{isLastMessage
|
|
|
? 'visible'
|
|
|
: 'invisible group-hover:visible'} p-1.5 hover:bg-black/5 dark:hover:bg-white/5 rounded-lg dark:hover:text-white hover:text-black transition"
|