This commit is contained in:
Timothy Jaeryang Baek committed 2026-11-24 20:08:57 +04:00
1 parent d89cd809cb
commit aa3f714c21
4 files changed
+10 -6

No files matched your search

@@ -4,6 +4,7 @@
import type { Readable } from 'svelte/store';
import type { Action } from 'svelte/action';
const i18n = getContext('i18n');
const exporting = getContext('exporting');
const markdown = getContext<
| {
document?: boolean;
@@ -221,7 +222,7 @@
<CodeBlock
id={`${id}-${tokenIdx}`}
className={markdown?.document ? 'document-code-block' : ''}
collapsed={markdown?.document || id.startsWith('chat-pdf-')
collapsed={markdown?.document || exporting
? false
: ($settings?.collapseCodeBlocks ?? false)}
{token}
@@ -27,6 +27,7 @@
import { getChatContext } from '$lib/components/chat/context';
const { models } = getChatContext();
const exporting = getContext('exporting');
const i18n = getContext<typeof import('$lib/i18n').default>('i18n');
export let chatId;
@@ -237,7 +238,7 @@
class="flex snap-x snap-mandatory overflow-x-auto scrollbar-hidden"
id="responses-container-{chatId}-{parentMessage.id}"
>
{#if $settings?.displayMultiModelResponsesInTabs ?? false}
{#if !exporting && ($settings?.displayMultiModelResponsesInTabs ?? false)}
<div class="w-full">
<div
class=" flex w-full mb-4.5 border-b border-base-200 dark:border-base-850 {compactPreview
+3 -2
View File
@@ -1,6 +1,6 @@
<script lang="ts">
import { toast } from 'svelte-sonner';
import { getContext, tick } from 'svelte';
import { getContext, setContext, tick } from 'svelte';
import fileSaver from 'file-saver';
const { saveAs } = fileSaver;
@@ -38,6 +38,7 @@
import EditPencilIcon from '$lib/components/layout/Sidebar/icons/EditPencil.svelte';
const i18n = getContext('i18n');
setContext('exporting', true);
export let shareEnabled: boolean = false;
export let readOnly: boolean = false;
@@ -121,7 +122,7 @@
<div id="full-messages-container">
<Messages
className="h-full flex pt-4 pb-8 w-full"
chatId={`chat-pdf-${chat?.id ?? ''}`}
chatId={`chat-preview-${chat?.id ?? ''}`}
user={$user}
readOnly={true}
history={chat.chat.history}
@@ -1,6 +1,6 @@
<script lang="ts">
import { toast } from 'svelte-sonner';
import { getContext, tick } from 'svelte';
import { getContext, setContext, tick } from 'svelte';
import fileSaver from 'file-saver';
const { saveAs } = fileSaver;
@@ -32,6 +32,7 @@
import ChatCheckIcon from '$lib/components/icons/ChatCheck.svelte';
const i18n = getContext('i18n');
setContext('exporting', true);
export let shareHandler: Function;
export let moveChatHandler: Function;
@@ -135,7 +136,7 @@
<div id="full-messages-container">
<Messages
className="h-full flex pt-4 pb-8 w-full"
chatId={`chat-pdf-${chat?.id ?? ''}`}
chatId={`chat-preview-${chat?.id ?? ''}`}
user={$user}
readOnly={true}
history={chat.chat.history}