Download tools/ui/src/lib/contexts/chat-settings-config.context.ts from Brunobkr/llama.cpp_AlgMor24_github: direct link, hf CLI and curl.
- Browser
- Download file 689 Bytes
-
https://huggingface.co/datasets/Brunobkr/llama.cpp_AlgMor24_github/resolve/main/tools/ui/src/lib/contexts/chat-settings-config.context.ts
- Command line
-
hf download hf://datasets/Brunobkr/llama.cpp_AlgMor24_github/tools/ui/src/lib/contexts/chat-settings-config.context.ts
-
curl -L -o chat-settings-config.context.ts https://huggingface.co/datasets/Brunobkr/llama.cpp_AlgMor24_github/resolve/main/tools/ui/src/lib/contexts/chat-settings-config.context.ts
689 Bytes
| import { CONTEXT_KEY_CHAT_SETTINGS_CONFIG } from '$lib/constants'; | |
| import { getContext, setContext } from 'svelte'; | |
| export interface ChatSettingsConfigContext { | |
| readonly localConfig: SettingsConfigType; | |
| handleConfigChange: (key: string, value: string | boolean) => void; | |
| handleThemeChange: (theme: string) => void; | |
| } | |
| const CHAT_SETTINGS_CONFIG_KEY = Symbol.for(CONTEXT_KEY_CHAT_SETTINGS_CONFIG); | |
| export function setChatSettingsConfigContext( | |
| ctx: ChatSettingsConfigContext | |
| ): ChatSettingsConfigContext { | |
| return setContext(CHAT_SETTINGS_CONFIG_KEY, ctx); | |
| } | |
| export function getChatSettingsConfigContext(): ChatSettingsConfigContext { | |
| return getContext(CHAT_SETTINGS_CONFIG_KEY); | |
| } | |