From 2de8c683ac93b202ab69d26fc3dd5f3396846134 Mon Sep 17 00:00:00 2001 From: Andrew Beal Date: Sun, 28 Sep 2025 23:31:35 +0100 Subject: [PATCH] Add StreamingIndicator component and replace static streaming indicator in ChatArea --- Components/ChatArea.svelte | 14 +- Components/StreamingIndicator.svelte | 253 +++++++++++++++++++++++++++ 2 files changed, 255 insertions(+), 12 deletions(-) create mode 100644 Components/StreamingIndicator.svelte diff --git a/Components/ChatArea.svelte b/Components/ChatArea.svelte index 121a04a..ca3bdd3 100644 --- a/Components/ChatArea.svelte +++ b/Components/ChatArea.svelte @@ -3,6 +3,7 @@ import { Services } from "Services/Services"; import type { StreamingMarkdownService } from "Services/StreamingMarkdownService"; import ChatAreaThought from "./ChatAreaThought.svelte"; + import StreamingIndicator from "./StreamingIndicator.svelte"; export let messages: Array<{id: string, content: string, isUser: boolean, isStreaming: boolean}> = []; export let chatContainer: HTMLDivElement; @@ -98,7 +99,7 @@ {#if message.isStreaming}
- ● ● ● + {:else} @@ -168,15 +169,4 @@ min-height: 1em; /* Ensure the element exists for binding */ } - .streaming-indicator { - display: inline-block; - color: var(--text-accent); - animation: pulse 1.5s infinite; - margin-left: 4px; - } - - @keyframes pulse { - 0%, 100% { opacity: 0.3; } - 50% { opacity: 1; } - } \ No newline at end of file diff --git a/Components/StreamingIndicator.svelte b/Components/StreamingIndicator.svelte new file mode 100644 index 0000000..3c8a5bc --- /dev/null +++ b/Components/StreamingIndicator.svelte @@ -0,0 +1,253 @@ +
+ + + + + +
+ + \ No newline at end of file