Spaces:
Sleeping
Sleeping
refactor a bit
Browse files16 unmodified lines17181920212246 unmodified lines697071727374757677787980818283848516 unmodified linesconst dispatch = createEventDispatcher<{ modelSelected: string; close: void }>();function handleKeydown(event: KeyboardEvent) {const { key } = event;let scrollLogicalPosition: ScrollLogicalPosition = "end";46 unmodified linesdispatch("close");}}$: featuredModels = models.filter(m =>query? FEATUED_MODELS_IDS.includes(m.id) && m.id.toLocaleLowerCase().includes(query.toLocaleLowerCase().trim()): FEATUED_MODELS_IDS.includes(m.id));$: otherModels = models.filter(m =>query? !FEATUED_MODELS_IDS.includes(m.id) && m.id.toLocaleLowerCase().includes(query.toLocaleLowerCase().trim()): !FEATUED_MODELS_IDS.includes(m.id));</script><svelte:window on:keydown={handleKeydown} on:mousemove={() => (ignoreCursorHighlight = false)} />16 unmodified lines171819202122232425262728293031323346 unmodified lines80818283848516 unmodified linesconst dispatch = createEventDispatcher<{ modelSelected: string; close: void }>();const featuredModels = models.filter(m =>query? FEATUED_MODELS_IDS.includes(m.id) && m.id.toLocaleLowerCase().includes(query.toLocaleLowerCase().trim()): FEATUED_MODELS_IDS.includes(m.id));const otherModels = models.filter(m =>query? !FEATUED_MODELS_IDS.includes(m.id) && m.id.toLocaleLowerCase().includes(query.toLocaleLowerCase().trim()): !FEATUED_MODELS_IDS.includes(m.id));function handleKeydown(event: KeyboardEvent) {const { key } = event;let scrollLogicalPosition: ScrollLogicalPosition = "end";46 unmodified linesdispatch("close");}}</script><svelte:window on:keydown={handleKeydown} on:mousemove={() => (ignoreCursorHighlight = false)} />
src/lib/components/InferencePlayground/InferencePlaygroundModelSelectorModal.svelte+11-11