Fix (cli): tui panics

This commit is contained in:
Grail Finder
2026-04-11 16:07:15 +03:00
parent 76cc48eb54
commit 50035e667b
3 changed files with 31 additions and 1 deletions

7
tui.go
View File

@@ -144,6 +144,13 @@ func setShellMode(enabled bool) {
// showToast displays a temporary notification in the bottom-right corner.
// It auto-hides after 3 seconds.
func showToast(title, message string) {
if cfg.UseNotifySend {
notifySend(title, message)
return
}
if cfg.CLIMode {
return
}
sanitize := func(s string, maxLen int) string {
sanitized := strings.Map(func(r rune) rune {
if r < 32 && r != '\t' {