llama-cpp-K2-FAST2 / tools /ui /tests /client /components /ChatFormInputRichHarness.svelte
VladHong's picture
llama.cpp k2-fast2: MBZUAI model/K2Horizon + FAST2 sliding-window override
c59fd93 verified
Raw History Blame Contribute Delete
645 Bytes
<script lang="ts">
import ChatFormInputRich from '$lib/components/app/chat/ChatForm/ChatFormInput/ChatFormInputRich.svelte';
import { untrack } from 'svelte';
interface Props {
value?: string;
}
let { value: initial = '' }: Props = $props();
let value = $state(untrack(() => initial));
let inputRef: ChatFormInputRich | undefined = $state(undefined);
export function getValue() {
return value;
}
export function getCaretOffset() {
return inputRef?.getCaretOffset();
}
export function setCaretOffset(offset: number) {
inputRef?.setCaretOffset(offset);
}
</script>
<ChatFormInputRich bind:this={inputRef} bind:value />