notify

package
v0.1.35 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 9, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package notify provides the shell-owned notification (status line) system: severity-styled, auto-expiring, deduplicated transient messages rendered in the footer area. It unifies core.NotificationMsg, core.StatusMsg and shared.UIError into a single stream.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

Manager holds the active notifications. It is owned by the root model.

func New

func New(s *styles.Styles) *Manager

New creates a Manager.

func (*Manager) Dismiss

func (m *Manager) Dismiss()

Dismiss clears all notifications (manual dismiss key).

func (*Manager) Empty

func (m *Manager) Empty() bool

Empty reports whether there are no active notifications.

func (*Manager) HandleMsg

func (m *Manager) HandleMsg(msg tea.Msg) (tea.Cmd, bool)

HandleMsg intercepts notification-bearing messages. It returns a command and whether the message was a notification (already consumed here).

func (*Manager) Push

func (m *Manager) Push(n core.NotificationMsg) tea.Cmd

Push adds a notification and returns any command needed to drive expiry. Identical consecutive messages are deduplicated (the previous one's timer is refreshed rather than adding a duplicate line).

func (*Manager) View

func (m *Manager) View(width int) string

View renders the most recent notification as a single status line (with a "(+N more)" suffix when several are queued). Returns "" when empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL