chore(ui): remove dead toast and clipboard code

Remove 8 unused exports from clipboard package:
- CopyToClipboardWithMessage, IsClipboardSupported
- ToastMsg, ToastType, ToastInfo, ToastSuccess, ToastWarning, ToastError

These were remnants of a toast notification feature that was never
wired up. No callers exist anywhere in the codebase.
This commit is contained in:
Ed Zynda
2026-04-01 21:11:00 +03:00
parent 8e3cfeede5
commit 19430b0ecb
-44
View File
@@ -1,8 +1,6 @@
package clipboard
import (
"runtime"
tea "charm.land/bubbletea/v2"
"github.com/atotto/clipboard"
)
@@ -26,45 +24,3 @@ func CopyToClipboard(text string) tea.Cmd {
},
)
}
// CopyToClipboardWithMessage writes text to clipboard and returns a toast notification.
func CopyToClipboardWithMessage(text string, message string) tea.Cmd {
if text == "" {
return nil
}
return tea.Sequence(
CopyToClipboard(text),
func() tea.Msg {
return ToastMsg{Message: message, Type: ToastInfo}
},
)
}
// ToastType represents the type of toast notification.
type ToastType int
const (
ToastInfo ToastType = iota
ToastSuccess
ToastWarning
ToastError
)
// ToastMsg is a message to display a toast notification.
type ToastMsg struct {
Message string
Type ToastType
}
// IsClipboardSupported returns true if the clipboard is supported on this platform.
func IsClipboardSupported() bool {
switch runtime.GOOS {
case "darwin", "windows":
return true
case "linux":
return true
default:
return false
}
}