Spaces:
Build error
Build error
pulsating animation for non-streaming messages to give feedback to the user
Browse files
src/lib/components/Playground/Playground.svelte
CHANGED
@@ -130,6 +130,7 @@
|
|
130 |
abortController
|
131 |
);
|
132 |
} else {
|
|
|
133 |
waitForNonStreaming = true;
|
134 |
const newMessage = await handleNonStreamingResponse(
|
135 |
hf,
|
@@ -221,6 +222,7 @@
|
|
221 |
<div
|
222 |
class="flex max-h-[calc(100dvh-5.8rem)] flex-col overflow-y-auto overflow-x-hidden @container"
|
223 |
class:pointer-events-none={loading}
|
|
|
224 |
bind:this={messageContainer}
|
225 |
>
|
226 |
{#if conversations.length > 1}
|
|
|
130 |
abortController
|
131 |
);
|
132 |
} else {
|
133 |
+
streamingMessage = null;
|
134 |
waitForNonStreaming = true;
|
135 |
const newMessage = await handleNonStreamingResponse(
|
136 |
hf,
|
|
|
222 |
<div
|
223 |
class="flex max-h-[calc(100dvh-5.8rem)] flex-col overflow-y-auto overflow-x-hidden @container"
|
224 |
class:pointer-events-none={loading}
|
225 |
+
class:animate-pulse={loading && !streamingMessage}
|
226 |
bind:this={messageContainer}
|
227 |
>
|
228 |
{#if conversations.length > 1}
|