diff --git a/embd_res/lcpp.gz.embd b/embd_res/lcpp.gz.embd index d5d104116..6d0df643b 100644 Binary files a/embd_res/lcpp.gz.embd and b/embd_res/lcpp.gz.embd differ diff --git a/tools/ui/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionModels.svelte b/tools/ui/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionModels.svelte index 712326cba..998e8dcb4 100644 --- a/tools/ui/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionModels.svelte +++ b/tools/ui/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionModels.svelte @@ -63,8 +63,8 @@ modelsStore.selectedModelName = conversationModel; modelsStore.selectModelByName(conversationModel); } else { - modelsStore.selectedModelName = null; - modelsStore.clearSelection(); + modelsStore.selectedModelId = null; + modelsStore.selectedModelName = conversationModel; } lastSyncedConversationModel = conversationModel; } else if ( @@ -141,19 +141,7 @@ }); $effect(() => { - if (!isRouter) { - isSelectedModelInCache = true; - } else if (conversationModel) { - isSelectedModelInCache = modelOptions().some((option) => option.model === conversationModel); - } else { - const currentModelId = selectedModelId(); - - if (!currentModelId) { - isSelectedModelInCache = false; - } else { - isSelectedModelInCache = modelOptions().some((option) => option.id === currentModelId); - } - } + isSelectedModelInCache = !isRouter || !!conversationModel || !!selectedModelId(); }); $effect(() => { diff --git a/tools/ui/src/lib/constants/app.ts b/tools/ui/src/lib/constants/app.ts index c598f480f..d47e16569 100644 --- a/tools/ui/src/lib/constants/app.ts +++ b/tools/ui/src/lib/constants/app.ts @@ -1 +1 @@ -export const APP_NAME = import.meta.env?.VITE_PUBLIC_APP_NAME || 'llama-ui'; +export const APP_NAME = import.meta.env?.VITE_PUBLIC_APP_NAME || 'llama-ui-koboldcpp'; diff --git a/tools/ui/src/lib/constants/settings-registry.ts b/tools/ui/src/lib/constants/settings-registry.ts index 4c23b2a88..7bd8aa858 100644 --- a/tools/ui/src/lib/constants/settings-registry.ts +++ b/tools/ui/src/lib/constants/settings-registry.ts @@ -322,7 +322,7 @@ const SETTINGS_REGISTRY: Record = { key: SETTINGS_KEYS.ALWAYS_SHOW_SIDEBAR_ON_DESKTOP, label: 'Always show sidebar on desktop', help: 'Always keep the sidebar visible on desktop instead of auto-hiding it.', - defaultValue: true, + defaultValue: false, type: SettingsFieldType.CHECKBOX, section: SETTINGS_SECTION_SLUGS.DISPLAY, sync: { diff --git a/tools/ui/src/lib/hooks/use-models-selector.svelte.ts b/tools/ui/src/lib/hooks/use-models-selector.svelte.ts index 098cb2c27..9af439229 100644 --- a/tools/ui/src/lib/hooks/use-models-selector.svelte.ts +++ b/tools/ui/src/lib/hooks/use-models-selector.svelte.ts @@ -76,7 +76,7 @@ export function useModelsSelector(opts: UseModelsSelectorOptions): UseModelsSele const isCurrentModelInCache = $derived.by(() => { if (!isRouter || !currentModel) return true; - return options.some((option) => option.model === currentModel); + return true; //kcpp hack to always let the model be treated like in cache even if returned name is wrong }); let isLoadingModel = $state(false); @@ -183,7 +183,14 @@ export function useModelsSelector(opts: UseModelsSelectorOptions): UseModelsSele }; } - return options.find((option) => option.model === currentModel); + return ( + options.find((option) => option.model === currentModel) ?? { + id: 'current', + model: currentModel, + name: currentModel.split('/').pop() || currentModel, + capabilities: [] + } + ); } if (activeId) {