mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2026-07-09 17:08:33 +00:00
fix router mode on lcpp ui
This commit is contained in:
parent
a072dd8304
commit
dfa1c573c4
5 changed files with 14 additions and 19 deletions
Binary file not shown.
|
|
@ -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(() => {
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
|
|
|||
|
|
@ -322,7 +322,7 @@ const SETTINGS_REGISTRY: Record<string, SettingsSectionEntry> = {
|
|||
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: {
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue