wip: refactoring tui

This commit is contained in:
adamdottv
2025-06-04 09:20:42 -05:00
parent 0b565b18c4
commit 01050a430f
60 changed files with 115 additions and 115 deletions

View File

@@ -0,0 +1,18 @@
package util
import (
tea "github.com/charmbracelet/bubbletea"
)
func CmdHandler(msg tea.Msg) tea.Cmd {
return func() tea.Msg {
return msg
}
}
func Clamp(v, low, high int) int {
if high < low {
low, high = high, low
}
return min(high, max(low, v))
}