mirror of
https://github.com/ggml-org/llama.cpp.git
synced 2026-09-29 01:17:36 -05:00
ui : stop opening the model info dialog on selector open
Assisted-by: pi:llama.cpp/DeepSeek-V4.1-Flash
This commit is contained in:
@@ -116,19 +116,23 @@ export function useModelsSelector(opts: UseModelsSelectorOptions): UseModelsSele
|
||||
function handleOpenChange(open: boolean) {
|
||||
if (loading || updating) return;
|
||||
|
||||
if (isRouter) {
|
||||
searchTerm = '';
|
||||
|
||||
if (open) {
|
||||
modelsStore.fetchRouterModels().then(() => {
|
||||
modelsStore.props.fetchModalitiesForLoadedModels();
|
||||
});
|
||||
}
|
||||
|
||||
opts.onOpenChange?.(open);
|
||||
} else {
|
||||
// a single-model llama.cpp server has no list to show, so the trigger
|
||||
// opens the model info dialog instead; external backends have a menu
|
||||
if (!isRouter && serverStore.capabilities.props) {
|
||||
showModelDialog = open;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
searchTerm = '';
|
||||
|
||||
if (open && isRouter) {
|
||||
modelsStore.fetchRouterModels().then(() => {
|
||||
modelsStore.props.fetchModalitiesForLoadedModels();
|
||||
});
|
||||
}
|
||||
|
||||
opts.onOpenChange?.(open);
|
||||
}
|
||||
|
||||
async function handleBackendChange(backendId: string) {
|
||||
|
||||
Reference in New Issue
Block a user