Spaces:
Paused
Paused
Download src/lib/components/chat/Overview/Flow.svelte from coteerratu/open-webui: direct link, hf CLI and curl.
- Browser
- Download file 802 Bytes
-
https://huggingface.co/spaces/coteerratu/open-webui/resolve/main/src/lib/components/chat/Overview/Flow.svelte
- Command line
-
hf download hf://spaces/coteerratu/open-webui/src/lib/components/chat/Overview/Flow.svelte
-
curl -L -o Flow.svelte https://huggingface.co/spaces/coteerratu/open-webui/resolve/main/src/lib/components/chat/Overview/Flow.svelte
802 Bytes
| <script> | |
| import { createEventDispatcher } from 'svelte'; | |
| const dispatch = createEventDispatcher(); | |
| import { theme } from '$lib/stores'; | |
| import { Background, Controls, SvelteFlow, BackgroundVariant } from '@xyflow/svelte'; | |
| export let nodes; | |
| export let nodeTypes; | |
| export let edges; | |
| </script> | |
| <SvelteFlow | |
| {nodes} | |
| {nodeTypes} | |
| {edges} | |
| fitView | |
| minZoom={0.001} | |
| colorMode={$theme.includes('dark') | |
| ? 'dark' | |
| : $theme === 'system' | |
| ? window.matchMedia('(prefers-color-scheme: dark)').matches | |
| ? 'dark' | |
| : 'light' | |
| : 'light'} | |
| nodesConnectable={false} | |
| nodesDraggable={false} | |
| on:nodeclick={(e) => dispatch('nodeclick', e.detail)} | |
| oninit={() => { | |
| console.log('Flow initialized'); | |
| }} | |
| > | |
| <Controls showLock={false} /> | |
| <Background variant={BackgroundVariant.Dots} /> | |
| </SvelteFlow> | |