From 5fa355e1ae3c509ccef63bc79dcd8794e4ec186d Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Mon, 17 Jun 2024 01:31:22 -0700 Subject: [PATCH] feat: background image --- src/lib/components/chat/Chat.svelte | 22 +- .../components/chat/Settings/Interface.svelte | 348 +++++++++++------- src/lib/utils/characters/index.ts | 0 src/routes/(app)/c/[id]/+page.svelte | 5 +- 4 files changed, 229 insertions(+), 146 deletions(-) create mode 100644 src/lib/utils/characters/index.ts diff --git a/src/lib/components/chat/Chat.svelte b/src/lib/components/chat/Chat.svelte index 8819a0428..a5609685e 100644 --- a/src/lib/components/chat/Chat.svelte +++ b/src/lib/components/chat/Chat.svelte @@ -273,6 +273,7 @@ id: m.id, role: m.role, content: m.content, + info: m.info ? m.info : undefined, timestamp: m.timestamp })), chat_id: $chatId @@ -1322,6 +1323,19 @@ ? 'md:max-w-[calc(100%-260px)]' : ''} w-full max-w-full flex flex-col" > + {#if $settings?.backgroundImageUrl ?? null} +
+ +
+ {/if} + 0 && messages.length === 0 && !$chatId && selectedModels.length <= 1}
{#each $banners.filter( (b) => (b.dismissible ? !JSON.parse(localStorage.getItem('dismissedBannerIds') ?? '[]').includes(b.id) : true) ) as banner} @@ -1358,9 +1374,9 @@
{/if} -
+