char-fork/llama.cpp

git clone https://git.t4t.associates/char-fork/llama.cpp

Aleksander Grygierrefactor: Naming (#27001)fa4ec4590

char/aliceai-t5-moe
645 B27 linesraw
1<script lang="ts">
2	import ChatFormInputRich from '$lib/components/app/chat/ChatForm/ChatFormInput/ChatFormInputRich.svelte';
3	import { untrack } from 'svelte';
4
5	interface Props {
6		value?: string;
7	}
8
9	let { value: initial = '' }: Props = $props();
10
11	let value = $state(untrack(() => initial));
12	let inputRef: ChatFormInputRich | undefined = $state(undefined);
13
14	export function getValue() {
15		return value;
16	}
17
18	export function getCaretOffset() {
19		return inputRef?.getCaretOffset();
20	}
21
22	export function setCaretOffset(offset: number) {
23		inputRef?.setCaretOffset(offset);
24	}
25</script>
26
27<ChatFormInputRich bind:this={inputRef} bind:value />