Fix (cli): update model list outside of tui

This commit is contained in:
Grail Finder
2026-04-11 16:19:52 +03:00
parent 50035e667b
commit 1504214941
2 changed files with 4 additions and 2 deletions

5
bot.go
View File

@@ -1593,7 +1593,9 @@ func updateModelLists() {
cachedModelColor.Store("green") cachedModelColor.Store("green")
updateStatusLine() updateStatusLine()
UpdateToolCapabilities() UpdateToolCapabilities()
app.Draw() if !cfg.CLIMode {
app.Draw() // raw?
}
return return
} }
} }
@@ -1779,6 +1781,7 @@ func init() {
if !cfg.CLIMode { if !cfg.CLIMode {
initTUI() initTUI()
} }
go updateModelLists()
tools.InitTools(cfg, logger, store) tools.InitTools(cfg, logger, store)
// tooler = tools.InitTools(cfg, logger, store) // tooler = tools.InitTools(cfg, logger, store)
// tooler.RegisterWindowTools(modelHasVision) // tooler.RegisterWindowTools(modelHasVision)

1
tui.go
View File

@@ -1200,5 +1200,4 @@ func initTUI() {
} }
return event return event
}) })
go updateModelLists()
} }