Notify on run end only for runs marked Notify me

Auto runs no longer alert on failure or success; only notify_mode on does,
unless the run_finished setting (now 'Notify when any run ends', default off)
opts into every run end. Waiting still notifies auto and on runs. The setting
is stored under a new key so a value saved under the old meaning is ignored.
This commit is contained in:
2026-10-31 16:52:04 +00:00
parent 4235cd858f
commit b109ab3e06
14 changed files with 188 additions and 98 deletions
+4 -3
View File
@@ -27,8 +27,9 @@ const (
// NotificationSettings is the typed form of the global notification choices.
type NotificationSettings struct {
// RunFinished notifies when a run with notify mode "auto" succeeds. Runs
// started with notifications "on" always notify and "off" never do.
// RunFinished makes every run end (success or failure) notify, not only
// runs started with notify mode "on". Off by default: an "auto" run then
// notifies only when it waits for a human decision, and "off" never does.
RunFinished bool
// ChatNeedsYou notifies when a chat asks a question or requests approval.
ChatNeedsYou bool
@@ -41,7 +42,7 @@ var NotificationSettingKeys = []string{NotifyRunFinished, NotifyChatNeedsYou, No
// DefaultNotificationSettings are the values before the operator changes any.
func DefaultNotificationSettings() NotificationSettings {
return NotificationSettings{RunFinished: true, ChatNeedsYou: true, ChatReplyFinished: false}
return NotificationSettings{RunFinished: false, ChatNeedsYou: true, ChatReplyFinished: false}
}
// Map returns the wire form with every key present.