This commit is contained in:
Timothy Jaeryang Baek committed 2026-07-15 21:43:47 -04:00
1 parent 4d11553a6b
commit 423cafd4e7
21 files changed
+803 -1158

No files matched your search

@@ -43,6 +43,7 @@
export let readOnly = false;
export let editCodeBlock = true;
export let topPadding = false;
export let onInsertToNote: ((content: string) => void) | null = null;
</script>
<div
@@ -72,6 +73,7 @@
{readOnly}
{editCodeBlock}
{topPadding}
{onInsertToNote}
/>
{:else if (history.messages[history.messages[messageId].parentId]?.models?.length ?? 1) === 1}
<ResponseMessage
@@ -123,6 +125,7 @@
{readOnly}
{editCodeBlock}
{topPadding}
{onInsertToNote}
/>
{/key}
{/if}
@@ -49,6 +49,7 @@
export let triggerScroll: Function;
export let topPadding = false;
export let onInsertToNote: ((content: string) => void) | null = null;
const dispatch = createEventDispatcher();
@@ -320,6 +321,7 @@
{addMessages}
{readOnly}
{topPadding}
{onInsertToNote}
/>
{/if}
{/key}
@@ -377,6 +379,7 @@
{readOnly}
{editCodeBlock}
{topPadding}
{onInsertToNote}
/>
{/if}
{/key}
@@ -411,7 +414,9 @@
</div>
{#if message.timestamp}
<div class="mt-0.5 flex justify-start whitespace-nowrap text-gray-600 dark:text-gray-500">
<div
class="mt-0.5 flex justify-start whitespace-nowrap text-gray-600 dark:text-gray-500"
>
<Tooltip
className="flex self-center"
content={formatMessageTimestampFull(message.timestamp * 1000)}
@@ -166,6 +166,7 @@
export let readOnly = false;
export let editCodeBlock = true;
export let topPadding = false;
export let onInsertToNote: ((content: string) => void) | null = null;
let citationsElement: HTMLDivElement;
@@ -1051,6 +1052,22 @@
</button>
</Tooltip>
{#if onInsertToNote && visibleResponseContent}
<Tooltip content={$i18n.t('Insert into note')} placement="bottom">
<button
aria-label={$i18n.t('Insert into note')}
class="{isLastMessage || ($settings?.highContrastMode ?? false)
? 'visible'
: 'invisible group-hover:visible'} rounded-lg px-2 py-1.5 text-xs text-gray-500 transition hover:bg-black/5 hover:text-black dark:hover:bg-white/5 dark:hover:text-white"
on:click={() => {
onInsertToNote?.(visibleResponseContent);
}}
>
{$i18n.t('Insert')}
</button>
</Tooltip>
{/if}
{#if !readOnly && ($user?.role === 'admin' || ($user?.permissions?.chat?.tts ?? true))}
<Tooltip content={$i18n.t('Read Aloud')} placement="bottom">
<button