Fix: avoid panic if statuslinewidget not loaded yet

This commit is contained in:
Grail Finder
2026-03-06 10:37:08 +03:00
parent 4ef0a21511
commit 822cc48834

3
bot.go
View File

@@ -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()