From 8fb5e22e433294cbcd69f78a7ed538cd6692268c Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Wed, 1 May 2024 23:41:12 -0700 Subject: [PATCH] refac: placeholder fade in effect --- .../chat/MessageInput/Suggestions.svelte | 16 ++++- .../chat/Messages/Placeholder.svelte | 58 +++++++++++-------- src/routes/(app)/+layout.svelte | 1 - src/routes/(app)/c/[id]/+page.svelte | 5 +- 4 files changed, 50 insertions(+), 30 deletions(-) diff --git a/src/lib/components/chat/MessageInput/Suggestions.svelte b/src/lib/components/chat/MessageInput/Suggestions.svelte index e0672ada8..9f09a3952 100644 --- a/src/lib/components/chat/MessageInput/Suggestions.svelte +++ b/src/lib/components/chat/MessageInput/Suggestions.svelte @@ -33,17 +33,27 @@ >
{#if prompt.title && prompt.title[0] !== ''} -
{prompt.title[0]}
+
+ {prompt.title[0]} +
{prompt.title[1]}
{:else} -
+
{prompt.content}
{/if}
-
Prompt
+
+ Prompt +
0) { selectedModelIdx = models.length - 1; } + + onMount(() => { + mounted = true; + }); -{#if models.length > 0} +{#key mounted}
-
+
{#each models as model, modelIdx}
diff --git a/src/routes/(app)/c/[id]/+page.svelte b/src/routes/(app)/c/[id]/+page.svelte index 225fa2ae3..5d7429e59 100644 --- a/src/routes/(app)/c/[id]/+page.svelte +++ b/src/routes/(app)/c/[id]/+page.svelte @@ -5,7 +5,6 @@ import { onMount, tick, getContext } from 'svelte'; import { goto } from '$app/navigation'; import { page } from '$app/stores'; - import { models, modelfiles, @@ -860,8 +859,8 @@ {#if loaded}