Spaces:
Sleeping
Sleeping
correct highlgihting of selected model onmount
Browse filesFiles changed (2)
34 unmodified lines3536373839404134 unmodified lines{#if showModelPickerModal} <ModelSelectorModal {models} {conversation} on:modelSelected={e => changeModel(e.detail)} on:close={e => (showModelPickerModal = false)} />1223452 unmodified lines89101112131414 unmodified lines293031323334353637383940<script lang="ts"> import type { ModelEntryWithTokenizer } from "./types"; import type { Conversation, ModelEntryWithTokenizer } from "./types";
import { createEventDispatcher, tick } from "svelte";
2 unmodified lines import IconStar from "../Icons/IconStar.svelte";
export let models: ModelEntryWithTokenizer[]; export let conversation: Conversation;
let backdropEl: HTMLDivElement; let query = "";14 unmodified lines : !FEATUED_MODELS_IDS.includes(m.id) );
if (featuredModels.findIndex(model => model.id === conversation.model.id) !== -1) { highlightIdx = featuredModels.findIndex(model => model.id === conversation.model.id); } else { highlightIdx = featuredModels.length + otherModels.findIndex(model => model.id === conversation.model.id); }
function handleKeydown(event: KeyboardEvent) { const { key } = event; let scrollLogicalPosition: ScrollLogicalPosition = "end";src/lib/components/InferencePlayground/InferencePlaygroundModelSelector.svelte+1
src/lib/components/InferencePlayground/InferencePlaygroundModelSelectorModal.svelte+8-1