feat(04-01): integrate notifications and focus mode into daemon
- Notifier + FocusTimer fields in Daemon, initialized in NewDaemon - processHookEvent notifies on Working -> Needs Input only (D-01) - Focus mode suppresses notifications when active (D-05) - FocusArgs in protocol, "focus" handler in daemon - CLI "vmux focus <minutes>" command - Tests for all notification transitions and focus handler
This commit is contained in:
12
protocol.go
12
protocol.go
@@ -13,9 +13,10 @@ type Request struct {
|
||||
|
||||
// Response is the JSON message sent back by the daemon.
|
||||
type Response struct {
|
||||
OK bool `json:"ok"`
|
||||
Error string `json:"error,omitempty"`
|
||||
Sessions []SessionInfo `json:"sessions,omitempty"`
|
||||
OK bool `json:"ok"`
|
||||
Error string `json:"error,omitempty"`
|
||||
Sessions []SessionInfo `json:"sessions,omitempty"`
|
||||
FocusRemaining float64 `json:"focus_remaining,omitempty"`
|
||||
}
|
||||
|
||||
// SessionInfo is the wire format for a session in IPC responses.
|
||||
@@ -42,3 +43,8 @@ type LabelArgs struct {
|
||||
SessionID string `json:"session_id"`
|
||||
Label string `json:"label"`
|
||||
}
|
||||
|
||||
// FocusArgs carries the duration for the focus command.
|
||||
type FocusArgs struct {
|
||||
Minutes int `json:"minutes"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user