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 /tui.go | |
| parent | 0ca709b7c679c641724a3a8c2fc1425286b4955a (diff) | |
Fix: model load if llama.cpp started after gf-lt
Diffstat (limited to 'tui.go')
| -rw-r--r-- | tui.go | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -12,11 +12,14 @@ import ( "path" "strconv" "strings" + "sync" "github.com/gdamore/tcell/v2" "github.com/rivo/tview" ) +var _ = sync.RWMutex{} + var ( app *tview.Application pages *tview.Pages @@ -988,11 +991,13 @@ func init() { } updateStatusLine() } else { + localModelsMu.RLock() if len(LocalModels) > 0 { currentLocalModelIndex = (currentLocalModelIndex + 1) % len(LocalModels) chatBody.Model = LocalModels[currentLocalModelIndex] cfg.CurrentModel = chatBody.Model } + localModelsMu.RUnlock() updateStatusLine() // // For non-OpenRouter APIs, use the old logic // go func() { |
