Brunobkr/llama.cpp_AlgMor24_github
ΩFFFΣLLIa • llama.cpp • AlgMor24 ██████╗ ███████╗███████╗███████╗██╗ ██╗ ██╗ █████╗ ██╔═══██╗██╔════╝██╔════╝██╔════╝██║ ██║ ██║██╔══██╗ ██║ ██║█████╗ █████╗ █████╗ ██║ ██║ ██║███████║ ██║ ██║██╔══╝ ██╔══╝ ██╔══╝ ██║ ██║ ██║██╔══██║ ╚██████╔╝██║ ██║ ███████╗███████╗███████╗██║██║ ██║ ╚═════╝ ╚═╝ ╚═╝ ╚══════╝╚══════╝╚══════╝╚═╝╚═╝ ╚═╝ High-Performance LLM / VLM Inference & Autonomous Agentic Ecosystem… See the full description on the dataset page: https://huggingface.co/datasets/Brunobkr/llama.cpp_AlgMor24_github.
03.1k
1import { PersistedState, watch } from "runed";2import { themeStorageKey } from "./storage-keys.svelte.js";3import { isBrowser, noopStorage } from "./utils.js";4class CustomTheme {5 #storage = isBrowser ? localStorage : noopStorage;6 #initialValue = this.#storage.getItem(themeStorageKey.current);7 #value = this.#initialValue === null || this.#initialValue === undefined ? "" : this.#initialValue;8 #persisted = $state(this.#makePersisted());9 #makePersisted(value = this.#value) {10 return new PersistedState(themeStorageKey.current, value, {11 serializer: {12 serialize: (v) => {13 if (typeof v !== "string")14 return "";15 return v;16 },17 deserialize: (v) => v,18 },19 });20 }21 constructor() {22 $effect.root(() => {23 return watch.pre(() => themeStorageKey.current, (_, prevStorageKey) => {24 const currModeValue = this.#persisted.current;25 this.#persisted = this.#makePersisted(currModeValue);26 if (prevStorageKey) {27 localStorage.removeItem(prevStorageKey);28 }29 });30 });31 }32 /**33 * The current theme.34 * @returns The current theme.35 */36 get current() {37 return this.#persisted.current;38 }39 /**40 * Set the current theme.41 * @param newValue The new theme to set.42 */43 set current(newValue) {44 this.#persisted.current = newValue;45 }46}47/**48 * A custom theme to apply and persist to the root `html` element.49 */50export const customTheme = new CustomTheme();51 