diff options
| author | Grail Finder <wohilas@gmail.com> | 2025-12-20 14:21:40 +0300 |
|---|---|---|
| committer | Grail Finder <wohilas@gmail.com> | 2025-12-20 14:21:40 +0300 |
| commit | ba3330ee54bcab5cfde470f8e465fc9ed1c6cb2c (patch) | |
| tree | 486b73c1df8bd50a0e7e81d7200294ff07d7e2e2 /props_table.go | |
| parent | 0ca709b7c679c641724a3a8c2fc1425286b4955a (diff) | |
Fix: model load if llama.cpp started after gf-lt
Diffstat (limited to 'props_table.go')
| -rw-r--r-- | props_table.go | 7 |
1 files changed, 7 insertions, 0 deletions
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 |
