ui : close the selector when the manager opens

Assisted-by: pi:llama.cpp/DeepSeek-V4.1-Flash
This commit is contained in:
Aleksander Grygier
2026-09-28 12:10:12 +02:00
parent dacaae98f2
commit b9963bb87c
@@ -190,6 +190,14 @@ export function useModelsSelector(opts: UseModelsSelectorOptions): UseModelsSele
);
const emptyMessage = $derived(searchTerm ? 'No models found.' : 'No models yet.');
// a row action can hand over to the models manager, which takes the focus;
// the selector closes so it does not sit open behind the dialog
$effect(() => {
if (!uiStore.manageModelsOpen) return;
opts.onOpenChange?.(false);
});
onMount(() => {
modelsStore.fetch().catch((error) => {
console.error('Unable to load models:', error);