Add server notification settings with app checkboxes
Persist three global ntfy switches in server_settings: run_finished (default on: auto-mode runs notify on success, read inside the transition transaction; on/off modes unchanged), chat_needs_you (default on: gates chat question/approval alerts) and chat_reply_finished (default off: one alert per finished assistant turn). Expose notification_settings / set_notification_settings over the websocket protocol, add a Phone notifications section with Material and Cupertino checkboxes in Settings, document the settings, and keep the cli, tui, stage and pipeline test packages from inheriting a real ntfy configuration.
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
package cli
|
||||
|
||||
import (
|
||||
"os"
|
||||
"testing"
|
||||
)
|
||||
|
||||
// TestMain isolates the package from an operator's real notification setup:
|
||||
// these tests run real servers and runs, a developer shell may export the
|
||||
// installed server's ntfy configuration, and no test may publish to it.
|
||||
func TestMain(m *testing.M) {
|
||||
for _, name := range []string{"PIPELINES_NTFY_URL", "PIPELINES_NTFY_PUBLIC_URL", "PIPELINES_NTFY_TOKEN", "PIPELINES_NTFY_TOKEN_FILE", "PIPELINES_WEB_PUBLIC_URL"} {
|
||||
os.Unsetenv(name)
|
||||
}
|
||||
os.Exit(m.Run())
|
||||
}
|
||||
Reference in New Issue
Block a user