From ba3330ee54bcab5cfde470f8e465fc9ed1c6cb2c Mon Sep 17 00:00:00 2001 From: Grail Finder Date: Sat, 20 Dec 2025 14:21:40 +0300 Subject: Fix: model load if llama.cpp started after gf-lt --- props_table.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'props_table.go') diff --git a/props_table.go b/props_table.go index ae225d8..0c49056 100644 --- a/props_table.go +++ b/props_table.go @@ -5,11 +5,14 @@ import ( "slices" "strconv" "strings" + "sync" "github.com/gdamore/tcell/v2" "github.com/rivo/tview" ) +var _ = sync.RWMutex{} + // Define constants for cell types const ( CellTypeCheckbox = "checkbox" @@ -138,6 +141,10 @@ func makePropsTable(props map[string]float32) *tview.Table { } else if strings.Contains(api, "openrouter.ai") { return ORFreeModels } + // Assume local llama.cpp + refreshLocalModelsIfEmpty() + localModelsMu.RLock() + defer localModelsMu.RUnlock() return LocalModels } var modelRowIndex int // will be set before model row is added -- cgit v1.2.3