summaryrefslogtreecommitdiff
path: root/popups.go
diff options
context:
space:
mode:
authorGrail Finder <wohilas@gmail.com>2026-03-01 08:22:02 +0300
committerGrail Finder <wohilas@gmail.com>2026-03-01 08:22:02 +0300
commitcdfccf9a2440dc4d8094e7ae94aa85cb446e7cfb (patch)
tree43658a89dd2fbd89106cf58c6a4a48792f4f97ac /popups.go
parent1f112259d2ff58bbe25f25f8c65694d5a7569e68 (diff)
Enha (llama.cpp): show loaded model on startup
Diffstat (limited to 'popups.go')
-rw-r--r--popups.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/popups.go b/popups.go
index 22873d2..d50281f 100644
--- a/popups.go
+++ b/popups.go
@@ -1,6 +1,7 @@
package main
import (
+ "gf-lt/models"
"slices"
"strings"
@@ -51,7 +52,7 @@ func showModelSelectionPopup() {
// Find the current model index to set as selected
currentModelIndex := -1
for i, model := range modelList {
- if strings.TrimPrefix(model, "(loaded) ") == chatBody.Model {
+ if strings.TrimPrefix(model, models.LoadedMark) == chatBody.Model {
currentModelIndex = i
}
modelListWidget.AddItem(model, "", 0, nil)
@@ -61,7 +62,7 @@ func showModelSelectionPopup() {
modelListWidget.SetCurrentItem(currentModelIndex)
}
modelListWidget.SetSelectedFunc(func(index int, mainText string, secondaryText string, shortcut rune) {
- modelName := strings.TrimPrefix(mainText, "(loaded) ")
+ modelName := strings.TrimPrefix(mainText, models.LoadedMark)
chatBody.Model = modelName
cfg.CurrentModel = chatBody.Model
pages.RemovePage("modelSelectionPopup")