summaryrefslogtreecommitdiffhomepage
path: root/internal/tui/util
diff options
context:
space:
mode:
authoradamdottv <[email protected]>2025-05-08 12:03:59 -0500
committeradamdottv <[email protected]>2025-05-08 12:03:59 -0500
commitf41b7bbd0a0cc731fd7c471b7ee8b26f14a21755 (patch)
treebd34e77a07516735a220c210d4930fbe2132a63b /internal/tui/util
parente35ea2d448d1a3c9cf0a6fba1318e522fc61d1eb (diff)
downloadopencode-f41b7bbd0a0cc731fd7c471b7ee8b26f14a21755.tar.gz
opencode-f41b7bbd0a0cc731fd7c471b7ee8b26f14a21755.zip
chore: refactoring status updates
Diffstat (limited to 'internal/tui/util')
-rw-r--r--internal/tui/util/util.go40
1 files changed, 0 insertions, 40 deletions
diff --git a/internal/tui/util/util.go b/internal/tui/util/util.go
index 2707009b3..207382d1e 100644
--- a/internal/tui/util/util.go
+++ b/internal/tui/util/util.go
@@ -1,8 +1,6 @@
package util
import (
- "time"
-
tea "github.com/charmbracelet/bubbletea"
)
@@ -12,44 +10,6 @@ func CmdHandler(msg tea.Msg) tea.Cmd {
}
}
-func ReportError(err error) tea.Cmd {
- return CmdHandler(InfoMsg{
- Type: InfoTypeError,
- Msg: err.Error(),
- })
-}
-
-type InfoType int
-
-const (
- InfoTypeInfo InfoType = iota
- InfoTypeWarn
- InfoTypeError
-)
-
-func ReportInfo(info string) tea.Cmd {
- return CmdHandler(InfoMsg{
- Type: InfoTypeInfo,
- Msg: info,
- })
-}
-
-func ReportWarn(warn string) tea.Cmd {
- return CmdHandler(InfoMsg{
- Type: InfoTypeWarn,
- Msg: warn,
- })
-}
-
-type (
- InfoMsg struct {
- Type InfoType
- Msg string
- TTL time.Duration
- }
- ClearStatusMsg struct{}
-)
-
func Clamp(v, low, high int) int {
if high < low {
low, high = high, low