summaryrefslogtreecommitdiff
path: root/popups.go
diff options
context:
space:
mode:
authorGrail Finder <wohilas@gmail.com>2026-02-21 20:42:43 +0300
committerGrail Finder <wohilas@gmail.com>2026-02-21 20:42:43 +0300
commit2c694e2b2b76ea9a5b30dbd979731ba92cb1e3ba (patch)
treea0bdc0e4634c71432a3cec4c16e5d54fa6c0910b /popups.go
parent66ccb7a7322780a61b675e827794a8330aef3f89 (diff)
Enha: add (loaded) suffix if model is loaded
Diffstat (limited to 'popups.go')
-rw-r--r--popups.go14
1 files changed, 10 insertions, 4 deletions
diff --git a/popups.go b/popups.go
index b0ee4ae..e5c46a1 100644
--- a/popups.go
+++ b/popups.go
@@ -17,9 +17,13 @@ func showModelSelectionPopup() {
} else if strings.Contains(api, "openrouter.ai") {
return ORFreeModels
}
- // Assume local llama.cpp
- updateModelLists()
- return LocalModels
+ // Assume local llama.cpp - fetch with load status
+ models, err := fetchLCPModelsWithLoadStatus()
+ if err != nil {
+ logger.Error("failed to fetch models with load status", "error", err)
+ return LocalModels
+ }
+ return models
}
// Get the current model list based on the API
modelList := getModelListForAPI(cfg.CurrentAPI)
@@ -57,8 +61,10 @@ func showModelSelectionPopup() {
modelListWidget.SetCurrentItem(currentModelIndex)
}
modelListWidget.SetSelectedFunc(func(index int, mainText string, secondaryText string, shortcut rune) {
+ // Strip "(loaded)" suffix if present for local llama.cpp models
+ modelName := strings.TrimSuffix(mainText, " (loaded)")
// Update the model in both chatBody and config
- chatBody.Model = mainText
+ chatBody.Model = modelName
cfg.CurrentModel = chatBody.Model
// Remove the popup page
pages.RemovePage("modelSelectionPopup")