summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrail Finder <wohilas@gmail.com>2026-03-06 10:37:08 +0300
committerGrail Finder <wohilas@gmail.com>2026-03-06 10:37:08 +0300
commit822cc48834f5f1908f619b5441ae40946aceb86d (patch)
tree9d45db28f3740ce1a960f849be770b9315a490ea
parent4ef0a215119924347c2219f4677f11a96358307f (diff)
Fix: avoid panic if statuslinewidget not loaded yet
-rw-r--r--bot.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/bot.go b/bot.go
index 20ffeb2..ad52059 100644
--- a/bot.go
+++ b/bot.go
@@ -1400,6 +1400,9 @@ func updateModelLists() {
localModelsMu.Lock()
LocalModels = ml
localModelsMu.Unlock()
+ for statusLineWidget == nil {
+ time.Sleep(time.Millisecond * 100)
+ }
// set already loaded model in llama.cpp
if strings.Contains(cfg.CurrentAPI, "localhost") || strings.Contains(cfg.CurrentAPI, "127.0.0.1") {
localModelsMu.Lock()