From: Pascal Date: Thu, 12 Mar 2026 08:07:05 +0000 (+0100) Subject: New conversations now auto-select the first loaded model (#20403) X-Git-Tag: upstream/0.0.8611~297 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=de190154c85d20e24dbeae8c8af1849402ae5098;p=pkg%2Fggml%2Fsources%2Fllama.cpp New conversations now auto-select the first loaded model (#20403) * webui: auto-select first loaded model for new conversations in router mode * chore: update webui build output --- diff --git a/tools/server/public/index.html.gz b/tools/server/public/index.html.gz index 3d0991dde..493058aa0 100644 Binary files a/tools/server/public/index.html.gz and b/tools/server/public/index.html.gz differ diff --git a/tools/server/webui/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActions.svelte b/tools/server/webui/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActions.svelte index 850177693..2ad830e18 100644 --- a/tools/server/webui/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActions.svelte +++ b/tools/server/webui/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActions.svelte @@ -62,15 +62,12 @@ chatStore.getConversationModel(activeMessages() as DatabaseMessage[]) ); - let previousConversationModel: string | null = null; - $effect(() => { - if (conversationModel && conversationModel !== previousConversationModel) { - previousConversationModel = conversationModel; - - if (!isRouter || modelsStore.isModelLoaded(conversationModel)) { - modelsStore.selectModelByName(conversationModel); - } + if (conversationModel) { + modelsStore.selectModelByName(conversationModel); + } else if (isRouter && modelsStore.loadedModelIds.length > 0) { + const first = modelOptions().find((m) => modelsStore.loadedModelIds.includes(m.model)); + if (first) modelsStore.selectModelById(first.id); } });