forked from wylab/llama-swap
e3bf065574
- Keep Playground component mounted when navigating away, preserving streaming/generating state - Add animated gradient effect on Playground nav link when activity is in progress
19 lines
528 B
TypeScript
19 lines
528 B
TypeScript
import { writable, derived } from "svelte/store";
|
|
|
|
const chatStreaming = writable(false);
|
|
const imageGenerating = writable(false);
|
|
const speechGenerating = writable(false);
|
|
const audioTranscribing = writable(false);
|
|
|
|
export const playgroundActivity = derived(
|
|
[chatStreaming, imageGenerating, speechGenerating, audioTranscribing],
|
|
([$chat, $image, $speech, $audio]) => $chat || $image || $speech || $audio
|
|
);
|
|
|
|
export const playgroundStores = {
|
|
chatStreaming,
|
|
imageGenerating,
|
|
speechGenerating,
|
|
audioTranscribing,
|
|
};
|