char-fork/llama.cpp
git clone https://git.t4t.associates/char-fork/llama.cpp
92d1bb0c9
char/aliceai-t5-moe
1< script lang ="ts "> 2import { 3useChatFormPickers , 4type UseChatFormPickersReturn 5} from '$lib/hooks/use-chat-form-pickers.svelte' ; 6 7let value = $state ( '' ); 8let caretOffset = $state ( 0 ); 9const calls :string [] = []; 10 11const pickers = useChatFormPickers ({ 12focusInput :() => {}, 13getCaretOffset :() => caretOffset , 14getCwd :() => null , 15getPickersRef :() => undefined , 16getServerHome :() => null , 17getShowModelSelector :() => true , 18getValue :() => value , 19hasCwdTools :() => true , 20hasPrompts :() => true , 21openModelSelector :() => { 22calls . push ( 'openModelSelector' ); 23}, 24setCaretOffset :( o ) => { 25caretOffset = o ; 26}, 27setValue :( v ) => { 28value = v ; 29calls . push ( `setValue: ${ v } ` ); 30} 31}); 32 33// Simulate the user typing: update the buffer and run the input flow. 34export function type ( text :string ) { 35value = text ; 36caretOffset = text . length ; 37pickers . handleInput (); 38} 39 40export function getValue () { 41return value ; 42} 43 44export function getCalls () { 45return calls ; 46} 47 48export function getPickers () :UseChatFormPickersReturn { 49return pickers ; 50} 51</ script >