mirror of
https://github.com/ggml-org/llama.cpp.git
synced 2026-09-17 20:31:47 +02:00
ui : open the model selector on the favorites tab
Assisted-by: pi:llama.cpp/DeepSeek-V4.1-Flash
This commit is contained in:
@@ -65,8 +65,13 @@ export interface UseModelsSelectorReturn {
|
||||
* duplicating store derivations, selection handling, and model loading.
|
||||
*/
|
||||
export function useModelsSelector(opts: UseModelsSelectorOptions): UseModelsSelectorReturn {
|
||||
/** Tab the selector shows: a backend id, or the favorites pseudo tab. */
|
||||
let viewId = $state<string>(backendsStore.active.id);
|
||||
/**
|
||||
* Tab the selector shows: a backend id, or the favorites pseudo tab. Favorites
|
||||
* are the default view while there is at least one.
|
||||
*/
|
||||
let viewId = $state<string>(
|
||||
modelsStore.favoriteModelIds.size > 0 ? FAVORITES_TAB_ID : backendsStore.active.id
|
||||
);
|
||||
|
||||
const activeBackendId = $derived(backendsStore.active.id);
|
||||
// every enabled backend's models stay selectable and resolvable, so a
|
||||
|
||||
Reference in New Issue
Block a user