Fix: stop making http request per each keypress

This commit is contained in:
Grail Finder
2026-02-20 20:11:52 +03:00
parent 26ab5c59e3
commit 61a0ddfdfd
2 changed files with 51 additions and 16 deletions

5
tui.go
View File

@@ -177,6 +177,9 @@ Press <Enter> or 'x' to return
)
func init() {
// Start background goroutine to update model color cache
startModelColorUpdater()
tview.Styles = colorschemes["default"]
app = tview.NewApplication()
pages = tview.NewPages()
@@ -749,6 +752,8 @@ func init() {
}
if event.Key() == tcell.KeyF12 {
// help window cheatsheet
// Update help text with current status before showing
helpView.SetText(fmt.Sprintf(helpText, makeStatusLine()))
pages.AddPage(helpPage, helpView, true, true)
return nil
}