diff --git a/internal/ui/clipboard/clipboard.go b/internal/ui/clipboard/clipboard.go index 2f007f8d..dda38075 100644 --- a/internal/ui/clipboard/clipboard.go +++ b/internal/ui/clipboard/clipboard.go @@ -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 - } -}