summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrail Finder <wohilas@gmail.com>2026-02-22 07:41:09 +0300
committerGrail Finder <wohilas@gmail.com>2026-02-22 07:41:09 +0300
commit86260e218c8320b227d84bb3df1ba4e11779d504 (patch)
tree756410679273ac59902d0d5e1b1fd86e814d664d
parent2c694e2b2b76ea9a5b30dbd979731ba92cb1e3ba (diff)
Enha: moke (loaded) indicator prefix instead of a suffix
-rw-r--r--bot.go4
-rw-r--r--popups.go2
2 files changed, 3 insertions, 3 deletions
diff --git a/bot.go b/bot.go
index fa59de6..f4dbf52 100644
--- a/bot.go
+++ b/bot.go
@@ -413,7 +413,7 @@ func fetchLCPModelsWithLoadStatus() ([]string, error) {
for _, m := range models.Data {
modelName := m.ID
if m.Status.Value == "loaded" {
- modelName = modelName + " (loaded)"
+ modelName = "(loaded) " + modelName
}
result = append(result, modelName)
}
@@ -1369,7 +1369,7 @@ func init() {
var err error
cfg, err = config.LoadConfig("config.toml")
if err != nil {
- fmt.Println("failed to load config.toml")
+ fmt.Println("failed to load config.toml", err)
cancel()
os.Exit(1)
return
diff --git a/popups.go b/popups.go
index e5c46a1..9fdc1fd 100644
--- a/popups.go
+++ b/popups.go
@@ -62,7 +62,7 @@ func showModelSelectionPopup() {
}
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)")
+ modelName := strings.TrimPrefix(mainText, "(loaded) ")
// Update the model in both chatBody and config
chatBody.Model = modelName
cfg.CurrentModel = chatBody.Model